[Biopython-dev] 5/6 BioStar - Biopython Questions
Giovanni Marco Dall'Olio
dalloliogm at gmail.com
Thu May 6 08:36:51 UTC 2010
On Thu, May 6, 2010 at 8:08 AM, Feed My Inbox <updates at feedmyinbox.com> wrote:
> ==================================================
> 1. Simple Fasta Parsing Is Not Simple.
> ==================================================
> May 5, 2010 at 6:25 PM
>
> When trying out the examples from chapter 2.3 of the biopython 1.54b tutorial I keep running into this very annoying problem: When I use:
This user is complaining that the current biopython's tutorial
describes a feature introduced in biopython 1.54, so if you try it
with an earlier version, it doesn't work.
In particular, it is the feature that allow to use a string/filename
as argument for SeqIO.parse, which is not available in earlier
versions.
Maybe it would be useful to add a note to the tutorial, explaining
users that they should update biopython or that in earlier versions
they have to use a filehandler .
>
> from Bio import SeqIO
>
> for seq_record in SeqIO.parse("ls_orchid.fasta", "fasta"):
>
> print seq_record.id
> print repr(seq_record.seq)
> print len(seq_record)
>
>
> ==================================================
> 2. How do I create a SeqRecord in biopython?
> ==================================================
> May 5, 2010 at 6:25 PM
>
> id1 ="HWI-EAS380:8:1:16:830/1"
>
> seq1 ="AGGGCGTTCAGCAGCCAGCTTGCGGCAAAACTGCGTAACCGTCTTCTCGTTCTCT
> AAAAACCATTTTTCGTCCCCTTCGGGGCGGTGGTCTATAGTGTTATTAATATCAA
> GTTGGGGGAGCACATTGTAGCATTG"
>
> qual1="abbbbbaab`abaabbaabaaaab^E^``^aaabaa_\_abaaaaaaaa`aaaa`
> Z^`^^aaaaaaa`aa^aaa``_aa_aaaaaaaaaaa`aaaa`aaaaaabaaabba
> aaaaaaaaaaa_baaaabbbbbaba"
Have a look at this question, too. I don't know how to answer properly.
--
Giovanni Dall'Olio, phd student
Department of Biologia Evolutiva at CEXS-UPF (Barcelona, Spain)
My blog on bioinformatics: http://bioinfoblog.it
More information about the Biopython-dev
mailing list