[ensembl-dev] fetch_nearest_Gene_by_Feature

Nathan Johnson njohnson at ebi.ac.uk
Wed Oct 3 10:54:24 BST 2012


Also, it would be a great help for me, if you could identify the specific results below which you think are incorrect.

Thanks

Nath


On 2 Oct 2012, at 16:58, Fiona Nielsen wrote:

> Hi Ensembl team,
> 
> I am implementing a function using
> gene_adaptor->fetch_nearest_Gene_by_Feature, but I am getting some
> strange results.
> 
> After generating a Feature object for the position I am interested in,
> I call fetch_nearest_Gene_by_Feature. Looking at the output I do
> indeed retrieve a Gene object per Feature, but I can tell from the
> location of the gene (and double checking in the genome browser) that
> it is not the closest gene to the Feature position. See output example
> below the code.
> 
> How should I interpret this output if it is not the nearest gene?
> Am I giving the wrong input to the function?
> 
> Any help to solve this mystery is appreciated.
> 
> thanks,
> 
> -Fiona-
> 
> *** code snip ***
>    my $BPslice =
> $slice_adaptor->fetch_by_region('chromosome',$chr,$BP1pos,$BP1pos+1);
>    my $feat = new Bio::EnsEMBL::Feature(
>                                         -start  => $BP1pos,
>                                         -end    => $BP1pos,
>                                         -strand => 1,
>                                         -slice  => $BPslice,
>                                        );
>    print "searching for nearest gene to: $BP1chr $BP1pos\n";
> 
>    my $BP1genelist =
> $gene_adaptor->fetch_nearest_Gene_by_Feature($feat); #searching
> downstream (-1)
>    while( $BP1gene = pop(@{$BP1genelist})) {
>      print $BP1gene->stable_id(). ":". $BP1gene->external_name().":".
> $BP1gene->seq_region_name().":". $BP1gene->seq_region_start().":".
> $BP1gene->seq_region_end().":". $BP1gene->strand()."\n";
>    }
> *** end code snip ***
> 
> *** output example ***
> searching for nearest gene to: chr14 1085552
> ENSG00000215398:RP11-754I20.1:14:19109939:19118336:1
> searching for nearest gene to: chr14 20085552
> ENSG00000258526:RP11-111A21.1:14:39944044:39982984:1
> searching for nearest gene to: chr14 20182101
> ENSG00000258526:RP11-111A21.1:14:39944044:39982984:1
> searching for nearest gene to: chr14 52832186
> ENSG00000185024:BRF1:14:105675623:105781926:-1
> searching for nearest gene to: chr14 82832186
> ENSG00000253303:IGHVIII-82:14:107287770:107288019:-1
> searching for nearest gene to: chr14 101536162
> ENSG00000253303:IGHVIII-82:14:107287770:107288019:-1
> searching for nearest gene to: chr14 112907975
> ENSG00000253303:IGHVIII-82:14:107287770:107288019:-1
> searching for nearest gene to: chr14 252907975
> ENSG00000253303:IGHVIII-82:14:107287770:107288019:-1
> *** end output example ***
> 
> 
> -- 
> http://www.cmbi.ru.nl/~fnielsen
> 
> CMBI 260
> Radboud University Nijmegen-Medical Centre / NCMLS
> Geert-Grooteplein 28
> 6525 GA Nijmegen
> 
> Direct Phone: +31(0)24 36 19774
> CMBI Phone: +31(0)24 36 19390
> CMBI Fax: +31 (0)24 36 19395
> www.ncmls.ru.nl/cmbi
> 
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info: http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/

Nathan Johnson
Senior Scientific Programmer
Ensembl Regulation
European Bioinformatics Institute
Wellcome Trust Genome Campus
Hinxton
Cambridge CB10 1SD

http://www.ensembl.info/
http://twitter.com/#!/ensembl










More information about the Dev mailing list