<div dir="ltr">I eventually just wrote a simple function that took SeqRecord, parsed the header and returned the new SeqRecord with annotations set. I just hoped someone has already built a general-purpose solution.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-11-14 18:40 GMT+08:00 Sheng Wang <span dir="ltr"><<a href="mailto:bsmagic@qq.com" target="_blank">bsmagic@qq.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Alexey:<br>
Maybe you could overload the object?<br>
<br>
<br>
------------------ Original ------------------<br>
From:  "Alexey Morozov";<<a href="mailto:alexeymorozov1991@gmail.com">alexeymorozov1991@<wbr>gmail.com</a>>;<br>
Date:  Tue, Aug 23, 2016 11:13 AM<br>
To:  "biopython"<<a href="mailto:biopython@mailman.open-bio.org">biopython@mailman.<wbr>open-bio.org</a>>;<br>
Subject:  [Biopython] Parsing FASTA headers<br>
<br>
Hello everyone.<br>
Is any support for FASTA dialects, so to say, in Biopython? For example, NCBI headers include GI/new ID, human-readable sequence name, and a good deal of them include species name in square brackets. Ones on JGI site include two of their sequence IDs and a shortened species name. MMETSP consists of lots and lots of tags. And so on and so forth, most databases have some internal standart for FASTA headers that potentially includes useful information.<br>
Looking up docs, I found only SeqRecord.id and SeqRecord.description. If I understood correctly, this just means "Stuff before or after first \s, respectively". Can I get more fine-grained features without cooking up my own parser?<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Alexey Morozov,<br>
LIN SB RAS, bioinformatics group.<br>
Irkutsk, Russia.</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><font face="arial,helvetica,sans-serif">Alexey Morozov,<br>LIN SB RAS, bioinformatics group.<br>Irkutsk, Russia.<br></font></div>
</div>