How to find the distance between the integration site and gene
1
0
Entering edit mode
seeker • 0
@seeker-7773
Last seen 2.8 years ago
Netherlands

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
36905


gene reference file

Gene Strand Chr Start End
Bcr + 10 75060895 75184923

 

hiAnnotator genomicranges • 1.5k views
ADD COMMENT
0
Entering edit mode
@michael-lawrence-3846
Last seen 3.0 years ago
United States

Not sure about hiAnnotator, but please see ?distanceToNearest.

ADD COMMENT
0
Entering edit mode

tried distanceToNearest, but it does not gives the orientation of the position. For eg if it is  upstream or downstream apart from the gene.

ADD REPLY
0
Entering edit mode

That is fairly easy to determine once you have the hits. For example,

precedes <- function(x, y) {
    seqnames(x) == seqnames(y) &
        ifelse(strand(y) == "-", start(x) > end(y), end(x) < start(y))
}

follows <- function(x, y) {
    seqnames(x) == seqnames(y) &
        ifelse(strand(y) == "-", end(x) < start(y), start(x) > end(y))
}

precedes(sites[queryHits(hits)], genes[subjectHits(hits)])

Does anyone know if something like this exists already? I could work on a general solution...

ADD REPLY
0
Entering edit mode

Michael, could you please explain this

ADD REPLY

Login before adding your answer.

Traffic: 1006 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