Hi Manjula, Thanks for providing the information, we will test it here and update you what we found out.
Best regards, Junjun From: Manjula Dharmawardhana <[email protected]<mailto:[email protected]>> Date: Tue, 26 Jul 2011 10:14:20 -0400 To: jzhang <[email protected]<mailto:[email protected]>> Cc: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: Re: [BioMart Users] Any solution for connect:timeout Hi All, I am getting the timeout error, "Problems with the web server: 500 Can't connect to www.sanger.ac.uk:80<http://www.sanger.ac.uk/> (connect: timeout)" most of the time. Here is my Registry file; <?xml version="1.0" encoding="UTF-8"?> <!-- <!DOCTYPE MartRegistry> --> <MartRegistry> <MartURLLocation database="cosp" default="1" displayName="COSMIC (SANGER UK)" host="www.sanger.ac.uk<http://www.sanger.ac.uk>" includeDatasets="" martUser="" name="CosmicMart" path="/genetics/CGP/cosmic/biomart/martservice" port="80" redirect="1" serverVirtualSchema="default" visible="1" /> </MartRegistry> Here is my code #!/usr/local/bin/perl use strict; use lib '/home/manjula/biomart-perl/lib'; use BioMart::Initializer; use BioMart::Query; use BioMart::QueryRunner; my $confFile ="/home/manjula/TestMart/cosmicRegistry.xml"; print "Starting API\n"; print "using cached registry build\n"; my $action='cached'; my $initializer = BioMart::Initializer->new('registryFile'=>$confFile, 'action'=>$action); my $registry = $initializer->getRegistry; my $query = BioMart::Query->new('registry'=>$registry,'virtualSchemaName'=>'default'); $query->setDataset("COSMIC54"); $query->addFilter("samp_gene_mutated", ["y"]); $query->addFilter("site_primary", ["liver"]); $query->addFilter("tumour_source", ["recurrent"]); $query->addAttribute("sample_name"); $query->addAttribute("sample_source"); $query->addAttribute("tumour_source"); $query->addAttribute("gene_name"); $query->addAttribute("accession_number"); $query->addAttribute("site_primary"); $query->addAttribute("hist_primary"); $query->addAttribute("pubmed_pmid"); $query->formatter("TSV"); my $query_runner = BioMart::QueryRunner->new(); ############################## GET COUNT ############################ $query->count(1); $query_runner->execute($query); #my $resultNo= print $query_runner->getCount(); #if ($resultNo>0) { #print "Count is $resultNo\n"; #} else { #print "No results\n"; #} ##################################################################### ############################## GET RESULTS ########################## # to obtain unique rows only print "Getting unique rows\n"; $query_runner->uniqueRowsOnly(1); $query_runner->execute($query); $query_runner->printHeader(); $query_runner->printResults(); $query_runner->printFooter(); ##################################################################### Strange thing is that, I get the timeout error when I use a clean registry build. When I use the cached registry I get this error, 1Getting unique rows Can't call method "getDisplayNames" on an undefined value at /home/manjula/biomart-perl/lib/BioMart/QueryRunner.pm line 281. Here 1 is the number of rows, then my print, after that the error. But I do not get it all the time. Only getting it most of the time. How can make this more reliable Any help is greatly appreciated. Thanking in advance Manjula This communication (including any attachments) is intended for the use of the intended recipient only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify [email protected]<mailto:[email protected]> by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.
_______________________________________________ Users mailing list [email protected] https://lists.biomart.org/mailman/listinfo/users
