[BioC] HTqPCR: new qPCRset objects problem
Wenbo Mu
muwenbo.prc at gmail.com
Wed Mar 2 07:11:56 CET 2011
Dear List,
When trying to use HTqPCR to analyze data under R 2.12, my code which
works under R 2.10 doesn't work any more.
When I'm using function filterCtData, I got some Warning messages. If
I ignore the warnings, a error will happen when using filterCtData
function.
I concluded some error happened at q[!index,], so I check the source
code and do some small experiments. I substitute q <- q[!index, ] by
featureCategory(q) <- featureCategory
(q)[!index,], and then no error happens.
> q.norm <- normalizeCtData(sr.norm,norm="quantile")
Warning messages:
1: In `[<-.factor`(`*tmp*`, ri, value = "normalizeCtData(q = sr.norm,
norm = \"quantile\")") :
invalid factor level, NAs generated
2: In `[<-.factor`(`*tmp*`, ri, value = "normalizeCtData(q = sr.norm,
norm = \"quantile\")") :
invalid factor level, NAs generated
> q.Filt <- filterCtData( q.norm, remove.category="Undetermined", n.category = 36, remove.name=c(HK.miR.rm,"MammU6"))
Error in names(x) <- value :
'names' attribute [41] must be the same length as the vector [0]
> traceback()
6: `colnames<-`(`*tmp*`, value = c("C1", "C2", "C3", "C4", "C5",
"C6", "C7", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "T1", "T10",
"T11", "T12", "T13", "T2", "T3", "T4", "T5", "T6", "T7", "T8",
"T9", "U1", "U.1", "U10", "U12", "U13", "U2", "U.2", "U3", "U.3",
"U4", "U5", "U6", "U8", "U9"))
5: flag(x)
4: .local(x, i, j, ..., drop)
3: q[!index, ]
2: q[!index, ]
1: filterCtData(q.norm, remove.category = "Unreliable",
n.category = 36, remove.name = c(HK.miR.rm, "MammU6"))
I thought the subsetting problem may come from some mistakes at earlier step.
I find if use the qPCRset test object, we can subset the object by
specific number such as qPCRraw[,1] or qPCRraw[1,]. But if we create a
qPCRset object by new function, the subsetting doesn't works. I try
the follow code under i386-pc-mingw32 Windows with R version 2.10.1
and HTqPCR version 1.0.0, under x86_64-unknown-linux-gnu with R
version 2.11.1 and HTqPCR version 1.2.0 and under x86_64-pc-linux-gnu
(64-bit) with R version 2.12.2 and HTqPCR version 1.4.0.
> n<- 48
> temp<- matrix(rnorm(n*n),ncol=n,nrow=n)
> raw <- new("qPCRset", exprs=temp, sampleNames=paste("S", 1:n, sep=""), featureNames=paste("A", 1:n, sep=""), featureCategory=as.data.frame(array("OK", c(n,n))))
> raw[,1]
Error in names(x) <- value :
'names' attribute [1] must be the same length as the vector [0]
> raw[1,]
Error in names(x) <- value :
'names' attribute [48] must be the same length as the vector [0]
Row subsetting and column subsetting error both happens at R 2.11.1
and R 2.12.2. But only column subsetting error happens at R 2.10.1. I
think that's the reason why my old code doesn't work with new version
R and HTqPCR. I would really appreciate any suggestions that could
help me solve this problem.
Windows with R 2.10.1 sessionInfo:
R version 2.10.1 (2009-12-14)
i386-pc-mingw32
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] HTqPCR_1.0.0 limma_3.2.3 RColorBrewer_1.0-2 Biobase_2.6.1
loaded via a namespace (and not attached):
[1] affy_1.24.2 affyio_1.14.0 gdata_2.7.1
[4] gplots_2.7.4 gtools_2.6.1 preprocessCore_1.8.0
[7] tools_2.10.1
Linux with R 2.11.1 sessionInfo:
R version 2.11.1 (2010-05-31)
x86_64-unknown-linux-gnu
locale:
[1] LC_CTYPE=en_US.iso88591 LC_NUMERIC=C
[3] LC_TIME=en_US.iso88591 LC_COLLATE=en_US.iso88591
[5] LC_MONETARY=C LC_MESSAGES=en_US.iso88591
[7] LC_PAPER=en_US.iso88591 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.iso88591 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] HTqPCR_1.2.0 limma_3.4.5 Biobase_2.8.0 SLqPCR_1.14.0
[5] RColorBrewer_1.0-2
loaded via a namespace (and not attached):
[1] affy_1.26.1 affyio_1.16.0 gdata_2.8.1
[4] gplots_2.8.0 gtools_2.6.2 preprocessCore_1.10.0
[7] tools_2.11.1
Linux with R 2.12.2 sessionInfo:
R version 2.12.2 (2011-02-25)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.utf8 LC_NUMERIC=C
[3] LC_TIME=en_US.utf8 LC_COLLATE=en_US.utf8
[5] LC_MONETARY=C LC_MESSAGES=en_US.utf8
[7] LC_PAPER=en_US.utf8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] HTqPCR_1.4.0 limma_3.6.9 RColorBrewer_1.0-2 Biobase_2.10.0
[5] SLqPCR_1.16.0
loaded via a namespace (and not attached):
[1] affy_1.28.0 affyio_1.18.0 gdata_2.8.1
[4] gplots_2.8.0 gtools_2.6.2 preprocessCore_1.12.0
[7] tools_2.12.2
Best,
Wenbo Mu
More information about the Bioconductor
mailing list