Skip to content

Commit 404e160

Browse files
authored
Merge pull request #14 from galaxy-genome-annotation/fix-biopython
2 parents 94f77b1 + a250b24 commit 404e160

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

chado/export/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from BCBio import GFF
1313

1414
from Bio import SeqIO
15-
from Bio.Alphabet import IUPAC
1615
from Bio.Seq import Seq
1716
from Bio.SeqFeature import FeatureLocation as BioFeatureLocation
1817
from Bio.SeqFeature import SeqFeature
@@ -85,7 +84,7 @@ def export_gff3(self, organism_id):
8584

8685
for org in res:
8786
# TODO: can we do this properly?
88-
seq = Seq("A" * 1, IUPAC.unambiguous_dna)
87+
seq = Seq("A" * 1)
8988

9089
# Annotation features
9190
features = self.session.query(self.model.feature, self.model.featureloc) \
@@ -230,7 +229,7 @@ def export_gbk(self, organism_id):
230229

231230
sys.stderr.write("Processing %s sequences\n" % res.count())
232231
for org in res:
233-
seq = Seq('', IUPAC.unambiguous_dna)
232+
seq = Seq('')
234233

235234
record_features = []
236235
features = self.ci.session.query(self.model.feature, self.model.featureloc) \
@@ -245,7 +244,7 @@ def export_gbk(self, organism_id):
245244
# Sequence containing feature
246245
if feature.residues:
247246
# This seems bad? What if multiple things have seqs?
248-
seq = Seq(feature.residues, IUPAC.unambiguous_dna)
247+
seq = Seq(feature.residues)
249248
else:
250249
qualifiers = {
251250
self.ci.get_cvterm_name(prop.type_id): prop.value for prop in
@@ -266,6 +265,7 @@ def export_gbk(self, organism_id):
266265
seq, id=org.common_name,
267266
name=org.common_name,
268267
description="%s %s" % (org.genus, org.species),
268+
annotations={"molecule_type": "DNA"},
269269
)
270270
record.features = record_features
271271

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
sqlalchemy
22
psycopg2-binary
3-
biopython
3+
biopython>=1.78
44
bcbio-gff
55
wrapt
66
click

0 commit comments

Comments
 (0)