[BioC] Elementwise appending of List elements?

Ryan C. Thompson rct at thompsonclan.org
Thu Jun 19 00:38:31 CEST 2014


Hi,

Is this only for the devel version? There doesn't seem to be an 
S4Vectors package for R 3.1.0.

-Ryan

On Wed 18 Jun 2014 11:51:57 AM PDT, Hervé Pagès wrote:
> Hi Ryan,
>
> On 06/18/2014 11:33 AM, Ryan C. Thompson wrote:
>> Hi all,
>>
>> I have 2 CharacterList objects (let's call them A and B) of equal
>> length, and I want to append the each element of List A to the
>> corresponding one in List B and get the resulting CharacterList. I can
>> do this with mendoapply(c, A, B), but this is quite slow. Is there a
>> function to do this quickly?
>
> Code adapted from "junctions" method for GAlignmentPairs objects:
>
>   library(GenomicAlignments)
>
>   pcombine <- function(x, y)
>   {
>     stopifnot(length(x) == length(y))
>     xy <- c(x, y)
>     collate_subscript <-
>       S4Vectors:::make_XYZxyz_to_XxYyZz_subscript(length(x))
>     tmp <- xy[collate_subscript]
>     GenomicAlignments:::shrinkByHalf(tmp)
>   }
>
> I'll add something like this to S4Vectors.
>
> Cheers,
> H.
>
>>
>> -Ryan
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives:
>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>



More information about the Bioconductor mailing list