[BioC] Why does a call to "unique" removes a DNAStringSet names?
Nicolas Delhomme
nicolas.delhomme at plantphys.umu.se
Thu Jul 26 17:36:00 CEST 2012
Hi,
I've just realized that a call to unique on a DNAStringSet would result in the names slot to disappear. There's nothing about this in the documentation, but if that's the desired effect, warning about it would be good :-)
Here is how to reproduce it:
library(Biostrings)
dset<-DNAStringSet(c("A","C"))
names(dset) <- c("a","a")
dset
unique(dset)
It gives:
> dset
A DNAStringSet instance of length 2
width seq names
[1] 1 A a
[2] 1 C a
> unique(dset)
A DNAStringSet instance of length 2
width seq
[1] 1 A
[2] 1 C
My sessionInfo():
R version 2.15.1 (2012-06-22)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
locale:
[1] C/UTF-8/C/C/C/C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Biostrings_2.25.8 IRanges_1.15.24 BiocGenerics_0.3.0
loaded via a namespace (and not attached):
[1] stats4_2.15.1 tools_2.15.1
Cheers,
Nico
---------------------------------------------------------------
Nicolas Delhomme
Nathaniel Street Lab
Department of Plant Physiology
Umeå Plant Science Center
Tel: +46 90 786 7989
Email: nicolas.delhomme at plantphys.umu.se
SLU - Umeå universitet
Umeå S-901 87 Sweden
More information about the Bioconductor
mailing list