Orthogonal Barcodes
A simple Python class for generating custom orthogonal DNA/RNA barcodes.
Features
- Generate a configurable amount of barcodes.
- Define length of barcodes.
- GC percent filter.
- Hamming distance filter.
- Avoid common and custom restriction sites.
- Custom motifs avoidance from barcodes.
- Start and end sequence avoidance.
- Avoid barcode homology to organism of interest.
Installation
pip install OrthogonalBarcodes
Quickstart
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)
>
>
['TTAGACGTGCAGTCGTCTTGACCCT', 'CCGTGTGGTCTCCCTCATGGTTAAA', 'GAGCCGGGTGAAACTCAAACTCAAC', 'AGTGGGGACTGTGCTAAGGCAAGAT', 'TGCAGCACCTTTGGTCACCTTTCTC', 'CAGCCGGTCTCCGATTATCTATCTC', 'TATGGGGAAGCTGTCGTGATTGGCT', 'GGCGCCACCAGAATCACTTTAAGTG', 'TACGGTCGATATGGATCCTTCCGTG', 'TGAGTCTCAGGTACGCAAGTTGCCT']
Full Usage
from OrthogonalBarcodes import OrthogonalBarcode
barcodes = OrthogonalBarcode.OrthogonalBarcode()
barcodes.length=25
barcodes.gc=50
barcodes.amount=10
barcodes.hamming_distance=4
barcodes.ooi_file='tests/test_ooi.fasta'
barcodes.ooi_homology_threshold = 40
barcodes.avoid_rs=[EcoRI,BamHI,NheI,XhoI,KasI]
barcodes.avoid_motifs=["AAATTTT","TTTTTT","GGGGGGGG"]
barcodes.avoid_start=["AAATTTT","TTTTTT","GGGGGGGG"]
barcodes.avoid_end=["AAATTTT","TTTTTT","GGGGGGGG"]
barcodes.generate_barcodes()
print(barcodes.barcodes)
>
>
['AATCGATCGTGGCATCGTCCCTATC', 'GAAATCGAGACTCCGACCGATGTCT', 'GGTAACTAGTCCTAGATCAGCGAGG', 'AACAGTTCCTGGTGGTGTCTAGGCT', 'TGTTGCGTCCGTACTGTGGCGTAAA', 'CCGATTGATCTGACGTCGTGTCAAG', 'CTAGGACCATTGACTCGGCAACAAG', 'AATACTCACGATGCGATTTCCGCGG', 'TCGGTCTGTAGAGAGAGATACGTGC', 'AGGGTCGTCAGAAACTGAACCTGCT']
Notes
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.