grimbough / biomaRt

R package providing query functionality to BioMart instances like Ensembl
https://bioconductor.org/packages/biomaRt/
32 stars 13 forks source link

More robustness against ensemble errors #97

Open Mitmischer opened 4 months ago

Mitmischer commented 4 months ago

Hello,

the gene in question is ENSG00000006062. I can retrieve its full sequence fine, but I cannot retrieve upstream of it (for whatever reason).

The error I get from the website is (https://www.ensembl.org/biomart/martview/73d235843385abf343bae7c7ae330404):

ERROR: caught BioMart::Exception: non-BioMart die(): Can't locate object method "setTable" via package "BioMart::Configuration::Attribute" at /nfs/public/ro/ensweb/live/mart/www_111/biomart-perl/lib/BioMart/Query.pm line 1321.

If you repeatedly get directed to this error page, there may be a problem with your current session parameters. To clear your session and start with a clean slate, please click the New button below.

Stacktrace:
Exception::Class::Base::new /nfs/public/ro/ensweb/live/mart/www_111/ensembl-webcode/biomart-perl/cgi-bin/martview:107
ModPerl::ROOT::ModPerl::Registry::nfs_public_ro_ensweb_live_mart_www_111_ensembl_2dwebcode_biomart_2dperl_cgi_2dbin_martview::handler /nfs/public/ro/ensweb-software/sharedsw/2022_01_17_ct7/linuxbrew/Cellar/perl/5.34.0/lib/perl5/site_perl/5.34.0/x86_64-linux-thread-multi/ModPerl/RegistryCooker.pm:207
(eval) /nfs/public/ro/ensweb-software/sharedsw/2022_01_17_ct7/linuxbrew/Cellar/perl/5.34.0/lib/perl5/site_perl/5.34.0/x86_64-linux-thread-multi/ModPerl/RegistryCooker.pm:207
ModPerl::RegistryCooker::run /nfs/public/ro/ensweb-software/sharedsw/2022_01_17_ct7/linuxbrew/Cellar/perl/5.34.0/lib/perl5/site_perl/5.34.0/x86_64-linux-thread-multi/ModPerl/RegistryCooker.pm:173
ModPerl::RegistryCooker::default_handler /nfs/public/ro/ensweb-software/sharedsw/2022_01_17_ct7/linuxbrew/Cellar/perl/5.34.0/lib/perl5/site_perl/5.34.0/x86_64-linux-thread-multi/ModPerl/Registry.pm:32
ModPerl::Registry::handler -e:0
(eval) -e:0

When trying to get the sequence and one base upstream using biomaRt ...

seq = getSequence(id = "ENSG00000006062",
                  type = "ensembl_gene_id", 
                  seqType = "gene_exon_intron",
                  upstream=1,
                  mart = ensembl)[["gene_exon_intron"]]

... I get the following error:

Error in .processResults(postRes, mart = mart, hostURLsep = sep, fullXmlQuery = fullXmlQuery,  : 
  Query ERROR: caught BioMart::Exception::Usage: Filter upstream_flank NOT FOUND

This error is misleading. I would have expected biomaRt to catch the actual error and print it. Please also consider (especially thinking about larger collection of genes or gene retrieval in a loop) a parameter IGNORE that would make R continue execution upon encountering this error.