This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Intergenic distance

I want to find size of intergenic distance /size to flanking gene(including gene part) for list of my genes

e.g.,

chrX   1   10   geneA
chrX.  15   20    geneB
chrX     25.     40.  geneC

I want output like this

geneA chrX   1   15  15  
geneB chrX   10  25   15
geneC  chrX    20   40   20

Does anyone know easier way to do that?

gff gene

1 answer

I've used bedtools closest for something like this before. See documentation here https://bedtools.readthedocs.io/en/latest/content/tools/closest.html

Requires a bed file of all genes in your genome of interest. You'll want to use the -io flag (ignore overlaps).

Log in to answer this question.