def primers(): primers = [ Primer.create(seq="ATGC", fg_freq=1, bg_freq=2, ratio=1.0, active=True), Primer.create(seq="GGCC", fg_freq=1, bg_freq=3, ratio=0.5, active=True), Primer.create(seq="CCTA", fg_freq=2, bg_freq=0, ratio=float('inf'), active=True) ] return primers
def test_linearize_binding_sites(kmer, ws, fastafile): p = Primer.create(seq=kmer) p._update_locations(fastafile) chr_ends = swga.locate.chromosome_ends(fastafile) linear_bind_sites = swga.locate.linearize_binding_sites([p], chr_ends) # (number of sites + (2*number of chromosomes) - (any overlaps)) assert len(linear_bind_sites) == 10 for record, ends in chr_ends.iteritems(): start, end = ends assert start in linear_bind_sites assert end in linear_bind_sites for site in p.locations[record]: assert site in linear_bind_sites
def primers(self): primers = [ # reference primer Primer.create(_id=0, seq="ATGCTC"), # rev. complement has 4 bases overlapping Primer.create(_id=1, seq="CAGCAT"), # rev. complement has 3 bases overlapping Primer.create(_id=2, seq="GAGGTA"), Primer.create(_id=3, seq="ATCGAG"), # rev. complement has one base overlapping Primer.create(_id=4, seq="TTCCAC"), # substring of reference primer Primer.create(_id=5, seq="ATGC") ] return primers
def primers(ws, seqs): return [Primer.create(seq=seq) for seq in seqs]