Entering edit mode
Hi,
I am having trouble to work with qPCRset objects after subsetting them. In version 1.26.0 installed on my Linux machine (R 3.3.0;BioC 3.3) this works as expected:
library(HTqPCR) exPath <- system.file("exData", package="HTqPCR") exFiles <- read.delim(file.path(exPath, "files.txt")) raw <- readCtData(files=exFiles$File, path=exPath) raw_sub <- raw[,1:3] colnames(raw) #[1] "sample1" "sample2" "sample3" "sample4" "sample5" "sample6" colnames(raw_sub) #[1] "sample1" "sample2" "sample3" sampleNames(raw_sub) <- LETTERS[1:3] sampleNames(raw_sub) #[1] "A" "B" "C" sessionInfo() # R version 3.3.0 (2016-05-03) # Platform: x86_64-pc-linux-gnu (64-bit) # Running under: CentOS Linux 7 (Core) # # locale: # [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C LC_TIME=en_GB.UTF-8 # [4] LC_COLLATE=en_GB.UTF-8 LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 # [7] LC_PAPER=en_GB.UTF-8 LC_NAME=C LC_ADDRESS=C # [10] LC_TELEPHONE=C LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C # # attached base packages: # [1] parallel stats graphics grDevices utils datasets methods base # # other attached packages: # [1] HTqPCR_1.26.0 limma_3.28.21 RColorBrewer_1.1-2 Biobase_2.32.0 # [5] BiocGenerics_0.18.0 # # loaded via a namespace (and not attached): # [1] gtools_3.5.0 bitops_1.0-6 affy_1.50.0 # [4] stats4_3.3.0 KernSmooth_2.23-15 BiocInstaller_1.22.3 # [7] gplots_3.0.1 zlibbioc_1.18.0 gdata_2.17.0 # [10] affyio_1.42.0 preprocessCore_1.34.0 tools_3.3.0 # [13] caTools_1.17.1
However on my windows laptop (R 3.3.1;bioC 3.4) it doesn't work with version 1.26, 1.28 or 1.29 (devel):
library(HTqPCR) exPath <- system.file("exData", package="HTqPCR") exFiles <- read.delim(file.path(exPath, "files.txt")) raw <- readCtData(files=exFiles$File, path=exPath) raw_sub <- raw[,1:3] colnames(raw) #[1] "sample1" "sample2" "sample3" "sample4" "sample5" "sample6" colnames(raw_sub) #[1] "1" "2" "3" sampleNames(raw_sub) <- LETTERS[1:3] # same result with colnames<- # Error in (function (od, vd) : # object and replacement value dimnames differ # 10. # stop("object and replacement value dimnames differ") # 9. # (function (od, vd) # { # if (is.null(vd)) # od <- seq_along(od) ... # 8. # mapply(FUN = f, ..., SIMPLIFY = FALSE) # 7. # Map(function(od, vd) { # if (is.null(vd)) # od <- seq_along(od) # else if (!setequal(od, vd)) ... # 6. # .validate_assayDataElementReplace(obj, value) # 5. # assayDataElementReplace(object, "exprs", value, validate = TRUE) # 4. # `exprs<-`(`*tmp*`, value = structure(c(11.463166, 33.949196, # 27.956657, 26.92745, 24.992647, 11.280299, 26.921848, 35.940277, # 40, 23.928349, 11.970958, 19.977112, 25.978376, 40, 31.980715, # 28.956345, 26.925201, 32.985897, 26.959076, 26.976776, 31.92505, ... # 3. # `exprs<-`(`*tmp*`, value = structure(c(11.463166, 33.949196, # 27.956657, 26.92745, 24.992647, 11.280299, 26.921848, 35.940277, # 40, 23.928349, 11.970958, 19.977112, 25.978376, 40, 31.980715, # 28.956345, 26.925201, 32.985897, 26.959076, 26.976776, 31.92505, ... # 2. # `sampleNames<-`(`*tmp*`, value = c("A", "B", "C")) # 1. # `sampleNames<-`(`*tmp*`, value = c("A", "B", "C")) sampleNames(raw_sub) #[1] "1" "2" "3" sessionInfo() # R version 3.3.1 (2016-06-21) # Platform: x86_64-w64-mingw32/x64 (64-bit) # Running under: Windows 7 x64 (build 7601) Service Pack 1 # # locale: # [1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 # [3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C # [5] LC_TIME=English_United Kingdom.1252 # # attached base packages: # [1] parallel stats graphics grDevices utils datasets methods base # # other attached packages: # [1] HTqPCR_1.28.0 limma_3.30.2 RColorBrewer_1.1-2 Biobase_2.34.0 # [5] BiocGenerics_0.20.0 # # loaded via a namespace (and not attached): # [1] gtools_3.5.0 bitops_1.0-6 affy_1.52.0 stats4_3.3.1 # [5] KernSmooth_2.23-15 BiocInstaller_1.24.0 gplots_3.0.1 zlibbioc_1.20.0 # [9] gdata_2.17.0 affyio_1.44.0 preprocessCore_1.36.0 tools_3.3.1 # [13] caTools_1.17.1
Thank you!