[ensembl-dev] Any faster ways to obtain STAR SNPs?

Ma, Man Chun John manchunjohn-ma at uiowa.edu
Thu Mar 24 02:54:13 GMT 2011


Hi,

STAR consortium's website is down, and I have to download a bit of their genotyped SNPs to my system. However, the following code yielded no SNPs at all:

my $rat_slice_adaptor=$registry->get_adaptor('rat','core','Slice');
my $var_fea_adaptor=$registry->get_adaptor('rat','variation','variationfeature');
my $pop_adaptor=$registry->get_adaptor('rat','variation','population');

my $rat_17=$rat_slice_adaptor->fetch_by_region('chromosome','17');
my $pop_code=$pop_adaptor->fetch_by_name('STAR:mdc/cng');
my @rat_17_star_gtype;
if ($pop_code){@rat_17_star_gtype=@{$var_fea_adaptor->fetch_all_by_Slice_Population($rat_17,$pop_code)}};

print "No of SNPs: ",scalar(@rat_17_star_gtype);

The only other way I can think of to get this dataset is the following highly inefficient code:

my $rat_slice_adaptor=$registry->get_adaptor('rat','core','Slice');
my $var_fea_adaptor=$registry->get_adaptor('rat','variation','variationfeature');

my $rat_17=$rat_slice_adaptor->fetch_by_region('chromosome','17');
my @genotyped_vars=@{$var_fea_adaptor->fetch_all_genotyped_by_Slice($rat_17)};
my @rat_17_star_gtype;
foreach $single_var(@genotyped_vars){
my @sources=@{$single_var->get_all_sources()};
foreach my $source (@sources){
if ($source eq 'ENSEMBL:STAR/gtype'){
push (@rat_17_star_gtype, $single_var );
last;}
}
}

Are there a slightly more efficient way to do this?

Cheers,

John MC Ma
Graduate Assistant
Department of Pharmacology
The University of Iowa
Iowa City, IA, USA


________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20110324/3ea7e3e2/attachment.html>


More information about the Dev mailing list