コード例 #1
0
 def test_filter_on_strand(self):
     rna_seq = FeatureSet('Transcripts-ex1.txt')
     rna_plus = rna_seq.filterByStrand('+')
     self.assertEqual(len(rna_plus),5,
                      "Wrong number of + strands")
     rna_minus = rna_seq.filterByStrand('-')
     self.assertEqual(len(rna_minus),5,
                      "Wrong number of - strands")
コード例 #2
0
 def test_getTSS(self):
     rna_seq = FeatureSet('Transcripts-ex1.txt')
     rna_plus = rna_seq.filterByStrand('+')
     for rna_data in rna_plus:
         self.assertTrue((rna_data.strand == '+' and
                          rna_data.start == rna_data.getTSS()),
                         "Incorrect TSS on + strand")
     rna_minus = rna_seq.filterByStrand('-')
     for rna_data in rna_minus:
         self.assertTrue((rna_data.strand == '-' and
                          rna_data.end == rna_data.getTSS()),
                         "Incorrect TSS on - strand")