Search
Question: Finding the nearest n genes from a genomic loci
1
gravatar for ssabri
8 months ago by
ssabri20
ssabri20 wrote:

I am aware of the nearest() function but I believe this is limited to finding the nearest single gene to a loci. Is there a way to compute the n nearest genes for a genomic loci? I ultimately want to do this for a genomicranges object that is segmented into approximately 3 million non-overlapping ranges/bins. These loci are defined by binning a chromosome into 200bp windows. Thank you! 

 

 

ADD COMMENTlink modified 8 months ago by Michael Lawrence10k • written 8 months ago by ssabri20
2
gravatar for Michael Lawrence
8 months ago by
United States
Michael Lawrence10k wrote:

There is a hidden function GenomicRanges:::findKNN() that might do the trick. It's largely untested so let me know whether it works.

ADD COMMENTlink written 8 months ago by Michael Lawrence10k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 156 users visited in the last hour