
Product
Announcing Precomputed Reachability Analysis in Socket
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
A simple Python class for generating custom orthogonal DNA/RNA barcodes.
pip install OrthogonalBarcodes
from OrthogonalBarcodes import OrthogonalBarcode
barcodes = OrthogonalBarcode.OrthogonalBarcode()
barcodes.length=25
barcodes.gc=50
barcodes.amount=10
barcodes.hamming_distance=4
barcodes.generate_barcodes()
print(barcodes.barcodes)
>
>
# Prints the list of barcodes below
['TTAGACGTGCAGTCGTCTTGACCCT', 'CCGTGTGGTCTCCCTCATGGTTAAA', 'GAGCCGGGTGAAACTCAAACTCAAC', 'AGTGGGGACTGTGCTAAGGCAAGAT', 'TGCAGCACCTTTGGTCACCTTTCTC', 'CAGCCGGTCTCCGATTATCTATCTC', 'TATGGGGAAGCTGTCGTGATTGGCT', 'GGCGCCACCAGAATCACTTTAAGTG', 'TACGGTCGATATGGATCCTTCCGTG', 'TGAGTCTCAGGTACGCAAGTTGCCT']
from OrthogonalBarcodes import OrthogonalBarcode
# Instantiate the class and set required/optional properties below.
barcodes = OrthogonalBarcode.OrthogonalBarcode()
# Required — The length of each barcode (Default:20)
barcodes.length=25
# Required — The GC percentage for each barcode generated (Default:50)
barcodes.gc=50
# Required — The amount of barcodes to generate (Default:1)
barcodes.amount=10
# Optional — Hamming distance between all barcodes. (Default:0)
barcodes.hamming_distance=4
# Optional — Fasta file path for organism of interest. (Default:none)
barcodes.ooi_file='tests/test_ooi.fasta'
# Optional — Maximum barcode homology to any part of the oranism of interest file Default:50)
barcodes.ooi_homology_threshold = 40
# Optional — List of restriction sites to avoid when generating barcodes. (Default:none; Accepts Bio.Restriction properties)
barcodes.avoid_rs=[EcoRI,BamHI,NheI,XhoI,KasI]
# Optional — List of any motifs to filter from barcodes (Default: "AAAA","TTTT","CGCGCGCG","ATATATAT")
barcodes.avoid_motifs=["AAATTTT","TTTTTT","GGGGGGGG"]
# Optional — List of starting sequences to avoid (Default: "ATATAT")
barcodes.avoid_start=["AAATTTT","TTTTTT","GGGGGGGG"]
# Optional — List of ending sequences to avoid (Default: "ATATAT")
barcodes.avoid_end=["AAATTTT","TTTTTT","GGGGGGGG"]
# Generate the barcodes
barcodes.generate_barcodes()
# Print a list of generated barcodes.
print(barcodes.barcodes)
>
>
# Prints the list of barcodes below
['AATCGATCGTGGCATCGTCCCTATC', 'GAAATCGAGACTCCGACCGATGTCT', 'GGTAACTAGTCCTAGATCAGCGAGG', 'AACAGTTCCTGGTGGTGTCTAGGCT', 'TGTTGCGTCCGTACTGTGGCGTAAA', 'CCGATTGATCTGACGTCGTGTCAAG', 'CTAGGACCATTGACTCGGCAACAAG', 'AATACTCACGATGCGATTTCCGCGG', 'TCGGTCTGTAGAGAGAGATACGTGC', 'AGGGTCGTCAGAAACTGAACCTGCT']
This class uses a brute force method to generate barcodes. The amount of time to generate barcodes increases greatly with the amount of barcodes being generated. Additionally, when filtering against an organism of interest or increasing the hamming distance between barcodes, the class will increase its complexity and barcode generation time will increase.
FAQs
A simple Python class for generating custom orthogonal DNA/RNA barcodes.
We found that OrthogonalBarcodes demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.