[Biopython] FASTA file parsing

Philipp Schiffer philipp.schiffer at gmail.com
Mon Jun 30 07:09:45 UTC 2014


Dear Ismail,

I am not sure if I fully understand your question, but are you maybe 
looking at something like this:
  for record in SeqIO.parse(fastafile, "fasta"):
         (header, seq) = record.id, record.seq
         kogrecord[(seq)] = header
?

Kind regards

Philipp
> Ismail Uddin <mailto:ismail.sameeuddin at gmail.com>
> 29 June 2014 12:43
> Dear Sir or Madam,
>
> I would like to post a question regarding FASTA file parsing using the 
> BioPython module. The current tutorial online indicates how to parse a 
> FASTA file, but the output is in the format Seq('<<sequence here>>', 
> SingleLetterAlphabet())
>
> I would like to know how one may simply print out the entire sequence 
> without any adjoining text i.e. 'ACTACGGCGAT'
>
> I ask this question, as I am trying to write a script that will read 
> each entry in the FASTA file and produce a dictionary of key being the 
> ID and the value being the raw sequence.
>
> ​Thank you in advance for your help and cooperation,
> Ismail Uddin
> _______________________________________________
> Biopython mailing list - Biopython at mailman.open-bio.org
> http://mailman.open-bio.org/mailman/listinfo/biopython
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython/attachments/20140630/76b60ece/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compose-unknown-contact.jpg
Type: image/jpeg
Size: 770 bytes
Desc: not available
URL: <http://mailman.open-bio.org/pipermail/biopython/attachments/20140630/76b60ece/attachment.jpg>


More information about the Biopython mailing list