[Bioperl-l] eutils help

Chris Fields cjfields at illinois.edu
Tue Dec 7 17:44:01 UTC 2010


The 'brief' return type format for dbSNP gives something like this (see below).  XML output (changing 'retmode' to XML instead of text) give much more information.

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

my $term = shift;
my $eutil  = Bio::DB::EUtilities->new(-eutil    => 'esearch',
                                      -db       => 'snp',
                                      -email    => 'foo at bar.org',
                                      -term     => $term,
                                      -usehistory => 'y',
                                      -retmax   => 100);

my $hist = $eutil->next_History || die "No history returned";

$eutil->set_parameters(-eutil   => 'efetch',
                       -history => $hist,
                       -retmode => 'text',
                       -rettype => 'brief');

print $eutil->get_Response->content."\n";


chris

On Dec 6, 2010, at 11:16 AM, kris richardson wrote:

> Dear Bioperl Users,
> 
> I am interested in generating the flanking sequences (20 nt from each side) from a list of ~500,000 SNPs, from the dbSNP build 132.    
> 
> I tried using the perl API variation toolset to extract this information, however the script throws an error when it encounters many of the recently discovered SNPs (from the 1000genomes data), as this tool is still using the dbSNP 131 data.   
> 
> I read the bipoerl eUtils tool  might be used to obtain this info, but I can not find any example code in which the dbSNP data is queried...   Does any one have any pointers or examples on how one might use efetch and eUtils  to obtain the flanking sequence for a list of SNP rs #s?  
> 
> 
> Thanks!
> 
> Kris
> _______________________________________________
> 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