Hi, I have recently updated my R and am now getting an error message when I attempt to convert a GRanges value to a RangesList. This never happened in the older versions. Does anyone know a way around this? I'm using known human polyA sites. Here is a quick snippet of the code I've been using:
ax1 = data.frame(reducedHumanPas, stringsAsFactors = F) ax1p = ax1[ax1$strand == "+",] ax1pr = makeGRangesFromDataFrame(ax1p, keep.extra.columns=TRUE, ignore.strand=FALSE, seqinfo=seq_info_object1, seqnames.field="seqnames", start.field="start", end.field="end", strand.field="strand", starts.in.df.are.0based=F) ax1n = ax1[ax1$strand == "-",] ax1nr = makeGRangesFromDataFrame(ax1n, keep.extra.columns=TRUE, ignore.strand=FALSE, seqinfo=seq_info_object1, seqnames.field="seqnames", start.field="start", end.field="end", strand.field="strand", starts.in.df.are.0based=F) wp = as(ax1pr, "RangesList") wn = as(ax1nr, "RangesList") Error in as(ax1pr, "RangesList") : no method or default for coercing “GRanges” to “RangesList”
The above is the error code I receive when I try and execute the final two commands. Is there a way around this? Many thanks.
Is there such a class as
RangesList
? Do you meanGRangesList
?Yes, RangesList is a thing. The Views() function could take an RLE coverage object and a RangesList, and return coverages on the ranges. I have a bunch of code to find coverage on regions that's all broken now because I can't convert GRanges to RangesList. Like hicklingmeb, I'm looking for whatever is the modern solution.