[BioPython] Fwd:

Peter biopython at maubp.freeserve.co.uk
Tue Feb 19 00:04:35 UTC 2008


On 2/18/08, Crivellaro Patrizia <pet85 at libero.it> wrote:
> Do someone know how to save a sequence in FASTA format not
> as a text file .txt but as a file .fasta??
> thank you very very much!

How have you got your sequences in the first place?  How about
something very simple like:

name = "Test"
seq = "ATAGACTACGCATACGACT"
handle = open("example.fasta", "w")
handle.write(">%s\n%s\n" % (name, seq))
handle.close()

Maybe you should read the Biopython tutorial or
http://biopython.org/wiki/SeqIO for more ideas?

Peter



More information about the Biopython mailing list