Hello,
I am trying to annotate my integration file with the nearest gene names and distance to the nearest gene (upstream and downstream) using hiAnnotator [nearestGenes <- getNearestFeature(alldata.rd, genes.rd ,"NearestGene")].
In the annotation file i could get the the nearest gene name and the distance to my integration, but i assume the distance is calculated from the midpoint of the gene coordinates (start+stop/2).
If i look at the output file, for the insertion Ins1 at Chr10:75097800, which is actually present with in the boundary of Bcr gene, the distance to the gene is showing 36905 [expected output is Dist 0]. Is there any way by which we can get the distance taking boundary into consideration?
output
Integration | Chrom | Pos | Strand | Gene | Dist | |
Ins1 | 10 | 75097800 | + | Bcr |
|
gene reference file
Gene | Strand | Chr | Start | End |
Bcr | + | 10 | 75060895 | 75184923 |
tried distanceToNearest, but it does not gives the orientation of the position. For eg if it is upstream or downstream apart from the gene.
That is fairly easy to determine once you have the hits. For example,
Does anyone know if something like this exists already? I could work on a general solution...
Michael, could you please explain this