Why does a call to "unique" removes a DNAStringSet names?
0
0
Entering edit mode
@nicolas-delhomme-5423
Last seen 9.6 years ago
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
• 613 views
ADD COMMENT

Login before adding your answer.

Traffic: 534 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6