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

Shah, Nirav niravs at bcm.edu
Wed Jun 1 18:26:08 CEST 2011


Please unsubscribe me from this list.

Thanks,
Nirav Shah

-----Original Message-----
From: bioc-sig-sequencing-bounces at r-project.org [mailto:bioc-sig-sequencing-bounces at r-project.org] On Behalf Of Michael Lawrence
Sent: Wednesday, June 01, 2011 11:25 AM
To: Ivan Gregoretti
Cc: bioc-sig-sequencing at r-project.org
Subject: Re: [Bioc-sig-seq] Like subseq() but with the ability to accept a vector of starts

On Wed, Jun 1, 2011 at 9:06 AM, Ivan Gregoretti <ivangreg at gmail.com> wrote:

> 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)
>
>
So you would expect a DNAStringSet back? That is a little strange:
subsetting a DNAString into a DNAStringSet. Perhaps you really want some way
to "split" the DNAString into pieces.

In this case, I would suggest using Views. You can use breakIntoChunks in
order to form the ranges component.

Michael

Thank you
>
> Ivan
>
> _______________________________________________
> Bioc-sig-sequencing mailing list
> Bioc-sig-sequencing at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
>

	[[alternative HTML version deleted]]

_______________________________________________
Bioc-sig-sequencing mailing list
Bioc-sig-sequencing at r-project.org
https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing



More information about the Bioc-sig-sequencing mailing list