Repository 'filter_fasta'
hg clone https://toolshed.g2.bx.psu.edu/repos/bornea/filter_fasta

Changeset 14:d66c62c6c56f (2016-08-24)
Previous changeset 13:55990dea42fb (2016-08-16) Next changeset 15:3833aebf8d3a (2016-08-24)
Commit message:
Uploaded
modified:
filter_fasta.py
b
diff -r 55990dea42fb -r d66c62c6c56f filter_fasta.py
--- a/filter_fasta.py Tue Aug 16 20:48:46 2016 -0400
+++ b/filter_fasta.py Wed Aug 24 13:00:03 2016 -0400
[
@@ -34,10 +34,13 @@
             break
         cnt += 1
     header = data[header_start]
-    if "Accession Number" in header:
-        prot_start = header.index("Accession Number")
-    elif "Accession" in header:
-        prot_start = header.index("Accession")
+    for i in header:
+        if i == "Accession":
+            prot_start = header.index("Accession")
+        if i == "Accession Number":
+            prot_start = header.index("Accession Number")
+        if i == "Main Accession":
+            prot_start = header.index("Main Accession")
     proteins = []
     for protein in data[header_start:]:
         if len(protein) > prot_start: