Entering edit mode
Tom Oates
▴
60
@tom-oates-5703
Last seen 7.4 years ago
Dear All
I have GRanges objects of transcript information (subject) & for
regions of
interest (query).
Top lines of (subject):
seqnames ranges strand | tx_id
tx_name
<rle> <iranges> <rle> | <integer>
<character>
[1] 1 [5473, 16844] + | 1
ENSRNOT00000044270
[2] 1 [5526, 16968] + | 2
ENSRNOT00000049921
[3] 1 [5526, 16968] + | 3
ENSRNOT00000051735
[4] 1 [5598, 13520] + | 4
ENSRNOT00000034630
[5] 1 [8268, 16850] + | 5
ENSRNOT00000044505
[6] 1 [8316, 17577] + | 6
ENSRNOT00000042693
[7] 1 [8884, 16850] + | 7
ENSRNOT00000044187
[8] 1 [8956, 9955] + | 8
ENSRNOT00000041082
[9] 1 [9055, 17351] + | 9
ENSRNOT00000050254
Top lines of (query):
seqnames ranges strand
<rle> <iranges> <rle>
[1] 10 [ 37958164, 37958165] + |
[2] 7 [ 46598224, 46598225] - |
[3] 1 [ 9627018, 9627019] - |
[4] 9 [ 10158183, 10158184] + |
[5] 2 [185436985, 185436986] + |
[6] 8 [ 93638247, 93638248] - |
[7] 7 [ 68559015, 68559016] - |
[8] 12 [ 10978744, 10978745] + |
[9] 17 [ 33460790, 33460791] - |
and am using the precede command to find the preceeding transcripts to
my
regions of interest
output<-precede(query, subject, ignore.strand=FALSE)
I am aware that the object called "output" is of class integer with
the row
names of "subject" which represent the preceding hits for "query", but
I
have so far been unable to use these row names to end up with a
granges
object with the name of the preceding transcripts as metadata in a
granges
object containing the ranges from "query" i.e something that would
look
like:
[1] 10 [ 37958164, 37958165] + |ENSRNOT00000044270
[[alternative HTML version deleted]]