Hello,
I have a following question. I am using GRanges in R 3.1.1 (everything up to date).
What I am trying to do with it:
1) Store coordinates of exons with coupled variables calculated in previous steps, i.e. all Rattus norvegicus Rn4 exons with respective PSI values (Percent Spliced-In) for analysis of splicing. The exons were selected and the list contains only ~ 10.000 of them.
2) Using getSeq I fetched sequences of certain length upstream from the exon and downstream which are appended into columns for every given exon.
Up to this point I had no problems whatsoever. However, now for some operations I would like to subset some of the exons. When I do, using subset(PSIranges,PSIranges$PSI.deltaWTKO < 0.05) to select entries with values of delta PSI < 0.05 I get a following warning:
Warning message: In valid.GenomicRanges.seqinfo(x) : 'ranges' contains values outside of sequence bounds. See ?trim to subset ranges.
Does any one have an idea why this warnings kicks in only after subsetting the GRanges object ? Ultimately, I just want to return certain number of rows from the "PSIranges" GRanges object. How come the warning arises in such situation ?
I don't want to leave it as it is. I would be very thankful for any help. In case it's needed, I can share the GRanges object saved in a repository to clone into.
Best,
Piotr
Can you share the code with us?
Which part exactly ? The script is a bit large and would be harder to read. I can show the part where I create the GRanges object, fetch flanking sequences and append the sequence as metadata in the GRanges object ?