I guess one issue is if we clamp the lower bound to be 1, what about the
upper bound? extendReads() will probably need an 'end' argument, and then
for the sake of symmetry a 'start' argument.

e.g. extendReads(extendReads <- function(reads, seqLen=200, strand = c("+",
"-"), start = 1L, end = NA)

The question is though, does extendReads really need to worry about this, or
can the user simply call restrict() on the output? In many cases, the user
does not care about extending off the end of e.g. a huge chromosome.

Michael

On Wed, Feb 10, 2010 at 1:34 AM, Nora Rieber <n.rieber@dkfz-heidelberg.de>wrote:

> Dear all,
>
> has anybody noticed that extendReads() seems to extend reads on the
> minus strand below zero? For example, if I have a 36 nt read starting at
> base 215 on the minus strand, and use extendReads(aln, seqLen=350), aln
> being an object of class AlignedRead, my resulting extended read runs
> from base -96 to base 251.
>
> I loosely remember this being an issue discussed on one of the BioC or
> bio-sig-seq mailing lists, but I'm not sure if it was about this
> specific function and I couldn't find the thread any more - I'm sorry if
> this has been discussed already and would be thankful for a hint.
>
> This is my sessionInfo():
>
>
> > > sessionInfo()
> >
> R version 2.10.0 (2009-10-26)
> x86_64-unknown-linux-gnu
>
> locale:
>  [1] LC_CTYPE=de_DE.UTF-8       LC_NUMERIC=C
>  [3] LC_TIME=de_DE.UTF-8        LC_COLLATE=de_DE.UTF-8
>  [5] LC_MONETARY=C              LC_MESSAGES=de_DE.UTF-8
>  [7] LC_PAPER=de_DE.UTF-8       LC_NAME=C
>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
> [11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] chipseq_0.3.1     ShortRead_1.4.0   lattice_0.17-26   BSgenome_1.14.1
> [5] Biostrings_2.14.5 IRanges_1.4.9
>
> loaded via a namespace (and not attached):
> [1] Biobase_2.6.0 grid_2.10.0   hwriter_1.1   tools_2.10.0
>
> Best,
> Nora
>
>
>
> _______________________________________________
> Bioc-sig-sequencing mailing list
> Bioc-sig-sequencing@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
>
>

	[[alternative HTML version deleted]]

