~ubuntu-branches/debian/sid/python-biopython/sid

« back to all changes in this revision

Viewing changes to Tests/test_SeqUtils.py

  • Committer: Package Import Robot
  • Author(s): Andreas Tille
  • Date: 2014-06-08 10:25:35 UTC
  • mfrom: (1.1.22)
  • Revision ID: package-import@ubuntu.com-20140608102535-ebgnhcpcrum3i3w8
Tags: 1.64+dfsg-1
* New upstream version
* Build-Depends raxml only on those architectures where it is available
  Closes: #750845

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
from Bio.Alphabet import single_letter_alphabet
11
11
from Bio.Seq import Seq, MutableSeq
12
12
from Bio.SeqRecord import SeqRecord
13
 
from Bio.SeqUtils import GC, quick_FASTA_reader, seq1, seq3
 
13
from Bio.SeqUtils import GC, seq1, seq3
14
14
from Bio.SeqUtils.lcc import lcc_simp, lcc_mult
15
15
from Bio.SeqUtils.CheckSum import crc32, crc64, gcg, seguid
16
16
from Bio.SeqUtils.CodonUsage import CodonAdaptationIndex
45
45
                        + "APKLMIYEGSKRPSGVSNRFSGSKSGNTASLTISGLQAEDEADY" \
46
46
                        + "YCCSYAGSSTWVFGGGTKLTVL"
47
47
 
48
 
    def test_quick_fasta_reader(self):
49
 
        dna_fasta_filename = "Fasta/f002"
50
 
 
51
 
        tuple_records = quick_FASTA_reader(dna_fasta_filename)
52
 
        self.assertEqual(len(tuple_records), 3)
53
 
        seq_records = list(SeqIO.parse(dna_fasta_filename, "fasta"))
54
 
        self.assertEqual(len(seq_records), 3)
55
 
        for tuple_record, seq_record in zip(tuple_records, seq_records):
56
 
            self.assertEqual(tuple_record, (seq_record.description, str(seq_record.seq)))
57
 
 
58
48
    def test_codon_usage_ecoli(self):
59
49
        """Test Codon Adaptation Index (CAI) using default E. coli data."""
60
50
        CAI = CodonAdaptationIndex()