Entering edit mode
I've gotten myself into a situation where I'd like to use extractAt to pull multiple IRangesList positions from a DNAStringSet. A very simple version of what I'm trying to do would start with:
seqs <- DNAStringSet("ATCGTA")
v01 <- IRangesList(IRanges(start = c(1, 4),
end = c(3, 6)),
IRanges(start = c(1, 3, 5),
end = c(2, 4, 6)))
However this will error out complaining that the lengths are not matched.
v02 <- extractAt(x = seqs, at = v01)
Is there a simple way to perform this kind of operation, returning a DNAStringSetList is likely the goal in the short term.
You could use either of these two options: