Re: An example to query PMID given GEO accession number?

"Smithies, Russell" <[email protected]> Mon, 15 Jun 2015 02:34:46 +0000
Newsgroups gmane.comp.lang.perl.bio.general
Message-ID <9B1F872E353E2440A97EEDB9F072B406BE626CF5@invexcpv01.agresearch.co.nz>
OK, I think I see what the problem is ;-)

This is the correct Pubmed link with a Pubmed UID: http://www.ncbi.nlm.nih.gov/pubmed/?term=23028701[uid] 
This is a link to the paper but with a GDS UID: http://www.ncbi.nlm.nih.gov/gds/?term=200039684[uid]

Not exactly sure how you'd convert between the two (elink maybe?) , but looks like it's giving the same answer.

--Russell

-----Original Message-----
From: Peng Yu [mailto:[email protected]] 
Sent: Monday, 15 June 2015 1:58 p.m.
To: Smithies, Russell
Cc: Fields, Christopher J; [email protected]
Subject: Re: [Bioperl-l] An example to query PMID given GEO accession number?

On Sun, Jun 14, 2015 at 8:33 PM, Smithies, Russell <[email protected]> wrote:
> You need to specify you want to use history - it doesn't do it by default.
>
> my $factory = Bio::DB::EUtilities->new(
>         -eutil   => 'esearch',
>         -db      => 'gds',
>         -term    => "${geo}[ACCN] AND (gse[ETYP] OR gds[ETYP])",
>         -email   => '[email protected]',
>         -usehistory => 'y',   <<<<============
> );

I still can't get the correct result (it should be 23028701). Could you try the code and see if it works on your machine?

$ ./main.pl
Query translation: GSE39684[ACCN] AND gse[ETYP] Count = 1
200039684
$ cat main.pl
#!/usr/bin/env perl

use strict;
use warnings;
use autodie;

use FindBin;
use lib "$FindBin::Bin/.";
use Bio::DB::EUtilities;

# want to get PMID 23028701
my $geo        = "GSE39684";
my $factory = Bio::DB::EUtilities->new(
  -eutil   => 'esearch',
  -db      => 'gds',
  #-term    => "${geo}[ACCN] AND (gse[ETYP] OR gds[ETYP])", # whether
I use this line or the following line, the result is the same.
  -term    => "${geo}[ACCN] AND (gse[ETYP])",
  -email   => '[email protected]',
  -usehistory => 'y',
);

# query terms are mapped; what's the actual query?
print "Query translation: ",$factory->get_query_translation,"\n";
# query hits
print "Count = ",$factory->get_count,"\n"; # UIDs my @ids = $factory->get_ids; print "@ids\n";


--
Regards,
Peng
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.