[Bioc-sig-seq] unusual behavior when concatenating DNAStringSets
Andrew Yee
yee at post.harvard.edu
Wed Sep 22 21:06:12 CEST 2010
I encountered some unusual behavior when concatenating multiple
DNAStringSet objects as follows:
library('Biostrings')
x <- DNAStringSet('ATA')
y <- DNAStringSet('GCG')
z <- DNAStringSet('AGA')
foo <- rep(list(x,y,z),1)
do.call(c, foo) # creates a DNAStringSet
names(foo) <- c('x', 'y', 'z')
do.call(c, foo) # creates a DNAStringSet
names(foo) <- c('a', 'b', 'c')
do.call(c, foo) # creates a list instead, not a DNAStringSet
It seems that in the last case, a list is created rather than a
DNAStringSet. It seems that the operation in sensitive to the names()
of the list. Or is there an alternative means of concatenating
multiple DNAStringSets?
Thanks,
Andrew
> sessionInfo()
R version 2.11.1 Patched (2010-09-04 r52880)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Biostrings_2.16.9 IRanges_1.6.17
loaded via a namespace (and not attached):
[1] Biobase_2.8.0
More information about the Bioc-sig-sequencing
mailing list