[BioPython] biopython and dbSNP (2)

Teemu Kuulasmaa Teemu.Kuulasmaa at uku.fi
Tue Mar 28 06:59:27 UTC 2006


Hi,

I made some experimentations and got GenBank.search_for() and 
GenBank.download_many() to work with dbSNP. However, I didn't succeed to 
get GenBank.NCBIDictionary() to work. I do not know if this is right way 
to do it. It would by nice if someone (biopython-dev) could speak out on 
the matter.

Here are two very small diffs (against biopython version 1.41) that were 
required to get dbSNP sequence retrieval to work:
----------------------------------------------------------
ubuntu at ubuntu:~/src/biopython$ diff 
/usr/lib/python2.4/site-packages/Bio/EUtils/Config.py Config.py
58c58
< databases.SNP = _add_db(DatabaseInfo("snp", 1))

ubuntu at ubuntu:~/src/biopython$ diff 
/usr/lib/python2.4/site-packages/Bio/GenBank/__init__.py __init__.py
1422,1423d1421
<     elif database in ['snp']:
<         format = 'fasta'


This is example how it works after these modifications:
----------------------------------------------------------
ubuntu at ubuntu:~$ python
Python 2.4.2 (#2, Mar  5 2006, 00:03:25)
[GCC 4.0.3 20060212 (prerelease) (Ubuntu 4.0.2-9ubuntu1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> from Bio import GenBank
 >>> snps = GenBank.search_for('rs8192602', 'snp')
 >>> snps
['8192602']
 >>> seqs = GenBank.download_many(snps, 'snp')
 >>> print seqs.read()

1: rs8192602 [Homo sapiens]
 >gnl|dbSNP|rs8192602 
rs=8192602|pos=272|len=397|taxid=9606|mol="genomic"|class=1|alleles="A/G"|build=117
TGGCAGAGTG GGGAGTAGGA GGGTAGTGCC AGTGAGTAAA CCAGACTCCA TACCTTAAGC 
TCAACTCCTA TCCCTTTGTC
GCCTCCCAAC CCCAGTCATG GCTGAGTACG GGACCCTCCT GCAAGACCTG ACCAACAACA 
TCACCCTTGA AGATCTAGAA
CAGCTCAAGT CGGCCTGCAA GGAAGACATC CCCAGCGAAA AGAGTGAGGA GATCACTACT 
GGCAGTGCCT GGTTTAGCTT
CCTGGAGAGC CACAACAAGC TGGACAAAGG T
R
GGGGAGGGGA GCACAGGGGT CCTGTCATCA GTCATTCAGG CTCAGTTCAT TCAGCAAATA 
GAGATGAGCT CAAAGCTTTT
ACATCCACAA TGTGTACCCC TCTATAGCAA GGCAGAAGAG AGGTG



Best regards,

Teemu Kuulasmaa






More information about the Biopython mailing list