[Biopython-dev] 5/6 BioStar - Biopython Questions
Feed My Inbox
updates at feedmyinbox.com
Thu May 6 06:08:34 UTC 2010
==================================================
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:
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)
The Python interpreter tells me I should use a handle in stead of filenames. I use biopython 1.53 and not 1.54b for which this tutorial was meant. I can't find an older archived version of the tutorial I could use to help me learn how to use a handle in stead of the simple filename method (ls_orchid.fasta in this case.). I know that in older versions of biopython you have to do everything in handlers but not in the newer versions.
The new tutorial now on-line has an obscure last chapter on how to use handlers but that's hardly helpfull.
I think the tutorial is great, I just havent got the right version installed. I use Ubuntu and downloaded biopython via ubuntu software center.
Can anyone help me use a handler and get the above parsing example working in 1.53?
Thank you,
http://biostar.stackexchange.com/questions/969/simple-fasta-parsing-is-not-simple
--------------------------------------------------
==================================================
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"
assume these are fastq-illumina quality scores and the sequence is unambiguous dna
I want to create a SeqRecord object from this. Thanks.
http://biostar.stackexchange.com/questions/967/how-do-i-create-a-seqrecord-in-biopython
--------------------------------------------------
===========================================================
Source: http://biostar.stackexchange.com/questions/tagged/biopython
This email was sent to biopython-dev at lists.open-bio.org.
Account Login:
https://www.feedmyinbox.com/members/login/
Don't want to receive this feed any longer? Unsubscribe here: http://www.feedmyinbox.com/feeds/unsubscribe/311791/6ca55937c6ac7ef56420a858404addee7b17d3e7/
-----------------------------------------------------------
This email was carefully delivered by FeedMyInbox.com.
230 Franklin Road Suite 814 Franklin, TN 37064
More information about the Biopython-dev
mailing list