Example code - Wrong parsing: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

1 September 2025

  • curprev 08:2108:21, 1 September 2025‎ WikiSysop talk contribs‎ m 2,331 bytes +15‎ No edit summary
  • curprev 08:1908:19, 1 September 2025‎ WikiSysop talk contribs‎ m 2,316 bytes +725‎ No edit summary
  • curprev 08:0708:07, 1 September 2025‎ WikiSysop talk contribs‎ 1,591 bytes +1,591‎ Created page with "Sometimes people think that when they need to parse a SwissProt file or a Genbank file (or even a fasta file), they need to separate the file in entries. While that is not completely wrong - you do need to keep the entries apart from each other - then the way they go about it is wrong. Here is what typically happens. <pre> # Read the file with open('swissprotfile, 'r') as infile: content = infile.read() # Now the file is read into content every byte of it. # That mea..."