[BiO BB] how to visit NCBI Blast and get the plain text result using script

Mike Marchywka marchywka at hotmail.com
Wed Mar 21 08:07:12 EDT 2007


I did that originally before finding out about eutils- it is good practice 
but the eutils
support is definitely the way to go. They even have examples. I have some 
scripts I can
send you or see my prior posts ( I was using an address from eyewonder.com 
in the past).
In any case, see some of these links:
UTILS="http://www.ncbi.nlm.nih.gov/entrez/eutils"
UTILS="http://eutils.ncbi.nlm.nih.gov/entrez/eutils"
#http://eutils.ncbi.nlm.nih.gov/entrez/query/static/esearch_help.html
#http://www.ncbi.nlm.nih.gov/entrez/query/static/help/helpdoc.html
ESEARCH="$UTILS/esearch.fcgi?tool=biotechmarchywka&email=marchywka at hotmail.com&db=$db&retmax=1&usehistory=y$EXTRASTUFF&${THETERM}="
efetch="$UTILS/efetch.fcgi?tool=biotechmarchywka&email=marchywka at hotmail.com&rettype=$report&retmode=$retmode&retstart=$retstart&retmax=$retmax&db=$db&query_key=$QueryKey&WebEnv=$WebEnv"

This compares well to trying to use their web interface:
RLFORM="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?CMD=search&DB=pubmed"
POSTDATA="WebEnv=0tkD70MRHDOu0sYn3uzuCoQig9Q1pFy0V7rMPPSVjt2KvOTKNujp&db=pubmed&orig_db=pubmed&term=dna&inputpage=3&cmd=search&cmd_current="
LYNXCMD="lynx -accept_all_cookies -cookie_file=${OLDCOOKIES} 
-cookie_save_file=${COOKIEJAR} -dump -post_data"
echo ${POSTDATA} |${LYNXCMD} ${URLFORM}


But these approaches diverge even more when you actually try to use the 
results- structured abstracts in a tractable format versus trying to parse 
html... I think their web interface does have
a text format but this still is only a partial solution.
http://www.ncbi.nlm.nih.gov/entrez/queryd.fcgi?CMD=search&DB=pubmed


( note new address as of 10-06)
Mike Marchywka
586 Saint James Walk
Marietta GA 30067-7165r
( NOTE MORE NEWER  NUMBER )
404-788-1216 (C)<- leave message
989-348-4796 (P)<- emergency only





>From: "Dr. Christoph Gille" <christoph.gille at charite.de>
>Reply-To: "General Forum at Bioinformatics.Org" 
><bio_bulletin_board at bioinformatics.org>
>To: "General Forum at Bioinformatics.Org" 
><bio_bulletin_board at bioinformatics.org>
>Subject: Re: [BiO BB] how to visit NCBI Blast and get the plain text result 
>using script
>Date: Wed, 21 Mar 2007 11:00:13 +0100 (CET)
>
>I have done this EBI blast and
>I guess that it is also easily possible with NCBI.
>You can get it in computer readable form (XML) or in
>human readable form.
>Your script needs to send the POST data i.e. the
>query sequence and the other settings.
>Check the man pages of wget or w3m for this.
>Depending on your favorite computer language you
>can use tool-kits. They make thinks much more convenient
>for you. I would highly recomend to use one of those.
>Python: Biopython,
>Perl: Bioperl,
>Java: STRAP, Biojava
>Ruby: BioRuby
>Good luck!
>Christoph
>
>_______________________________________________
>General Forum at Bioinformatics.Org - BiO_Bulletin_Board at bioinformatics.org
>https://bioinformatics.org/mailman/listinfo/bio_bulletin_board

_________________________________________________________________
Exercise your brain! Try Flexicon. 
http://games.msn.com/en/flexicon/default.htm?icid=flexicon_hmemailtaglinemarch07




More information about the BBB mailing list