Question: Finding the nearest n genes from a genomic loci
1
gravatar for ssabri
10 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! 

 

 

genomicranges • 171 views
ADD COMMENTlink modified 10 months ago by Michael Lawrence10k • written 10 months ago by ssabri20
Answer: Finding the nearest n genes from a genomic loci
2
gravatar for Michael Lawrence
10 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 10 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 16.09
Traffic: 190 users visited in the last hour