[Bioperl-l] Error when using EUtilities to download elink with parameter LinkName=gene_pubmed

Chris Fields cjfields at illinois.edu
Fri Jun 11 03:48:37 UTC 2010


Limit the IDs down to a specific dbfrom-db link using -linkname, otherwise it assumes all links and just gloms everything together (yes, pretty helpful of them).  Here's the link for those:  

http://eutils.ncbi.nlm.nih.gov/corehtml/query/static/entrezlinks.html

Make sure to use your real email if you aren't already (you'll likely be IP banned otherwise).

chris

#!/usr/bin/env perl

use strict;
use warnings;
use Bio::DB::EUtilities;

my $factory = Bio::DB::EUtilities->new(
 -eutil => 'elink',
 -db => 'pubmed',
 -dbfrom => 'gene',
 -linkname => 'gene_pubmed',
 -email => 'mymail at foo.bar',
 -id => 6476,
);

print join(',', $factory->get_ids), "\n"

On Jun 10, 2010, at 10:27 PM, Peng Yu wrote:

> Hi,
> 
> I'm trying to get the pubmed ids from the following link. I use the
> code pasted at the end of the mail (the output is pasted as well).
> Note that more ids than necessary are returned. Then I try to use the
> option -dbfrom='gene_pubmed'. But it raises exceptions. Could you let
> me know how to get the correct download of the ids in the following
> page by bioperl EUtilities?
> 
> http://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?db=gene&LinkName=gene_pubmed&from_uid=6476
> 
> -- 
> Regards,
> Peng
> 
> $ cat main.pl
> #!/usr/bin/env perl
> 
> use strict;
> use warnings;
> use Bio::DB::EUtilities;
> 
> my $factory = Bio::DB::EUtilities->new(
>  -eutil => 'elink',
>  -db => 'pubmed',
>  -dbfrom => 'gene',
>  -email => 'mymail at foo.bar',
>  -id => 6476,
> );
> 
> print join(',', $factory->get_ids), "\n";
> print $factory->get_Response->content;
> 
> $ ./main.pl
> 19416921,19121318,17194452,16802690,16543230,16344560,16329100,15944403,15522234,14724820,12477932,11340066,11329013,11003604,10903344,9092938,8609217,8521865,7566098,3925457,3896809,3178143,2962903,1717481,1677636,1560017,1353958,16329100,14724820,14276572,11340066,10903344,8648532,8648527,8609217,8576798,8118103,7371476,6357634,6082247,5848222,5436545,5333958,5075694,5041318,5015965,4952790,4742566,4579420,4164045,3925457,3807985,3553946,3403721,3178143,2962903,1717481,1560017,1353958,1256470,19121318,17194452,16802690,16543230,16329100,15944403,15522234,8521865
> <?xml version="1.0"?>
> <!DOCTYPE eLinkResult PUBLIC "-//NLM//DTD eLinkResult, 10 August
> 2009//EN" "http://www.ncbi.nlm.nih.gov/entrez/query/DTD/eLink_090910.dtd">
> <eLinkResult>
> 
> 	<LinkSet>
> 		<DbFrom>gene</DbFrom>
> 		<IdList>
> 			<Id>6476</Id>
> 		</IdList>
> 		<LinkSetDb>
> 			<DbTo>pubmed</DbTo>
> 			<LinkName>gene_pubmed</LinkName>
> 			<Link>
> 				<Id>19416921</Id>
> 			</Link>
> 			<Link>
> 				<Id>19121318</Id>
> 			</Link>
> 			<Link>
> 				<Id>17194452</Id>
> 			</Link>
> 			<Link>
> 				<Id>16802690</Id>
> 			</Link>
> 			<Link>
> 				<Id>16543230</Id>
> 			</Link>
> 			<Link>
> 				<Id>16344560</Id>
> 			</Link>
> 			<Link>
> 				<Id>16329100</Id>
> 			</Link>
> 			<Link>
> 				<Id>15944403</Id>
> 			</Link>
> 			<Link>
> 				<Id>15522234</Id>
> 			</Link>
> 			<Link>
> 				<Id>14724820</Id>
> 			</Link>
> 			<Link>
> 				<Id>12477932</Id>
> 			</Link>
> 			<Link>
> 				<Id>11340066</Id>
> 			</Link>
> 			<Link>
> 				<Id>11329013</Id>
> 			</Link>
> 			<Link>
> 				<Id>11003604</Id>
> 			</Link>
> 			<Link>
> 				<Id>10903344</Id>
> 			</Link>
> 			<Link>
> 				<Id>9092938</Id>
> 			</Link>
> 			<Link>
> 				<Id>8609217</Id>
> 			</Link>
> 			<Link>
> 				<Id>8521865</Id>
> 			</Link>
> 			<Link>
> 				<Id>7566098</Id>
> 			</Link>
> 			<Link>
> 				<Id>3925457</Id>
> 			</Link>
> 			<Link>
> 				<Id>3896809</Id>
> 			</Link>
> 			<Link>
> 				<Id>3178143</Id>
> 			</Link>
> 			<Link>
> 				<Id>2962903</Id>
> 			</Link>
> 			<Link>
> 				<Id>1717481</Id>
> 			</Link>
> 			<Link>
> 				<Id>1677636</Id>
> 			</Link>
> 			<Link>
> 				<Id>1560017</Id>
> 			</Link>
> 			<Link>
> 				<Id>1353958</Id>
> 			</Link>
> 		</LinkSetDb>
> 		<LinkSetDb>
> 			<DbTo>pubmed</DbTo>
> 			<LinkName>gene_pubmed_citedinomim</LinkName>
> 			<Link>
> 				<Id>16329100</Id>
> 			</Link>
> 			<Link>
> 				<Id>14724820</Id>
> 			</Link>
> 			<Link>
> 				<Id>14276572</Id>
> 			</Link>
> 			<Link>
> 				<Id>11340066</Id>
> 			</Link>
> 			<Link>
> 				<Id>10903344</Id>
> 			</Link>
> 			<Link>
> 				<Id>8648532</Id>
> 			</Link>
> 			<Link>
> 				<Id>8648527</Id>
> 			</Link>
> 			<Link>
> 				<Id>8609217</Id>
> 			</Link>
> 			<Link>
> 				<Id>8576798</Id>
> 			</Link>
> 			<Link>
> 				<Id>8118103</Id>
> 			</Link>
> 			<Link>
> 				<Id>7371476</Id>
> 			</Link>
> 			<Link>
> 				<Id>6357634</Id>
> 			</Link>
> 			<Link>
> 				<Id>6082247</Id>
> 			</Link>
> 			<Link>
> 				<Id>5848222</Id>
> 			</Link>
> 			<Link>
> 				<Id>5436545</Id>
> 			</Link>
> 			<Link>
> 				<Id>5333958</Id>
> 			</Link>
> 			<Link>
> 				<Id>5075694</Id>
> 			</Link>
> 			<Link>
> 				<Id>5041318</Id>
> 			</Link>
> 			<Link>
> 				<Id>5015965</Id>
> 			</Link>
> 			<Link>
> 				<Id>4952790</Id>
> 			</Link>
> 			<Link>
> 				<Id>4742566</Id>
> 			</Link>
> 			<Link>
> 				<Id>4579420</Id>
> 			</Link>
> 			<Link>
> 				<Id>4164045</Id>
> 			</Link>
> 			<Link>
> 				<Id>3925457</Id>
> 			</Link>
> 			<Link>
> 				<Id>3807985</Id>
> 			</Link>
> 			<Link>
> 				<Id>3553946</Id>
> 			</Link>
> 			<Link>
> 				<Id>3403721</Id>
> 			</Link>
> 			<Link>
> 				<Id>3178143</Id>
> 			</Link>
> 			<Link>
> 				<Id>2962903</Id>
> 			</Link>
> 			<Link>
> 				<Id>1717481</Id>
> 			</Link>
> 			<Link>
> 				<Id>1560017</Id>
> 			</Link>
> 			<Link>
> 				<Id>1353958</Id>
> 			</Link>
> 			<Link>
> 				<Id>1256470</Id>
> 			</Link>
> 		</LinkSetDb>
> 		<LinkSetDb>
> 			<DbTo>pubmed</DbTo>
> 			<LinkName>gene_pubmed_rif</LinkName>
> 			<Link>
> 				<Id>19121318</Id>
> 			</Link>
> 			<Link>
> 				<Id>17194452</Id>
> 			</Link>
> 			<Link>
> 				<Id>16802690</Id>
> 			</Link>
> 			<Link>
> 				<Id>16543230</Id>
> 			</Link>
> 			<Link>
> 				<Id>16329100</Id>
> 			</Link>
> 			<Link>
> 				<Id>15944403</Id>
> 			</Link>
> 			<Link>
> 				<Id>15522234</Id>
> 			</Link>
> 			<Link>
> 				<Id>8521865</Id>
> 			</Link>
> 		</LinkSetDb>
> 	</LinkSet>
> </eLinkResult>
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l





More information about the Bioperl-l mailing list