[BioPython] Retrieving the raw sequence from sequence object...

Sean Davis sdavis2 at mail.nih.gov
Mon Mar 12 10:20:11 UTC 2007


On Monday 12 March 2007 05:59, Joydeep Mitra wrote:
> Hi,
> I'm a student of bioinformatics (coming from a biological background).
>
> I've just started using biopython for parsing biological file formats.
> The Bio.Fasta module contains the fasta iterator object, which spits out
> sequence objects...of the form:
>
>  Seq('CGTAACAAGGTTTCCGTAGGTGAACCTGCGGAAGGATCATTGTTGAGATCACATAATAAT ...',
> IUPACAmbiguousDNA())
>
> I want to retrieve the sequence in it's entirety and in raw format....how
> does one do that using an instance object?
> I've tried a few things without success...will be glad if some1 could show
> me how...

If you have a sequence object, "myseq":

myseq.tostring()

See here for more details:

http://biopython.org/DIST/docs/tutorial/Tutorial.html

Section 2.2.

Hope that helps.

Sean



More information about the Biopython mailing list