[Tutor] Phyton script for fasta file (seek help)
Danny Yoo
dyoo at hashcollision.org
Tue Apr 9 21:26:37 CEST 2013
Side note: I would strongly suggest using the biopython libraries for
the basic parsing. FASTA parsing has been done and replicated so many
times that it's almost a hazing ritual for the practicing
bioinformatician. The biopython folks have written a parser, so
perhaps you can reuse it.
http://biopython.org/wiki/Main_Page
http://biopython.org/DIST/docs/tutorial/Tutorial.html#htoc11
About reading from either standard input or as command line arguments,
see the 'fileinput' library:
http://docs.python.org/3/library/fileinput.html
It automatically handles reading either from sys.stdin, or by opening
up the name of the file passed as a command line argument.
More information about the Tutor
mailing list