Find genes neighboring to gene of interest
2
1
Entering edit mode
3.8 years ago
poojasethiya ▴ 90

I want to find genes upstream and downstream to gene of my interest based upon the chromosomal co-ordinates. I tried using precede, follow from GRanges package but it does not report the genes which have overlapping co-ordinates (for small genome size, genes are placed very close). How can I get the immediate first neighbor/closest to start and end of my gene.

~Pooja

alignment sequence • 1.8k views
0
Entering edit mode

There are lots of answers on this question already on Biostars. Search for "closest-features" and look at the --closest and --dist options.

1
Entering edit mode
3.8 years ago
EagleEye 6.8k
0
Entering edit mode

BEDTools closest is same as GRanges findOverlap and it just give overlapping genes but not the preceding/succeeding genes. I want very first neighbor it can be overlapping, preceding and succeeding. Is there any way I can get the nearest.

0
Entering edit mode

Hi poojasethiya,

It is not the same. Please read the manual carefully before concluding. In bedtools closest, you can get first gene hit to your reference list by using '-t first'. And for upstream and downstream you can choose '-fu' and '-fd' respectively.

0
Entering edit mode
3.8 years ago

Alternatively you can just reduce all the gene to the transcription start site (or other point of interest) and then use GRanges with the approach you suggest