HTqPCR - unable to create a 'qPCRset' object
0
0
Entering edit mode
jirkanov • 0
@jirkanov-14624
Last seen 3.9 years ago

Hello,

I am unable to create a 'qPCRset' object from my own data:

cp_matrix[1:5, 1:5]
           VM12B_1_8R VM12B_2_9L VM12B_3_33R VM12B_4_50L VM12B_2_20L
Nppa            36.74      25.33       26.80       26.02       25.05
Myh7            25.37      22.17       25.04       22.33       25.01
Atp2a2          40.00      40.00       40.00       39.16       40.00
Tgm2            32.33      30.02       30.84       29.63       31.28
A9LNM8_RAT      40.00      36.91       40.00       37.95       40.00

dim(cp_matrix)
[1]  32 110

head(pheno_data)
                Animal    Group Side      Sample Experiment Izolation concentration                RIN Plate Column
VM12B_1_8R   VM12B_1_8  Sh_Plac    R  VM12B_1_8R          B        SC        629.11                  8     A      A
VM12B_2_9L   VM12B_2_9 AVF_Plac    L  VM12B_2_9L          B        SA       1176.65 7.5999999999999996     A      B
VM12B_3_33R VM12B_3_33 AVF_Sild    R VM12B_3_33R          B        SC        690.13 8.4000000000000004     A      C
VM12B_4_50L VM12B_4_50 AVF_ACEi    L VM12B_4_50L          B        SB       1004.05 7.2999999999999998     A      E
VM12B_2_20L VM12B_2_20 AVF_Plac    L VM12B_2_20L          B        SD        510.90 8.0999999999999996     A      F
VM12_1_53L   VM12_1_53  Sh_Plac    L  VM12_1_53L          A        SF        623.33 8.1999999999999993     A      G

all.equal(colnames(cp_matrix), rownames(pheno_data))
[1] TRUE

head(feature_data)
           featureName featureType
Nppa              Nppa      Target
Myh7              Myh7      Target
Atp2a2          Atp2a2      Target
Tgm2              Tgm2      Target
A9LNM8_RAT  A9LNM8_RAT      Target
Npr1              Npr1      Target

all.equal(rownames(cp_matrix), rownames(feature_data))
[1] TRUE

feature_category[1:5, 1:5]
           VM12B_1_8R VM12B_2_9L VM12B_3_33R VM12B_4_50L VM12B_2_20L
Nppa               OK         OK          OK          OK          OK
Myh7               OK         OK          OK          OK          OK
Atp2a2             OK         OK          OK          OK          OK
Tgm2               OK         OK          OK          OK          OK
A9LNM8_RAT         OK         OK          OK          OK          OK

all.equal(rownames(cp_matrix), rownames(feature_category))
[1] TRUE
all.equal(colnames(cp_matrix), colnames(feature_category))
[1] TRUE

qpcr_set <- new(
  "qPCRset",
  exprs = cp_matrix,
  featureCategory = feature_category,
  phenoData = as(pheno_data, "AnnotatedDataFrame"),
  featureData = as(feature_data, "AnnotatedDataFrame")
)

sampleNames(qpcr_set) <- colnames(cp_matrix)
featureNames(qpcr_set) <- rownames(cp_matrix)

qpcr_set
An object of class "qPCRset"
Error in dimnames(x) <- dn :
  length of 'dimnames' [1] not equal to array extent

I found some answer: HT qPCR; Creating qPCRset from expression matrix, but even the example isn't working:

mat <- matrix(rnorm(9*96), ncol = 6, nrow = 96, byrow = FALSE)
raw <- new("qPCRset", exprs = mat, featureCategory = as.data.frame(array("OK", dim=dim(mat))))
sampleNames(raw) <- paste("S", 1:6, sep = "")
Error in (function (od, vd)  :
  object and replacement value dimnames differ
featureNames(raw) <- paste("A", 1:96, sep = "")
raw
An object of class "qPCRset"
Size:  96 features, 6 samples
Feature types:		  
Feature names:		 A1 A2 A3 ...
Feature classes:		  
Feature categories:	 OK 
Sample names:		 1 2 3 ...
# Sample names not set...

Thanks in advance for help!

sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 18.2

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=cs_CZ.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=cs_CZ.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=cs_CZ.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] bindrcpp_0.2.2      nondetects_2.8.0    HTqPCR_1.32.0       limma_3.34.9        RColorBrewer_1.1-2  Biobase_2.38.0      BiocGenerics_0.24.0
 [8] heatmaply_0.15.2    viridis_0.5.1       viridisLite_0.3.0   plotly_4.8.0        ggthemes_4.0.0      gridExtra_2.3       ggpubr_0.1.7       
[15] magrittr_1.5        reshape2_1.4.3      readxl_1.1.0        forcats_0.3.0       stringr_1.3.1       dplyr_0.7.6         purrr_0.2.5        
[22] readr_1.1.1         tidyr_0.8.1         tibble_1.4.2        ggplot2_3.0.0       tidyverse_1.2.1    

loaded via a namespace (and not attached):
 [1] nlme_3.1-137          bitops_1.0-6          lubridate_1.7.4       webshot_0.5.0         httr_1.3.1            prabclus_2.2-6        tools_3.4.2          
 [8] backports_1.1.2       affyio_1.48.0         R6_2.2.2              KernSmooth_2.23-15    lazyeval_0.2.1        colorspace_1.3-2      trimcluster_0.1-2.1  
[15] nnet_7.3-12           withr_2.1.2           tidyselect_0.2.4      preprocessCore_1.40.0 compiler_3.4.2        cli_1.0.0             rvest_0.3.2          
[22] TSP_1.1-6             xml2_1.2.0            diptest_0.75-7        caTools_1.17.1.1      scales_0.5.0          DEoptimR_1.0-8        mvtnorm_1.0-8        
[29] robustbase_0.93-1.1   affy_1.56.0           digest_0.6.15         pkgconfig_2.0.1       htmltools_0.3.6       htmlwidgets_1.2       rlang_0.2.1          
[36] rstudioapi_0.7        BiocInstaller_1.28.0  bindr_0.1.1           jsonlite_1.5          mclust_5.4.1          gtools_3.8.1          dendextend_1.8.0     
[43] modeltools_0.2-22     Rcpp_0.12.18          munsell_0.5.0         stringi_1.2.4         whisker_0.3-2         zlibbioc_1.24.0       MASS_7.3-50          
[50] flexmix_2.3-14        gplots_3.0.1          plyr_1.8.4            grid_3.4.2            gdata_2.18.0          crayon_1.3.4          lattice_0.20-35      
[57] haven_1.1.2           hms_0.4.2             knitr_1.20            pillar_1.3.0          fpc_2.1-11.1          codetools_0.2-15      stats4_3.4.2         
[64] glue_1.3.0            gclus_1.3.1           data.table_1.11.4     modelr_0.1.2          foreach_1.4.4         cellranger_1.1.0      gtable_0.2.0         
[71] kernlab_0.9-26        assertthat_0.2.0      broom_0.5.0           class_7.3-14          seriation_1.2-3       iterators_1.0.10      registry_0.5         
[78] cluster_2.0.7-1  
htqpcr expressionset • 1.0k views
ADD COMMENT

Login before adding your answer.

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