Code Used to Work Not Working anymore
I had a granges object. The problem was a lot of times one range with the same feature type, entrezgene_id and etc ended right before another range with the same feature type. For example, two exons one 1-100 the next at 100-500 in these cases I used the following code to store this as exon 1-500 but the code bellow does not work anymore and gives me the error: "Error in getListElement(x, i, ...) : IRanges objects don't support [[, as.list(), lapply(), or unlist() at the moment".
Can someone please help me with this problem? Is there an alternative to this solution?
all.df[, as.data.table(reduce(IRanges(start, end))), by = .(seqnames, strand,entrezgene_id, gene_name, feature_type, exon_name)
• 236 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Can you provide some example data in your post?
Suppose we have:
I want to get
Your example data has 6 header values but 7 columns, and your example result has 8 columns.