[Biopython] SwissProt parser: get entire entry as string?

Chevreux, Bastien bastien.chevreux at dsm.com
Fri Aug 19 15:56:55 UTC 2016


Dear list,

Is there a way to get the entire entry of a just parsed SwissProt entry as string?

Motivation: I want to write a simple filter for UniProt/SwissProt .dat files like this

fh=open(sys.stdin.fileno())
for rec in SwissProt.parse(fh):
if ("something I want to check for matches"):
    print(rec.entry_as_string)

and not reformat each and every field for compatible output (which would take half a life-time to get correct and probably still be error-prone).

Best,
  Bastien


--
DSM Nutritional Products Microbia Inc | Bioinformatics
60 Westview Street | Lexington, MA 02421 | United States
Phone +1 781 259 7613 | Fax +1 781 259 0615


________________________________

DISCLAIMER:
This e-mail is for the intended recipient only.
If you have received it by mistake please let us know by reply and then delete it from your system; access, disclosure, copying, distribution or reliance on any of it by anyone else is prohibited.
If you as intended recipient have received this e-mail incorrectly, please notify the sender (via e-mail) immediately.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython/attachments/20160819/e180ae6c/attachment.html>


More information about the Biopython mailing list