[Bioperl-l] more on RemoteBlast.pm version 1.28

Guojun Yang gyang at plantbio.uga.edu
Mon Feb 13 21:00:11 UTC 2006


Thanks, Chris,
I installed version 1.5.1 and replaced the blast.pm file with the one from your bug report. The running version is 1.5 when I use the command you sent me. But when I tried the script, it doesn't change much. My remoteblast code (portion) is here:

sub search {
local $Bio::Tools::Run::RemoteBlast::HEADER{'ENTREZ_QUERY'}="$ORGN";
local $Bio::Tools::Run::RemoteBlast::HEADER{'WORD_SIZE'}=7;
local $Bio::Tools::Run::RemoteBlast::HEADER{'HITLIST_SIZE'}=5000;
local $Bio::Tools::Run::RemoteBlast::HEADER{'COMPOSITION_BASED_STATISTICS'}= 'no';
local $Bio::Tools::Run::RemoteBlast::HEADER{'GAPCOSTS'}='3 1';
my $query = Bio::Seq -> new ( -seq=>"$_[0]",
			      -id=>"query",
			      -desc=>"new seq");
my $len=$query->length();
@db=('nr','htgs','wgs');
foreach my $db (@db) {
my $factory = Bio::Tools::Run::RemoteBlast->new('-prog' =>'blastn',
						'-data' =>"$db",
					        '-expect'=>"$E_value");


my $blast_report = $factory->submit_blast($query);

my @rids = $factory->each_rid();
foreach my $rid ( @rids ) {
    print STDERR "$rid\n";
}
# RID = Remote Blast ID (e.g: 1017772174-16400-6638)
print STDERR "waiting...";
sleep 60;

foreach my $rid ( @rids ) {
    my $rc = $factory->retrieve_blast($rid);
    while (!ref($rc) ) {
	if( $rc < 0 ) {
# retrieve_blast returns -1 on error
	    $factory->remove_rid($rid);
	    print "Error!\n";
	    send_error($email,$function,$seqname,$queryname[$ST]);
	    die "Can't retrieve $rid";
	} if ($rc==0) { # retrieve_blast returns 0 on 'job not finished'
	    sleep 60;
	    $rc = $factory->retrieve_blast($rid);
	}	
    }
    if (ref($rc)) {
	print STDERR "Done.\n";
	 while( my $result = $rc->next_result) {
	    while( my $hit = $result->next_hit()) {
	    	$hit_name=$hit->name;
		$hit_name =~ /\S+[|](\S+)[.]\d+[|].*/;
		$name=$1;
		@left_plus_start=();
		@left_plus_end=();
		@left_minus_start=();
		@left_minus_end=();
		@right_plus_start=();
		@right_plus_end=();
		@right_minus_start=();
		@right_minus_end=();

		if (!($name =~ /^[a-zA-Z][a-zA-Z]\_\d{6}/i)) {
		while( my $hsp = $hit->next_hsp()) { 
......

It was working quite well before around October laster year, but it has stopped since then, When a submission is sent via a webpage, the cgi starts to work and use a memory of ~20 Mb. Then it hangs there, finally the expected email is received but without real results although it does contain something from other parts of the script. Apparently the search sub did not return anything (I know there is something should be returned.). Is it also possible the format of the NCBI output for each result has changed?
Thank you,
Guojun


Department of Plant Biology
University of Georgia



----- Original Message -----
From: Chris Fields [mailto:cjfields at uiuc.edu]
To: gyang at plantbio.uga.edu, bioperl-l at lists.open-bio.org
Subject: RE: [Bioperl-l] more on RemoteBlast.pm version 1.28


> How do you know two versions are installed (i.e. how are you checking the
> version)?  Do you see have two complete bioperl distributions (in two
> separate directories) or are you looking in modules?  Here's the way to
> check the version (from the FAQ):
> > perl -MBio::Root::Version -e 'print $Bio::Root::Version::VERSION,"\n"'
> > If you have two full bioperl distributions on your computer, normally only
> one will be in use unless you have explicitly set the environment variable
> PERL5LIB.  The PERL5LIB  directories will be searched first before your
> normal perl directory list (@INC) is searched.  You MAY get some mixing
> then, but only if perl can't find a particular module in the path designated
> in PERL5LIB; then it will progress through the directories listed in @INC.
> This may happen if a module is unique to a particular release, but shouldn't
> happen for the majority of modules, including RemoteBlast.  You can check
> what @INC and PERL5LIB are set to by using 'perl -V'.  @INC will differ
> depending on your OS, perl build, etc.
> > Regardless, if you follow the directions for installing bioperl for your
> system ('perl Makefile.PL', 'make', 'make test', 'make install', unless you
> explicitly change the installation directory when using 'perl Makefile.PL'),
> then 'uninstalling' Bioperl shouldn't be a problem as it will install the
> Bioperl distribution you downloaded over the old version in @INC.  See this
> page:
> > http://bioperl.open-bio.org/SRC/bioperl-live/INSTALL
> > for more details.
> > Christopher Fields
> Postdoctoral Researcher - Switzer Lab
> Dept. of Biochemistry
> University of Illinois Urbana-Champaign 
> > > > -----Original Message-----
> > From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
> > bounces at lists.open-bio.org] On Behalf Of Guojun Yang
> > Sent: Monday, February 13, 2006 12:32 PM
> > To: bioperl-l at lists.open-bio.org
> > Subject: [Bioperl-l] more on RemoteBlast.pm version 1.28
> > > > Hi, Chris,
> > I do have different versions of bioperl on my Linux machine (1.4. and
> > 1.5.0), this may be the problem. Should I just install bioperl-1.5.1 or I
> > need to uninstall and remove the previous versions. I could not find any
> > hint on uninstalling bioperl on linux. Could you please give me some
> > suggestion?
> > Thanks,
> > Guojun
> > > > Department of Plant Biology
> > University of Georgia
> >       _____
> > > >   From: Chris Fields [mailto:cjfields at uiuc.edu]
> > To: gyang at plantbio.uga.edu, bioperl-l at lists.open-bio.org
> > Sent: Mon, 13 Feb 2006 11:45:14 -0500
> > Subject: RE: [Bioperl-l] more question regarding RemoteBlast.pm version
> > 1.28
> > > > > > > > If you're using RemoteBlast 1.28, then you've likely updated from CVS
> > which isn't the latest fix.
> > > > Make sure that you check the following:
> > > > 1) Always post to the mailing list:
> > http://www.bioperl.org/wiki/HOWTO:Beginners#Getting_Assistance .
> > > > 2) You must have the complete bioperl-1.5.1 or bioperl-live (CVS)
> > installed first.  Perform a clean installation; do not upgrade only
> > Bio::SearchIO::blast and Bio::Tools::Run::RemoteBlast, as we can't
> > guarantee that mixing modules from old and new distributions (1.4 and
> > 1.5.1, for instance) will work.  A bioperl-1.5.1 or bioperl-live
> > installation will allow text output from BLAST v.2.2.12 to be saved and
> > parsed; it will not parse the newest BLAST text output from NCBI (v2.2.13)
> > but it should still save it. I believe as long as next_results() isn't
> > called, it will work.
> > > > 3) The bug fixes for the above issue with parsing BLAST 2.2.13 text output
> > are NOT in CVS; they haven't been cleared and checked in by Roger Hall
> > (who's now taking care of RemoteBlast) and the powers that be (Jason or
> > whomever is in charge of Bio::SearchIO).  They can be found in Bugzilla:
> > > > http://bugzilla.bioperl.org/show_bug.cgi?id=1934
> > http://bugzilla.bioperl.org/show_bug.cgi?id=1935
> > > > The fix in RemoteBlast in Bugzilla (#1935) is to allow the option of
> > saving XML output, so isn't necessary if you don't plan on using this
> > option.  And, remember, they haven't been committed yet to CVS, which
> > means that the final version will change to refle the new version.
> > > > > > Christopher Fields
> > Postdoctoral Researcher - Switzer Lab
> > Dept. of Biochemistry
> > University of Illinois Urbana-Champaign
> > > > > >     _____
> > > > > > From: Guojun Yang [mailto:gyang at plantbio.uga.edu]
> > Sent: Monday, February 13, 2006 9:26 AM
> > To: Chris Fields
> > Subject: RE: [Bioperl-l] more question regarding RemoteBlast.pm version
> > 1.28
> > > > > > Hi, Chris
> > > > Thanks for your suggestion, however, it doesn't seem to work for my cgi
> > even after I replace both blast.pm and RemoteBlast.pm. I didn't even get
> > any RID. Is there any suggestion?
> > > > > > > > Guojun
> > > > > > Guojun Yang
> > Department of Plant Biology
> > University of Georgia
> > Tel: 706-542-1857
> > Fax: 706-542-1805
> > http://www.arches.uga.edu/~guojun
> >     _____
> > > > > > From: Chris Fields [mailto:cjfields at uiuc.edu]
> > To: gyang at plantbio.uga.edu, bioperl-l at bioperl.org
> > Sent: Fri, 03 Feb 2006 16:07:29 -0500
> > Subject: RE: [Bioperl-l] more question regarding RemoteBlast.pm version
> > 1.28
> > > > I would say give the new code a try, but realize that it hasn't been
> > checked
> > in (like I said below). I will try going over the modified
> > Bio::SearchIO::blast again this weekend to see if there is anything I
> > might
> > have missed. The changed order in the header of BLAST text output has me a
> > bit worried that it might not catch everything, but it at least doesn't
> > hang
> > in the while() loop I described in the bug report below (bug #1934) and
> > seems to process everything fine.
> > > > If you want more stability in the code, you might consider changing over
> > to
> > XML output and parsing with Bio::SearchIO::blastxml. There are some
> > changes
> > in Bio::Tools::Run::RemoteBlast (bug #1935) that accommodate saving XML
> > output, but I believe it parses everything regardless. If you look back
> > the
> > last month or so there has been a bit of discussion here about it. Jason
> > describes a bit on how to set up RemoteBlast for XML:
> > > > http://bioperl.org/news/2005/11/06/getting-blastxml-using-remoteblast/
> > > > Christopher Fields
> > Postdoctoral Researcher - Switzer Lab
> > Dept. of Biochemistry
> > University of Illinois Urbana-Champaign
> > > > > -----Original Message-----
> > > From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
> > > bounces at lists.open-bio.org] On Behalf Of Guojun Yang
> > > Sent: Friday, February 03, 2006 1:45 PM
> > > To: bioperl-l at bioperl.org
> > > Subject: [Bioperl-l] more question regarding RemoteBlast.pm version 1.28
> > >
> > > Hi, Everybody,
> > > I see this post and am wondering if this is the reason for the
> > > malfunctionning of my webserver. We set up a webserver named MAK, for
> > MITE
> > > sequence analysis. It was working very well until around November 2005,
> > > when it stopped returning any result (the site is fine and seems to be
> > > doing sth after submission). In the CGI script, I used remoteblast (that
> > > work was done in 2003) to do searches. I currently do not have access to
> > > the server because I moved. Quite several people sent emails to us about
> > > its malfunctioning. Is there any suggestion on fixing the problem?
> > Should
> > > I simplily ask the remoteblast.pm be replaced with the new version?
> > > Thanks a lot,
> > > Guojun
> > >
> > > Department of Plant Biology
> > > University of Georgia
> > > Tel: 706-542-1857
> > > Fax: 706-542-1805
> > > http://www.arches.uga.edu/~guojun
> > > _____
> > >
> > > From: Chris Fields [mailto:cjfields at uiuc.edu]
> > > To: 'Nagesh Chakka' [mailto:nagesh.chakka at anu.edu.au], 'Huang Jian'
> > > [mailto:hjian at kuicr.kyoto-u.ac.jp], 'bioperl-l' [mailto:bioperl-
> > > l at bioperl.org]
> > > Sent: Fri, 03 Feb 2006 10:45:23 -0500
> > > Subject: Re: [Bioperl-l] RemoteBlast.pm version 1.28
> > >
> > > Like Nagesh says, try the latest RemoteBlast from bioperl-live CVS. It
> > > will
> > > work for saving text output. However, it will not parse anything using
> > > next_result (it will likely hang) and will not save XML format. See
> > these
> > > bugs:
> > >
> > > http://bugzilla.bioperl.org/show_bug.cgi?id=1934
> > > http://bugzilla.bioperl.org/show_bug.cgi?id=1935
> > >
> > > for explanations and possible fixes (changes to RemoteBlast and
> > > Bio::SearchIO::blast). Note that these haven't been checked in yet so
> > are
> > > still not included in bioperl-live; they may be further modified before
> > > committing to CVS. If you're not worried about XML, you could just try
> > the
> > > first fix, which is a change to SearchIO::blast.
> > >
> > > Nagesh, I remember you posting to the list a month ago using a script
> > > which
> > > had problems; the script you used saves the output but doesn't actually
> > > parse it (i.e. you don't use next_result() to go through the data). Is
> > the
> > > version of BLAST in your text output 2.2.12 or 2.2.13? Have you tried
> > > parsing the output using "-readmethod => SearchIO" or "-readmethod =>
> > > blast"
> > > using your version of RemoteBlast and method next_result()? Like below
> > > (from
> > > perldoc):
> > >
> > > while ( my @rids = $factory->each_rid ) {
> > > foreach my $rid ( @rids ) {
> > > my $rc = $factory->retrieve_blast($rid);
> > > if( !ref($rc) ) {
> > > if( $rc < 0 ) {
> > > $factory->remove_rid($rid);
> > > }
> > > print STDERR "." if ( $v > 0 );
> > > sleep 5;
> > > } else { # parsing
> > > starts here
> > > my $result = $rc->next_result(); # it should hang
> > > here
> > > #save the output
> > > my $filename = $result->query_name()."\.out";
> > > $factory->save_output($filename);
> > > $factory->remove_rid($rid);
> > > print "\nQuery Name: ", $result->query_name(), "\n";
> > > while ( my $hit = $result->next_hit ) {
> > > next unless ( $v > 0);
> > > print "\thit name is ", $hit->name, "\n";
> > > while( my $hsp = $hit->next_hsp ) {
> > > print "\t\tscore is ", $hsp->score, "\n";
> > > }
> > > }
> > > }
> > > }
> > > }
> > > }
> > >
> > >
> > > My script hanged if I used next_result() in any way prior to the fixes.
> > I
> > > want to see how many others are having the same issues with parsing
> > using
> > > the CVS version of bioperl-live.
> > >
> > > Christopher Fields
> > > Postdoctoral Researcher - Switzer Lab
> > > Dept. of Biochemistry
> > > University of Illinois Urbana-Champaign
> > >
> > > > -----Original Message-----
> > > > From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
> > > > bounces at lists.open-bio.org] On Behalf Of Nagesh Chakka
> > > > Sent: Thursday, February 02, 2006 7:24 PM
> > > > To: Huang Jian; bioperl-l
> > > > Subject: Re: [Bioperl-l] RemoteBlast.pm version 1.28
> > > >
> > > > Hi Huang,
> > > > Thanks for the message. The older version of RemoteBlast.pm works on
> > the
> > > > logic of checking the temporary file size to determine whether the
> > Blast
> > > > results are ready. This condition is not getting satisfied may be due
> > to
> > > > some changes brought about by NCBI. I had this problem recently and
> > > > figured out that the solution was to use the latest version which has
> > > > this problem fixed (does not use file size logic any more) which is
> > not
> > > > yet included in the BioPerl package.
> > > > Cheers
> > > > Nagesh
> > > >
> > > > Huang Jian wrote:
> > > >
> > > > > Dear Nagesh,
> > > > >
> > > > > I have replaced my old RemoteBlast.pm (v 1.17) with v 1.28 you send
> > > > > me. Now it works perfectly!!!
> > > > >
> > > > > Thank you!!
> > > > >
> > > > > Huang
> > > > >
> > > > > ----- Original Message ----- From: "Nagesh Chakka"
> > > > > <nagesh.chakka at anu.edu.au>
> > > > > To: "Huang Jian" <hjian at kuicr.kyoto-u.ac.jp>; "bioperl-l"
> > > > > <bioperl-l at bioperl.org>
> > > > > Sent: Friday, February 03, 2006 7:48 AM
> > > > > Subject: Re: [Bioperl-l] Sorry, failure in post on the net, so still
> > > > > via email
> > > > >
> > > > >
> > > > >> Hi Huang,
> > > > >> I see that you are submitting a sequence for a remote blast search.
> > > Can
> > > > >> you check if the RemoteBlast.pm being used is v 1.28 (2005/12/09).
> > If
> > > > >> not I have attached it with this email, try to replace it with the
> > > old
> > > > >> one which has a bug.
> > > > >> Let me know if it works.
> > > > >> Nagesh
> > > > >
> > > > >
> > > > >
> > > >
> > > > _______________________________________________
> > > > Bioperl-l mailing list
> > > > Bioperl-l at lists.open-bio.org
> > > > http://lists.open-bio.org/mailman/listinfo/bioperl-l
> > >
> > > _______________________________________________
> > > Bioperl-l mailing list
> > > Bioperl-l at lists.open-bio.org
> > > http://lists.open-bio.org/mailman/listinfo/bioperl-l
> > >
> > >
> > >
> > > _______________________________________________
> > > Bioperl-l mailing list
> > > Bioperl-l at lists.open-bio.org
> > > http://lists.open-bio.org/mailman/listinfo/bioperl-l
> > > > > > > > > > > > > > > > > > > > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at lists.open-bio.org
> > http://lists.open-bio.org/mailman/listinfo/bioperl-l
> > 




More information about the Bioperl-l mailing list