[BioPython] NCBIWWW.blast(): how to get text formatted output

Frank Kauff fkauff at duke.edu
Thu Sep 25 09:22:03 EDT 2003


On Mon, 2003-09-22 at 13:24, Jeffrey Chang wrote:
> On Thursday, September 18, 2003, at 05:43  PM, Peter Maxwell wrote:
> 
> > On Friday, September 19, 2003, at 04:15 AM, Frank Kauff wrote:
> >> does anybody know which is the correct value for format_type in
> >> NCBIWWW.blast() to get a plain text output?
> >
> > 'Text' , but last time I tried (a long while ago) NCBIWWW.blast() lost 
> > it somewhere along the way, which one reason why I wrote 
> > http://www.biolateral.com.au/download/NCBI.py.
> 
> Can you double check to see if NCBIWWW.blast was/is losing options?  It 
> would be a pretty serious error, but I cannot see where that might be 
> happening.

It seems the options are not lost. If I print the options just before
they are passed to the Entrez handle in Bio.WWW.NCBI._open(), I get

SERVICE=plain&QUERY_FROM=&NCBI_GI=on&CMD=Put&PROGRAM=blastn&DESCRIPTIONS=100
&FORMAT_OBJECT=alignment&ALIGNMENT_VIEW=Pairwise&AUTO_FORMAT=on&QUERY_TO=
&SHOW_OVERVIEW=yes&ENTREZ_QUERY=%28none%29&EXPECT=10&I_THRESH=0.001
&FORMAT_TYPE=html&LAYOUT=OneWindow&DATABASE=nr&GENETIC_CODE=1&FILTER=L
&CLIENT=web&CDD_SEARCH=on&WORD_SIZE=11
&QUERY=%3EABUL1x%0ATGGC.....GGT%0A&ALIGNMENTS=500&PAGE=Nucleotides

with default options and if I call it with

bres=NCBIWWW.blast('blastn','nr',record,format_type='Text')

I get

SERVICE=plain&QUERY_FROM=&NCBI_GI=on&CMD=Put&PROGRAM=blastn&DESCRIPTIONS=100
&FORMAT_OBJECT=alignment&ALIGNMENT_VIEW=Pairwise&AUTO_FORMAT=on&QUERY_TO=
&SHOW_OVERVIEW=yes&ENTREZ_QUERY=%28none%29&EXPECT=10&I_THRESH=0.001
&FORMAT_TYPE=Text&LAYOUT=OneWindow&DATABASE=nr&GENETIC_CODE=1&FILTER=L
&CLIENT=web&CDD_SEARCH=on&WORD_SIZE=11
&QUERY=%3EABUL1x%0ATGGC...GGT&ALIGNMENTS=50&PAGE=Nucleotides

Frank

> 
> Thanks,
> Jeff
> 
> _______________________________________________
> BioPython mailing list  -  BioPython at biopython.org
> http://biopython.org/mailman/listinfo/biopython
-- 
Frank Kauff
Dept. of Biology
Duke University
Box 90338
Durham, NC 27708
USA

Phone 919-660-7382
Fax 919-660-7293



More information about the BioPython mailing list