Finding the nearest n genes from a genomic loci
1
1
Entering edit mode
ssabri ▴ 20
@ssabri-9464
Last seen 4.6 years ago

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 • 867 views
ADD COMMENT
2
Entering edit mode
@michael-lawrence-3846
Last seen 3.0 years ago
United States

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

ADD COMMENT

Login before adding your answer.

Traffic: 857 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6