[biomart-users] Phytozome biomart perl API connection issue

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[biomart-users] Phytozome biomart perl API connection issue

Joy Doong
Hi, 

I am having problem connecting to phytozome biomart, even though I can connect to ensembl. If anyone could help me figure what is wrong it would be much appreciated.

I copied the information off here: https://phytozome.jgi.doe.gov/biomart/martservice?type=registry and made the configuration file.

Then I used the script generated by the phytozome biomart site:

 An example script demonstrating the use of BioMart API.
# This perl API representation is only available for configuration versions >=  0.5 
use strict;
use BioMart::Initializer;
use BioMart::Query;
use BioMart::QueryRunner;

my $confFile = "../conf/registryPhytozome.xml";
#
# NB: change action to 'clean' if you wish to start a fresh configuration  
# and to 'cached' if you want to skip configuration step on subsequent runs from the same registry
#

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("phytozome");
$query->addFilter("gene_name_filter", ["AT1G05210"]);
$query->addAttribute("gene_name1");
$query->addAttribute("transcript_name1");
$query->addAttribute("peptide_sequence");

$query->formatter("FASTA");



Then this is the error message I am getting:


Cached Registry Unavailable...

Running Complete Clean...

Connection parameters of [Current Phytozome] [ OK ]

Connection parameters of [Sequences] [ OK ]

Connection parameters of [Genome_Archive] [ OK ]

Connection parameters of [Sequence_Archive] [ OK ]

Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: phytozome_mart

Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: phytozome_mart


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: sequence_mart


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust


               No datasets available with given parameters for Location: sequence_mart


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: phytozome_mart_archive

Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: phytozome_mart_archive


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: sequence_mart_archive


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust


               No datasets available with given parameters for Location: sequence_mart_archive

 Problems with the retrieval of dataset configuration 

               Please check: 

               that your mart Registry files contains correct connection params, 

               that you are using the correct version on XML::Simple, 

               that BioMart  databases contain a populated meta_conf tables and

               that you have set martUser correctly if you are running in restricted data 

               access mode (populated meta_conf__user__dm)


Does anyone know what I should do?


Thanks!

--
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/biomart-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [biomart-users] Phytozome biomart perl API connection issue

Arek Kasprzyk
Hi Joy,

You may find that using REST web service is far easier and more efficient than perl API. I suggest you try it instead

a.

On 17 October 2016 at 07:19, Joy Doong <[hidden email]> wrote:
Hi, 

I am having problem connecting to phytozome biomart, even though I can connect to ensembl. If anyone could help me figure what is wrong it would be much appreciated.

I copied the information off here: https://phytozome.jgi.doe.gov/biomart/martservice?type=registry and made the configuration file.

Then I used the script generated by the phytozome biomart site:

 An example script demonstrating the use of BioMart API.
# This perl API representation is only available for configuration versions >=  0.5 
use strict;
use BioMart::Initializer;
use BioMart::Query;
use BioMart::QueryRunner;

my $confFile = "../conf/registryPhytozome.xml";
#
# NB: change action to 'clean' if you wish to start a fresh configuration  
# and to 'cached' if you want to skip configuration step on subsequent runs from the same registry
#

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("phytozome");
$query->addFilter("gene_name_filter", ["AT1G05210"]);
$query->addAttribute("gene_name1");
$query->addAttribute("transcript_name1");
$query->addAttribute("peptide_sequence");

$query->formatter("FASTA");



Then this is the error message I am getting:


Cached Registry Unavailable...

Running Complete Clean...

Connection parameters of [Current Phytozome] [ OK ]

Connection parameters of [Sequences] [ OK ]

Connection parameters of [Genome_Archive] [ OK ]

Connection parameters of [Sequence_Archive] [ OK ]

Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: phytozome_mart

Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: phytozome_mart


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: sequence_mart


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust


               No datasets available with given parameters for Location: sequence_mart


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: phytozome_mart_archive

Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: phytozome_mart_archive


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: sequence_mart_archive


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust


               No datasets available with given parameters for Location: sequence_mart_archive

 Problems with the retrieval of dataset configuration 

               Please check: 

               that your mart Registry files contains correct connection params, 

               that you are using the correct version on XML::Simple, 

               that BioMart  databases contain a populated meta_conf tables and

               that you have set martUser correctly if you are running in restricted data 

               access mode (populated meta_conf__user__dm)


Does anyone know what I should do?


Thanks!

--
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/biomart-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/biomart-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [biomart-users] Phytozome biomart perl API connection issue

Joy Doong
Hi, 

I am still hoping that there is a way to resolve the perl API problem, but if it doesn't seem likely I am definitely open to other options. I will give your suggestion a try. Thank you!

Joy


On Tuesday, October 18, 2016 at 6:21:31 AM UTC-7, Arek Kasprzyk wrote:
Hi Joy,

You may find that using REST web service is far easier and more efficient than perl API. I suggest you try it instead

a.

On 17 October 2016 at 07:19, Joy Doong <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="PMw-OR8pBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jdo...@...> wrote:
Hi, 

I am having problem connecting to phytozome biomart, even though I can connect to ensembl. If anyone could help me figure what is wrong it would be much appreciated.

I copied the information off here: <a href="https://phytozome.jgi.doe.gov/biomart/martservice?type=registry" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fphytozome.jgi.doe.gov%2Fbiomart%2Fmartservice%3Ftype%3Dregistry\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFHSMFmOp7EO5Nr5S0Ez_ptCt8HNA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fphytozome.jgi.doe.gov%2Fbiomart%2Fmartservice%3Ftype%3Dregistry\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFHSMFmOp7EO5Nr5S0Ez_ptCt8HNA&#39;;return true;">https://phytozome.jgi.doe.gov/biomart/martservice?type=registry and made the configuration file.

Then I used the script generated by the phytozome biomart site:

 An example script demonstrating the use of BioMart API.
# This perl API representation is only available for configuration versions >=  0.5 
use strict;
use BioMart::Initializer;
use BioMart::Query;
use BioMart::QueryRunner;

my $confFile = "../conf/registryPhytozome.xml";
#
# NB: change action to 'clean' if you wish to start a fresh configuration  
# and to 'cached' if you want to skip configuration step on subsequent runs from the same registry
#

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("phytozome");
$query->addFilter("gene_name_filter", ["AT1G05210"]);
$query->addAttribute("gene_name1");
$query->addAttribute("transcript_name1");
$query->addAttribute("peptide_sequence");

$query->formatter("FASTA");



Then this is the error message I am getting:


Cached Registry Unavailable...

Running Complete Clean...

Connection parameters of [Current Phytozome] [ OK ]

Connection parameters of [Sequences] [ OK ]

Connection parameters of [Genome_Archive] [ OK ]

Connection parameters of [Sequence_Archive] [ OK ]

Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: phytozome_mart

Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: phytozome_mart


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: sequence_mart


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust


               No datasets available with given parameters for Location: sequence_mart


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: phytozome_mart_archive

Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: phytozome_mart_archive


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: sequence_mart_archive


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust


               No datasets available with given parameters for Location: sequence_mart_archive

 Problems with the retrieval of dataset configuration 

               Please check: 

               that your mart Registry files contains correct connection params, 

               that you are using the correct version on XML::Simple, 

               that BioMart  databases contain a populated meta_conf tables and

               that you have set martUser correctly if you are running in restricted data 

               access mode (populated meta_conf__user__dm)


Does anyone know what I should do?


Thanks!

--
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="PMw-OR8pBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">biomart-user...@googlegroups.com.
Visit this group at <a href="https://groups.google.com/group/biomart-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/biomart-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/biomart-users&#39;;return true;">https://groups.google.com/group/biomart-users.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/biomart-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[biomart-users] Re: Phytozome biomart perl API connection issue

joe carlson
In reply to this post by Joy Doong
Hello Joy,

I'm sorry to hear that you are having trouble with our biomart service. I believe the source of the problem is that the JGI is using https for all web traffic. (This was not the decision of my group; it is a requirement of our service provider.)

I was able to get your query to work. This is my conf file:

<MartRegistry>
  <MartURLLocation database="phytozome_mart_v11_0_8" default="1" displayName="Current Phytozome" host="phytozome.jgi.doe.gov" includeDatasets="phytozome,phytozome_clusters" martUser="" name="phytozome_mart" path="/biomart/martservice" port="443" serverVirtualSchema="zome_mart" visible="1" />
  <MartURLLocation database="sequence_mart_v11_0_8" default="" displayName="Sequences" host="phytozome.jgi.doe.gov" includeDatasets="sequence_phytozome" martUser="" name="sequence_mart" path="/biomart/martservice" port="443" serverVirtualSchema="zome_mart" visible="0" />
</MartRegistry>

(the important thing is that the port is 443 and not the regular port 80). Arek might correct me, but I do not see how to specify using https in the configuration file. What I did was to edit BioMart::Configuration::URLLocation::_new (line 60 in the version I have) to read:

  $self->dsn("https://".$self->host.":".$self->port.$self->path."?");

with this change your script worked.

Let me know if you're still having trouble,

Joe Carlson

To the code maintainers: can https be given as an option? Or can the dsn default to https if its on port 443?

On Monday, October 17, 2016 at 12:31:32 AM UTC-7, Joy Doong wrote:
Hi, 

I am having problem connecting to phytozome biomart, even though I can connect to ensembl. If anyone could help me figure what is wrong it would be much appreciated.

I copied the information off here: <a href="https://phytozome.jgi.doe.gov/biomart/martservice?type=registry" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fphytozome.jgi.doe.gov%2Fbiomart%2Fmartservice%3Ftype%3Dregistry\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFHSMFmOp7EO5Nr5S0Ez_ptCt8HNA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fphytozome.jgi.doe.gov%2Fbiomart%2Fmartservice%3Ftype%3Dregistry\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFHSMFmOp7EO5Nr5S0Ez_ptCt8HNA&#39;;return true;">https://phytozome.jgi.doe.gov/biomart/martservice?type=registry and made the configuration file.

Then I used the script generated by the phytozome biomart site:

 An example script demonstrating the use of BioMart API.
# This perl API representation is only available for configuration versions >=  0.5 
use strict;
use BioMart::Initializer;
use BioMart::Query;
use BioMart::QueryRunner;

my $confFile = "../conf/registryPhytozome.xml";
#
# NB: change action to 'clean' if you wish to start a fresh configuration  
# and to 'cached' if you want to skip configuration step on subsequent runs from the same registry
#

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("phytozome");
$query->addFilter("gene_name_filter", ["AT1G05210"]);
$query->addAttribute("gene_name1");
$query->addAttribute("transcript_name1");
$query->addAttribute("peptide_sequence");

$query->formatter("FASTA");



Then this is the error message I am getting:


Cached Registry Unavailable...

Running Complete Clean...

Connection parameters of [Current Phytozome] [ OK ]

Connection parameters of [Sequences] [ OK ]

Connection parameters of [Genome_Archive] [ OK ]

Connection parameters of [Sequence_Archive] [ OK ]

Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: phytozome_mart

Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: phytozome_mart


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: sequence_mart


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust


               No datasets available with given parameters for Location: sequence_mart


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: phytozome_mart_archive

Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: phytozome_mart_archive


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust

               No datasets available with given parameters for Location: sequence_mart_archive


Problems with the web server: 500 Can't verify SSL peers without knowing which Certificate Authorities to trust


               No datasets available with given parameters for Location: sequence_mart_archive

 Problems with the retrieval of dataset configuration 

               Please check: 

               that your mart Registry files contains correct connection params, 

               that you are using the correct version on XML::Simple, 

               that BioMart  databases contain a populated meta_conf tables and

               that you have set martUser correctly if you are running in restricted data 

               access mode (populated meta_conf__user__dm)


Does anyone know what I should do?


Thanks!

--
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/biomart-users.
For more options, visit https://groups.google.com/d/optout.