[Bioc-devel] seq*apply deprecation
Hi Michael,
On 01/12/2014 05:16 AM, Michael Lawrence wrote:
Hi, It may be time to deprecate the seq*apply family of functions, including seqapply, mseqapply, tseqapply, seqby and seqsplit. These are ancient functions named in referece to the "Sequence" class, now called "Vector". It would seem better for the user to write: asList(lapply(...)) instead of coming up with an alias for that. For readability, we should probably export asList() as an alias for as(x, "List"), which I just cleaned up.
Sounds good to me.
There is one caveat though: mseqapply has been particularly useful, because it delegates to mapply_List, which is smart enough to handle any vector argument in "...". The mapply,List method of course restricts everything to List. We should probably export mapply_List, probably with a better name. Suggestions?
Why do we need all this?
x <- RleList(11:14, 3:1)
Then:
> IRanges:::mapply_List(function(a, b) {a+b}, x, 10)
[[1]]
numeric-Rle of length 4 with 4 runs
Lengths: 1 1 1 1
Values : 21 22 23 24
[[2]]
numeric-Rle of length 3 with 3 runs
Lengths: 1 1 1
Values : 13 12 11
But also:
> base::mapply(function(a, b) {a+b}, x, 10)
[[1]]
numeric-Rle of length 4 with 4 runs
Lengths: 1 1 1 1
Values : 21 22 23 24
[[2]]
numeric-Rle of length 3 with 3 runs
Lengths: 1 1 1
Values : 13 12 11
What am I missing?
Thanks,
H.
Michael [[alternative HTML version deleted]]
_______________________________________________ Bioc-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
Herv? Pag?s Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M1-B514 P.O. Box 19024 Seattle, WA 98109-1024 E-mail: hpages at fhcrc.org Phone: (206) 667-5791 Fax: (206) 667-1319