Skip to main content

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)

>
>

# Prints the list of barcodes below
['TTAGACGTGCAGTCGTCTTGACCCT', 'CCGTGTGGTCTCCCTCATGGTTAAA', 'GAGCCGGGTGAAACTCAAACTCAAC', 'AGTGGGGACTGTGCTAAGGCAAGAT', 'TGCAGCACCTTTGGTCACCTTTCTC', 'CAGCCGGTCTCCGATTATCTATCTC', 'TATGGGGAAGCTGTCGTGATTGGCT', 'GGCGCCACCAGAATCACTTTAAGTG', 'TACGGTCGATATGGATCCTTCCGTG', 'TGAGTCTCAGGTACGCAAGTTGCCT']

Full Usage

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']

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.

Release files for OrthogonalBarcodes 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for OrthogonalBarcodes 0.2.5
File Size Uploaded
OrthogonalBarcodes-0.2.5.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for OrthogonalBarcodes 0.2.5
File Interpreter ABI Platform
OrthogonalBarcodes-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 8.5 kB

Release files / OrthogonalBarcodes-0.2.5.tar.gz

Download URL OrthogonalBarcodes-0.2.5.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
78144b73cd6ec6c9f18c364b910d0d1afca552c6a7cffbe54856d16aaaa52997
BLAKE2b-256 checksum
How to use checksums
1b5c659c504221aed8ddb2409c8d2c87c2f73778e810438c71a5141791c29fb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / OrthogonalBarcodes-0.2.5-py3-none-any.whl

Download URL OrthogonalBarcodes-0.2.5-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
25b3b37106fe07a610fe00d8958221dc5ae3a88f6343ab1c11e41bece1d249a8
BLAKE2b-256 checksum
How to use checksums
c9a5493efa8b4243ac5c89db4ab777b6422cc110a0bb6302f10e1f2196e13827
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.2.5 This release

2 release files

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page