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

"Smithies, Russell" <[email protected]> Wed, 17 Jun 2015 01:21:18 +0000
Newsgroups gmane.comp.lang.perl.bio.general
Message-ID <9B1F872E353E2440A97EEDB9F072B406BE628CC1@invexcpv01.agresearch.co.nz>
Not sure as it's not something I've done.
Submit them one at a time maybe?

--Russell

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

> Have you been reading the documentation? Then elink example provided on the bioperl wiki should do most of what you want.
> http://www.bioperl.org/wiki/HOWTO:EUtilities_Cookbook#elink
>
> Also docs at NCBI so you can create your own URLs then 'manually' pull 
> in results then parse the XML 
> http://www.ncbi.nlm.nih.gov/books/NBK25500/
>
> ------------------------------------------
> use Bio::DB::EUtilities;
>
> my @ids     = qw(200039684 200039685);

When there are GDS IDs (e.g., 200069227) without Pubmed IDs, the lengths of $ds->get_submitted_ids and $ds->get_ids will be different.
In this the pair information will be lost. How to keep the pair information? (I am not sure if this is addressed in the cookbook.)

> my $factory = Bio::DB::EUtilities->new(-eutil  => 'elink',
>                                        -email  => '[email protected]',
>                                        -db     => 'pubmed',
>                                        -dbfrom => 'gds',
>                                        -id     => \@ids);
>
> # iterate through the LinkSet objects
> while (my $ds = $factory->next_LinkSet) {
>     print " Link name: ",$ds->get_link_name,"\n";
>     print "Pubmed IDs: ",join(',',$ds->get_submitted_ids),"\n";

The above should be GDS IDs.

>     print "   GDS IDs: ",join(',',$ds->get_ids),"\n";

The above should be Pubmed IDs.

> }

--
Regards,
Peng