To Do in Biskit.Mod.SequenceSearcher.SequenceSearcher.remoteBlast
- Remote Blasting is running as expected but sequences are still
retrieved from a local database. Implement remote collection of fasta
seuqences from NCBI (there should be something like in Biopython).
Otherwise something like this will also work:
## collect the entry with gi 87047648
url = 'http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?CMD=text&db=protein&dopt=FASTA&dispmax=20&uid=87047648'
import urllib
handle = urllib.urlopen(url)
lines = handle.readlines()
seq = ''
for i in range(len(lines)):
if re.match( "[<]pre[>][<]div class='recordbody'[>]{2}gi", l[i] ):
i+= 1
while not re.match( "^[<]/pre[>][<]/div[>]", l[i]):
seq += l[i][:-1]
i+= 1
print seq
|