Hello

I want to calculate the distance between HumanMethylation450k probes
and their nearest TSS using refseq hg19 genes, in such a way that if
the probe is downstream from the TSS the distance will be assigned a
positive value, and if the probe is upstream from the TSS, the
distance will be assigned a negative value. The idea is that both
strands will be considered.

The distance is to be positive if the nearest TSS is either on the '+
strand and its coordinate is greater than the probe's, or of the
nearest TSS is on the '-' strand and its coordinate is smaller than
the probe's.

likewise, the distance is to be negative if the nearest TSS is on the
'+' strand and its coordinate is smaller than the probe's or on the
'-' strand and its coordinate is grater then the probe's.

It may be possible to do this with transcripts(), but unfortunately my
dat is not on TranscriptDb
<http://127.0.0.1:37980/help/library/GenomicFeatures/help/TranscriptDb>
objects.

Is there a way to this using the distanceToNearest method of GRanges?



thanks

Dolev Rahat

	[[alternative HTML version deleted]]

