Sample grouping (phenoData) and visualization in R package- HtqPCR
0
0
Entering edit mode
@mohammedtoufiq91-17679
Last seen 12 weeks ago
United States

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. I 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("Patient1", 7), rep("Patient4", 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] HTqPCR1.36.0 limma3.38.3 RColorBrewer1.1-2 Biobase2.42.0 BiocGenerics_0.28.0

loaded via a namespace (and not attached): [1] gtools3.8.1 bitops1.0-6 affy1.60.0 stats43.5.1
[5] KernSmooth2.23-15 gplots3.0.1.1 zlibbioc1.28.0 gdata2.18.0
[9] affyio1.52.0 preprocessCore1.44.0 tools3.5.1 yaml2.2.0
[13] compiler3.5.1 BiocManager1.30.4 caTools_1.17.1.2

HtqPCR grouping visualization R phenoData • 870 views
ADD COMMENT

Login before adding your answer.

Traffic: 675 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