[Bioc-sig-seq] Like subseq() but with the ability to accept a vector of starts

Ivan Gregoretti ivangreg at gmail.com
Wed Jun 1 18:06:16 CEST 2011


Hello IRanges connoisseurs,

Is there a function like subseq() but with the ability to accept a
vector of starts?


For instance, if I want to chop the beginning of the murine
mitochondrial DNA into 50 nucleotides, I'd do

library(BSgenome.Mmusculus.UCSC.mm9)

subseq(Mmusculus[["chrM"]], start=1,   width=50)
subseq(Mmusculus[["chrM"]], start=51,  width=50)
subseq(Mmusculus[["chrM"]], start=101, width=50)
...

however, it would be more convenient something like this

subseq(Mmusculus[["chrM"]], start=c(1,51,101), width=50)

Thank you

Ivan



More information about the Bioc-sig-sequencing mailing list