Hi,
I created a qPCRset using HTqPCR package for analysing the RTPCR data from BioMark Fluidigm setup. I am facing issues while grouping the samples for the data visualization and analysis. would like to group the samples based on the "Type" parameter such as 1, 4, and 6. However, getting an error message. Below is the code and error message
library("HTqPCR")
expression <- read.csv(file = "/Users/mtoufiq/Library/R/3.5/library/HTqPCR/exData/BMT_CSV.csv", stringsAsFactors = FALSE)
expression[is.na(expression)] <- 0
expression <- data.matrix(expression[,-1])
dd <- data.frame(expression)
mm1 <- as.matrix(dd)
mm2 <- matrix(mm1, ncol = ncol(dd), dimnames = NULL)
dim(mm2)
raw <- new("qPCRset", exprs = mm2, featureCategory = as.data.frame(array("OK", dim=dim(mm2))))
sampleNames(raw) <- paste("S", 1:27, sep = "")
featureNames(raw) <- paste("A", 1:265, sep = "")
pData(raw) <- data.frame(Patient=c(rep("Patient_1", 7), rep("Patient_4", 9), rep("Patient_6", 11)), Type=c(rep("1", 7), rep("4", 9), rep("6", 11)))
pData(raw)
g<- featureNames(raw)[1:10]
plotCtOverview(raw, genes=g, xlim=c(0,90))
plotCtOverview(raw, genes=g, xlim=c(0,50), groups=Type)
pData(raw)
Patient Type
1 Patient_1 1
2 Patient_1 1
3 Patient_1 1
4 Patient_1 1
5 Patient_1 1
6 Patient_1 1
7 Patient_1 1
8 Patient_4 4
9 Patient_4 4
10 Patient_4 4
11 Patient_4 4
12 Patient_4 4
13 Patient_4 4
14 Patient_4 4
15 Patient_4 4
16 Patient_4 4
17 Patient_6 6
18 Patient_6 6
19 Patient_6 6
20 Patient_6 6
21 Patient_6 6
22 Patient_6 6
23 Patient_6 6
24 Patient_6 6
25 Patient_6 6
26 Patient_6 6
27 Patient_6 6
plotCtOverview(raw, genes=g, xlim=c(0,50), groups=Type)
Error in plotCtOverview(raw, genes = g, xlim = c(0, 50), groups = Type) : object 'Type' not found
sessionInfo() R version 3.5.1 (2018-07-02) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS 10.14.5
Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
locale: [1] C
attached base packages: [1] parallel stats graphics grDevices utils datasets methods base
other attached packages: [1] HTqPCR_1.36.0 limma_3.38.3 RColorBrewer_1.1-2 Biobase_2.42.0 BiocGenerics_0.28.0
loaded via a namespace (and not attached):
[1] gtools_3.8.1 bitops_1.0-6 affy_1.60.0 stats4_3.5.1
[5] KernSmooth_2.23-15 gplots_3.0.1.1 zlibbioc_1.28.0 gdata_2.18.0
[9] affyio_1.52.0 preprocessCore_1.44.0 tools_3.5.1 yaml_2.2.0
[13] compiler_3.5.1 BiocManager_1.30.4 caTools_1.17.1.2