Annotating features with qualifiers
Closed this issue · 1 comments
benweinberg89 commented
I could be doing something wrong, but adding qualifiers in dc.biotools.record_operations.annotate_record don't seem to be working for me. Rather the qualifiers are just being added to /note. Annotating using the same qualifiers dict in SeqFeature seems to be working fine for me though.
veghp commented
Thanks for reporting this. The issue seems to be how your sequence editor reads the file and displays the features.
This works for me:
import dnacauldron as dc
from Bio import SeqRecord, Seq, SeqFeature
record = SeqRecord.SeqRecord(Seq.Seq("AGATCGATCGATGTAGCT"))
dc.biotools.record_operations.annotate_record(record, test=1234, number="test123")
dc.biotools.write_record(record, target="output.gb")
output.gb
:
LOCUS . 18 bp DNA UNK 01-JAN-1980
DEFINITION .
ACCESSION <unknown id>
VERSION <unknown id>
KEYWORDS .
SOURCE .
ORGANISM .
.
FEATURES Location/Qualifiers
misc_feature 1..18
/test=1234
/number=test123
ORIGIN
1 agatcgatcg atgtagct
//
As you see the qualifier is correct in the file, but /test is displayed under /note in an editor, SnapGene for example.