From Comaiwiki

Revision as of 10:59, 17 February 2011 by Dcoil (Talk | contribs)

Barcode Generator

This program was written by Luca Comai and Tyson Howell. The program queries the user in the shell window for search parameters (barcode length, number, minimum genetic distance between barcodes, cycles of random attempts, and GC content). Depending on the chosen parameters, the few last possible barcodes of a type might be rare among all the possible random choices. if this happens, the program gets stuck trying to randomly generate highly improbable barcodes. The program starts with a seed barcode and it compares each new random product to the accepted barcodes. Once the set number of barcodes (or attempts) has been reached, the program joins the barcodes to the sequences of the Illumina paired end adapters and prints them to a file.

If you are only interested in a few barcodes, we have a list of 24 well-tested barcodes available here. This list includes both the barcodes and the complete oligonucleotides to be ordered.

To get Barcode Generator click on the Download link. Version 2.8 was written and tested for Python 2.5 to 2.6. Its function is exemplified by the output shown below.

___________________________________________INPUT and OUTPUT Example (IDLE shell window)

Plant Biology and Genome Center
	UC Davis
This program generates barcodes
of a desired length, distance, and GC content
The primer sequences currently used
are the illumina paired end primers

Enter LENGTH as an integer (i.e. 4)
Barcode length: 5

Enter the number of barcodes (default is LENGTH x 5)
Total number of barcodes: 96

Enter the minimum number of different bases between barcodes (default is LENGTH/2, i.e. 7->3, 4->2)
Min. no. of different bases between barcodes: 2

Enter desired GC content range in percentages (i.e. 50 ->50%)
Minimum GC content (default is 0):20
Maximum GC content (default is 100):80

The default number of random codes to test is 10000. Do not enter more than a million
How many attempts?:100000

good barcodes and GC content:
['a', 'a', 'a', 'c', 'c'] 40 %
['a', 'a', 'c', 'a', 'g'] 40 %
['a', 'a', 'g', 'c', 'g'] 60 %
[etc. etc.]
['t', 't', 't', 'g', 't'] 20 %

number of tested barcodes:

number of good barcodes:

base compositions by position
['a', 'c', 't', 'g'] [20, 27, 26, 23]
['a', 'c', 't', 'g'] [25, 24, 23, 24]
['a', 'c', 't', 'g'] [25, 22, 24, 25]
['a', 'c', 't', 'g'] [21, 28, 24, 23]
['a', 'c', 't', 'g'] [25, 22, 23, 26]
A file called barcode.txt has been generated.
It contains the adapter sequences with each
barcode in lower case
___________________________________________ end of shell window

A text file is generated and looks like this:

These are the barcodes of length 5 with a distance of 2 bases




___________________________________________ end of file example

To get Barcode Generator click on the [ Download]  link. Version 2.8 was written and tested for Python 2.5.2

Back to [[Python]] page
Personal tools