#4576: [with spkg; needs work] biopython optional package upgrade to 1.49beta
------------------------------------------+---------------------------------
Reporter: mhampton | Owner: mabshoff
Type: enhancement | Status: new
Priority: minor | Milestone: sage-3.2.1
Component: optional packages | Resolution:
Keywords: biopython, optional packages |
------------------------------------------+---------------------------------
Comment (by mhampton):
I don't have an account on sage.math, maybe its time to get one. Right
now I'm in Thunder Bay, Ontario, so my options are more limited than
usual. I could also try to write something remove all the cruft - perhaps
I could delete every file starting with "._"?
The distributed biopython test suite is in the Tests folder of the spkg, I
think it is not installed currently into sage. To run it you just do
"python run_tests.py" within the biopython/Tests directory.
Here are some simple things to do:
{{{
Search for nucleotide records of Salvia divinorum (sage of the seers):
from Bio import Entrez, SeqIO
Entrez.email = "[EMAIL PROTECTED]" # Always tell NCBI who you are
handle = Entrez.esearch(db="Nucleotide", term="salvia divinorum")
record = Entrez.read(handle)
record["IdList"]
['113715469', '113715388', '111119918', '81230846', '81230845',
'46326321', '1695982', '349139']
}}}
Take the first record found above and get its GenBank file, parse it, and
read the description:
{{{
from Bio import Entrez, SeqIO
Entrez.email = "[EMAIL PROTECTED]" # Always tell NCBI who you are
handle = Entrez.efetch(db="nucleotide", id="113715469", rettype="genbank")
rec = SeqIO.parse(handle,'genbank')
x = rec.next()
x.description
'Salvia divinorum isolate x093 tRNA-Leu (trnL) gene and trnL-trnF
intergenic spacer, partial sequence; chloroplast.'
}}}
or check its taxononomy:
{{{
x.annotations['taxonomy']
['Eukaryota', 'Viridiplantae', 'Streptophyta', 'Embryophyta',
'Tracheophyta', 'Spermatophyta', 'Magnoliophyta', 'eudicotyledons',
'core eudicotyledons', 'asterids', 'lamiids', 'Lamiales', 'Lamiaceae',
'Nepetoideae', 'Mentheae', 'Salvia']
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4576#comment:4>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---