Hello, I'm doing a biomedical degree and am taking a course on bioinformatics. We were given a raw version of a public database in a file (the file is in simple ASCII) and need to extract only certain lines containing important information. I've made a script that does not work and I am having trouble understanding why.
when I run it on the python shell, it prompts for a protein name but then reports that there is no such entry. The first while loop nested inside a for loop is intended to pick up all lines beginning with "gc;", chop off the "gc;" part and keep only the text after that (which is a protein name). Then it scans the file and collects all lines, chops the "gc;" and stores in them in a tuple. This tuple is not built correctly, because as I posted when the program is run it reports that it cannot find my query in the tuple I created and it is certainly in the database. Can you detect what the mistake is? Thank you in advance! Spyros
myParser.py
Description: Binary data
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor