コード例 #1
0
ファイル: test_parents.py プロジェクト: SJShaw/gff-parser
 def test_distinct(self):
     filepath = os.path.join("gffparser", "test", "data", "distinct_cds_same_parent.gff3")
     record = parse_gff(filepath)[0]
     assert len(record.cds_features) == 2
     assert record.cds_features[0].gff_id != record.cds_features[1].gff_id
     assert isinstance(record.cds_features[0].location, FeatureLocation)
     assert isinstance(record.cds_features[1].location, FeatureLocation)
コード例 #2
0
ファイル: test_parents.py プロジェクト: SJShaw/gff-parser
 def test_RNA_gene(self):
     filepath = os.path.join("gffparser", "test", "data", "RNA_gene.gff3")
     record = parse_gff(filepath)[0]
     gene = record.parent_features["A"]
     assert len(gene.generics) == 1
     assert gene.gff_type == "RNA_gene"
     rna = record.parent_features["B"]
     assert rna.parent == gene
コード例 #3
0
ファイル: test_parents.py プロジェクト: SJShaw/gff-parser
 def test_indistinct(self):
     filepath = os.path.join("gffparser", "test", "data", "indistinct_cds_same_parent.gff3")
     record = parse_gff(filepath)[0]
     assert len(record.cds_features) == 1
     assert isinstance(record.cds_features[0].location, CompoundLocation)
コード例 #4
0
ファイル: test_parents.py プロジェクト: SJShaw/gff-parser
 def test_wrong_ordering(self):
     filepath = os.path.join("gffparser", "test", "data", "out_of_order_parent.gff3")
     record = parse_gff(filepath)[0]
     gene = record.parent_features["gene"]
     cds = record.cds_features[0]
     assert cds.parent == gene
コード例 #5
0
ファイル: test_parents.py プロジェクト: SJShaw/gff-parser
 def test_simple(self):
     filepath = os.path.join("gffparser", "test", "data", "simple_parent.gff3")
     record = parse_gff(filepath)[0]
     gene = record.parent_features["gene"]
     cds = record.cds_features[0]
     assert cds.parent == gene