Entering edit mode
Andrew Yee
▴
350
@andrew-yee-2667
Last seen 10.3 years ago
Hi I was wondering if you can read a tab delimited file of micro array
data using readCtData() in HTqPCR as follows:
Detector SampleA SampleB etc.
Gene1 20 23
Gene 2 32 25
etc.
I've tried
foo <- readCtData('file.txt', header=T, n.features=381,
samples=samples, n.data=27)
# in this case there are 381 rows of Detectors and 27 samples
But get the following error message:
> foo <- readCtData('PCM_cardA-all-raw.txt', header=T,
n.features=381, samples=samples, n.data=27)
Error in `[<-.data.frame`(`*tmp*`, undeter, value = "Undetermined") :
only logical matrix subscripts are allowed in replacement
In addition: Warning messages:
1: In readCtData("PCM_cardA-all-raw.txt", header = T, n.features =
381, :
381 gene names (rows) expected, got 381
2: In matrix(sample[, Ct], ncol = n.data[i]) :
data length [381] is not a sub-multiple or multiple of the number of
rows [15]
Thanks,
Andrew
> sessionInfo()
R version 2.12.2 (2011-02-25)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] HTqPCR_1.5.4 limma_3.6.9 RColorBrewer_1.0-2
Biobase_2.10.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
I'm having the same issue, and the example with pseudo data does (same for my own data) not work for me:
# Making pesudo-data, just to illustrate the example temp <- matrix(sample(12:40, size=27*381, replace=TRUE), ncol=27) rownames(temp) <- paste("gene", 1:381) colnames(temp) <- paste("sample", 1:27) # Make qPCRset object q.raw <- new("qPCRset", exprs=temp, featureNames=rownames(temp), sampleNames=colnames(temp), flag=as.data.frame(array("Passed", dim=dim(temp))), featureCategory=as.data.frame(array("OK", dim=dim(temp))))
> q.raw <-new('qPCRset', exprs=temp, featureNames=rownames(temp),sampleNames=colnames(temp), flag=as.data.frame(array('Passed', dim=dim(temp))), featureCategory=as.data.frame(array("OK", dim=dim(temp))))
Error in (function (storage.mode = c("lockedEnvironment", "environment", :
'AssayData' elements with invalid dimensions: 'featureNames' 'sampleNames''AssayData' elements with different rowNames
> sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server release 6.6 (Santiago)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] HTqPCR_1.26.0 limma_3.28.21 RColorBrewer_1.1-2
[4] Biobase_2.32.0 BiocGenerics_0.18.0 BiocInstaller_1.22.3
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 gplots_3.0.1
[7] zlibbioc_1.18.0 gdata_2.17.0 affyio_1.42.0
[10] preprocessCore_1.34.0 tools_3.3.0 caTools_1.17.1
> head(temp)
sample 1 sample 2 sample 3 sample 4 sample 5 sample 6 sample 7 sample 8
gene 1 30 33 37 35 33 25 23 33
gene 2 25 30 20 17 38 24 26 34
gene 3 17 34 12 35 31 19 20 20
sample 9 sample 10 sample 11 sample 12 sample 13 sample 14 sample 15
gene 1 13 20 32 24 25 28 37
gene 2 21 37 34 26 23 17 32
gene 3 34 34 12 30 16 31 32
sample 16 sample 17 sample 18 sample 19 sample 20 sample 21 sample 22
gene 1 22 12 18 34 26 25 39
gene 2 16 13 17 20 37 33 26
gene 3 23 27 36 27 40 16 18
sample 23 sample 24 sample 25 sample 26 sample 27
gene 1 22 14 17 40 27
gene 2 32 29 29 26 26
gene 3 25 26 21 28 24
I also run into the exactly same problem!
Did you find a solution to that?
I'm also getting this issue. Not finding any answers resolving anywhere.