Back to index

python-biopython  1.60
Functions | Variables
test_seq Namespace Reference

Functions

def complement
def sorted_dict

Variables

string array_indicator = "u"
tuple s = Seq.Seq("TCAAAAGGATGCATCATG", IUPAC.unambiguous_dna)
tuple t = Seq.Seq("T", IUPAC.unambiguous_dna)
 u = s+t
tuple string_seq = MutableSeq("TCAAAAGGATGCATCATG", IUPAC.ambiguous_dna)
tuple array_seq
tuple converted_seq = s.tomutable()
list dna
list rna
list nuc = [Seq.Seq("ATCG", Alphabet.generic_nucleotide),"UUUTTTACG"]
list protein
 c = a+b
list test_chars = ["-", Seq.Seq("-"), Seq.Seq("*"), "-X@"]
tuple alpha = Alphabet._get_base_alphabet(a.alphabet)
tuple b = Seq.Seq("-", Alphabet.generic_nucleotide)
tuple str_chars = str(chars)
tuple compl_values = complement(values)
list test_seqs
list protein_seqs
tuple expected = Seq.transcribe(nucleotide_seq)
tuple short = Seq.translate(nucleotide_seq, to_stop=True)
string misc_stops = "TAATAGTGAAGAAGG"
string table = 'Yeast Mitochondrial'
tuple ambig = set(IUPAC.IUPACAmbiguousDNA.letters)
tuple values

Function Documentation

def test_seq.complement (   sequence)

Definition at line 285 of file test_seq.py.

00285 
00286 def complement(sequence):
00287     #TODO - Add a complement function to Bio/Seq.py?
00288     #There is already a complement method on the Seq and MutableSeq objects.
00289     return Seq.reverse_complement(sequence)[::-1]

def test_seq.sorted_dict (   d)
A sorted repr of a dictionary.

Definition at line 290 of file test_seq.py.

00290 
00291 def sorted_dict(d):
00292     """A sorted repr of a dictionary."""
00293     return "{%s}" % ", ".join("%s: %s" % (repr(k),repr(v)) \
00294                               for k,v in sorted(d.iteritems()))
00295 
print

Variable Documentation

tuple test_seq.alpha = Alphabet._get_base_alphabet(a.alphabet)

Definition at line 232 of file test_seq.py.

tuple test_seq.ambig = set(IUPAC.IUPACAmbiguousDNA.letters)

Definition at line 574 of file test_seq.py.

Definition at line 15 of file test_seq.py.

Initial value:
00001 MutableSeq(array.array(array_indicator, "TCAAAAGGATGCATCATG"),
00002                        IUPAC.ambiguous_dna)

Definition at line 67 of file test_seq.py.

tuple test_seq.b = Seq.Seq("-", Alphabet.generic_nucleotide)

Definition at line 244 of file test_seq.py.

Definition at line 164 of file test_seq.py.

Definition at line 299 of file test_seq.py.

tuple test_seq.converted_seq = s.tomutable()

Definition at line 69 of file test_seq.py.

Initial value:
00001 [Seq.Seq("ATCG", IUPAC.ambiguous_dna),
00002        Seq.Seq("gtca", Alphabet.generic_dna),
00003        Seq.MutableSeq("GGTCA", Alphabet.generic_dna),
00004        Seq.Seq("CTG-CA", Alphabet.Gapped(IUPAC.unambiguous_dna, "-")),
00005        "TGGTCA"]

Definition at line 140 of file test_seq.py.

tuple test_seq.expected = Seq.transcribe(nucleotide_seq)

Definition at line 380 of file test_seq.py.

string test_seq.misc_stops = "TAATAGTGAAGAAGG"

Definition at line 526 of file test_seq.py.

list test_seq.nuc = [Seq.Seq("ATCG", Alphabet.generic_nucleotide),"UUUTTTACG"]

Definition at line 151 of file test_seq.py.

Initial value:
00001 [Seq.Seq("ATCGPK", IUPAC.protein),
00002            Seq.Seq("atcGPK", Alphabet.generic_protein),
00003            Seq.Seq("T.CGPK", Alphabet.Gapped(IUPAC.protein, ".")),
00004            Seq.Seq("T-CGPK", Alphabet.Gapped(IUPAC.protein, "-")),
00005            Seq.Seq("MEDG-KRXR*", Alphabet.Gapped(Alphabet.HasStopCodon(IUPAC.extended_protein, "*"), "-")),
00006            Seq.MutableSeq("ME-K-DRXR*XU", Alphabet.Gapped(Alphabet.HasStopCodon(IUPAC.extended_protein, "*"), "-")),
00007            Seq.Seq("MEDG-KRXR@", Alphabet.HasStopCodon(Alphabet.Gapped(IUPAC.extended_protein, "-"), "@")),
00008            Seq.Seq("ME-KR@", Alphabet.HasStopCodon(Alphabet.Gapped(IUPAC.protein, "-"), "@")),
00009            Seq.Seq("MEDG.KRXR@", Alphabet.Gapped(Alphabet.HasStopCodon(IUPAC.extended_protein, "@"), ".")),
00010            "TEDDF"]

Definition at line 152 of file test_seq.py.

Initial value:
00001 [Seq.Seq("ATCGPK", IUPAC.protein),
00002                 Seq.Seq("T.CGPK", Alphabet.Gapped(IUPAC.protein, ".")),
00003                 Seq.Seq("T-CGPK", Alphabet.Gapped(IUPAC.protein, "-")),
00004                 Seq.Seq("MEDG-KRXR*", Alphabet.Gapped(Alphabet.HasStopCodon(IUPAC.extended_protein, "*"), "-")),
00005                 Seq.MutableSeq("ME-K-DRXR*XU", Alphabet.Gapped(Alphabet.HasStopCodon(IUPAC.extended_protein, "*"), "-")),
00006                 Seq.Seq("MEDG-KRXR@", Alphabet.HasStopCodon(Alphabet.Gapped(IUPAC.extended_protein, "-"), "@")),
00007                 Seq.Seq("ME-KR@", Alphabet.HasStopCodon(Alphabet.Gapped(IUPAC.protein, "-"), "@")),
00008                 Seq.Seq("MEDG.KRXR@", Alphabet.Gapped(Alphabet.HasStopCodon(IUPAC.extended_protein, "@"), "."))]

Definition at line 357 of file test_seq.py.

Initial value:
00001 [Seq.Seq("AUUUCG", IUPAC.ambiguous_rna),
00002        Seq.MutableSeq("AUUCG", IUPAC.ambiguous_rna),
00003        Seq.Seq("uCAg", Alphabet.generic_rna),
00004        Seq.MutableSeq("UC-AG", Alphabet.Gapped(Alphabet.generic_rna, "-")),
00005        Seq.Seq("U.CAG", Alphabet.Gapped(Alphabet.generic_rna, ".")),
00006        "UGCAU"]

Definition at line 145 of file test_seq.py.

tuple test_seq.s = Seq.Seq("TCAAAAGGATGCATCATG", IUPAC.unambiguous_dna)

Definition at line 23 of file test_seq.py.

test_seq.short = Seq.translate(nucleotide_seq, to_stop=True)

Definition at line 500 of file test_seq.py.

tuple test_seq.str_chars = str(chars)

Definition at line 254 of file test_seq.py.

tuple test_seq.string_seq = MutableSeq("TCAAAAGGATGCATCATG", IUPAC.ambiguous_dna)

Definition at line 66 of file test_seq.py.

tuple test_seq.t = Seq.Seq("T", IUPAC.unambiguous_dna)

Definition at line 40 of file test_seq.py.

string test_seq.table = 'Yeast Mitochondrial'

Definition at line 536 of file test_seq.py.

list test_seq.test_chars = ["-", Seq.Seq("-"), Seq.Seq("*"), "-X@"]

Definition at line 231 of file test_seq.py.

Initial value:
00001 [s,t,u,
00002              Seq.Seq("ATGAAACTG"),
00003              "ATGAAACtg",
00004              #TODO - Fix ambiguous translation
00005              #Seq.Seq("ATGAARCTG"),
00006              #Seq.Seq("AWGAARCKG"),  # Note no U or T
00007              #Seq.Seq("".join(ambiguous_rna_values)),
00008              #Seq.Seq("".join(ambiguous_dna_values)),
00009              #Seq.Seq("".join(ambiguous_rna_values), Alphabet.generic_rna),
00010              #Seq.Seq("".join(ambiguous_dna_values), Alphabet.generic_dna),
00011              #Seq.Seq("".join(ambiguous_rna_values), IUPAC.IUPACAmbiguousDNA()),
00012              #Seq.Seq("".join(ambiguous_dna_values), IUPAC.IUPACAmbiguousRNA()),
00013              #Seq.Seq("AWGAARCKG", Alphabet.generic_dna), 
00014              Seq.Seq("AUGAAACUG", Alphabet.generic_rna), 
00015              Seq.Seq("ATGAAACTG", IUPAC.unambiguous_dna), 
00016              Seq.Seq("ATGAAA-CTG", Alphabet.Gapped(IUPAC.unambiguous_dna)),
00017              Seq.Seq("ATGAAACTGWN", IUPAC.ambiguous_dna), 
00018              Seq.Seq("AUGAAACUG", Alphabet.generic_rna), 
00019              Seq.Seq("AUGAAA==CUG", Alphabet.Gapped(Alphabet.generic_rna,"=")),
00020              Seq.Seq("AUGAAACUG", IUPAC.unambiguous_rna),
00021              Seq.Seq("AUGAAACUGWN", IUPAC.ambiguous_rna),
00022              Seq.Seq("ATGAAACTG", Alphabet.generic_nucleotide),
00023              Seq.Seq("AUGAAACTG", Alphabet.generic_nucleotide), #U and T
00024              Seq.MutableSeq("ATGAAACTG", Alphabet.generic_dna),
00025              Seq.MutableSeq("AUGaaaCUG", IUPAC.unambiguous_rna),
00026              Seq.Seq("ACTGTCGTCT", Alphabet.generic_protein)]

Definition at line 331 of file test_seq.py.

Definition at line 41 of file test_seq.py.

Initial value:
00001 set([Seq.translate(a+b+c, table=1) \
00002                           for a in ambiguous_dna_values[c1] \
00003                           for b in ambiguous_dna_values[c2] \
00004                           for c in ambiguous_dna_values[c3]])

Definition at line 578 of file test_seq.py.