Closed fcg-bio closed 7 years ago
Dear fcg-bio,
Would you please provide your full script starting from importing libraries and data set?
Huipeng
Hi Huipeng,
Thanks for your quick response. I am running the commands as they are described in the vignette. My full script below
library(WGCNA)
library(flashClust)
library(gplots)
library(preprocessCore)
library(RCA)
### setting options
options(stringsAsFactors = FALSE)
data_cellline = read.csv("data/GSE81861_Cell_Line_FPKM.csv",row.names=1)
fpkm_data = data_cellline;
color_to_use0 = colnames(fpkm_data);
color_to_use0 <- strsplit(color_to_use0,"__");
color_to_use <- paste("",lapply(color_to_use0,"[[",3),sep=""); color_to_use=gsub("\\.","#",color_to_use);
### construct data object
data_obj = dataConstruct(fpkm_data);
### filt out lowly expressed genes
data_obj = geneFilt(obj_in = data_obj);
### normalize gene expression data (Note: default is no normalization). data_obj = cellNormalize(data_obj);
### log transform the data
data_obj = dataTransform(data_obj,"log10");
### project the expression data into Reference Component space
data_obj = featureConstruct(data_obj, method = "GlobalPanel");
### generate cell clusters
data_obj = cellClust(data_obj);
On of the differences is that I am loading WGCNA 1.51, instead of 1.34
My Session Info
> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.6 (El Capitan)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RCA_1.0 preprocessCore_1.36.0 gplots_3.0.1 flashClust_1.01-2 WGCNA_1.51
[6] fastcluster_1.1.22 dynamicTreeCut_1.63-1
loaded via a namespace (and not attached):
[1] nlme_3.1-128 bitops_1.0-6 matrixStats_0.51.0 gmodels_2.16.2 doParallel_1.0.10
[6] RColorBrewer_1.1-2 prabclus_2.2-6 tools_3.3.1 backports_1.0.5 rgdal_1.2-5
[11] R6_2.2.0 rpart_4.1-10 KernSmooth_2.23-15 rgeos_0.3-22 Hmisc_4.0-2
[16] DBI_0.5-1 lazyeval_0.2.0 BiocGenerics_0.20.0 colorspace_1.3-2 trimcluster_0.1-2
[21] nnet_7.3-12 raster_2.5-8 sp_1.2-4 gridExtra_2.2.1 curl_2.3
[26] Biobase_2.34.0 htmlTable_1.9 expm_0.999-1 rmapshaper_0.2.0 diptest_0.75-7
[31] caTools_1.17.1 scales_0.4.1 checkmate_1.8.2 DEoptimR_1.0-8 classInt_0.1-23
[36] mvtnorm_1.0-5 robustbase_0.92-7 stringr_1.1.0 digest_0.6.12 foreign_0.8-67
[41] base64enc_0.1-3 dichromat_2.0-0 htmltools_0.3.5 limma_3.30.11 jsonvalidate_1.0.0
[46] htmlwidgets_0.8 RSQLite_1.1-2 impute_1.48.0 jsonlite_1.2 mclust_5.2.2
[51] gtools_3.5.0 spdep_0.6-11 acepack_1.4.1 dendextend_1.4.0 dplyr_0.5.0
[56] RCurl_1.95-4.8 magrittr_1.5 modeltools_0.2-21 GO.db_3.4.0 Formula_1.2-1
[61] geosphere_1.5-5 Matrix_1.2-7.1 Rcpp_0.12.9 munsell_0.4.3 S4Vectors_0.12.1
[66] viridis_0.3.4 stringi_1.1.2 whisker_0.3-2 yaml_2.1.14 MASS_7.3-45
[71] flexmix_2.3-13 tmaptools_1.2 plyr_1.8.4 grid_3.3.1 parallel_3.3.1
[76] gdata_2.17.0 deldir_0.1-12 lattice_0.20-34 splines_3.3.1 pander_0.6.0
[81] knitr_1.15.1 boot_1.3-18 fpc_2.1-10 geojsonlint_0.2.0 codetools_0.2-15
[86] stats4_3.3.1 LearnBayes_2.15 osmar_1.1-7 XML_3.98-1.5 V8_1.2
[91] latticeExtra_0.6-28 data.table_1.10.0 foreach_1.4.3 gtable_0.2.0 kernlab_0.9-25
[96] assertthat_0.1 ggplot2_2.2.1 e1071_1.6-8 coda_0.19-1 class_7.3-14
[101] survival_2.40-1 tibble_1.2 iterators_1.0.8 AnnotationDbi_1.36.2 memoise_1.0.0
[106] IRanges_2.8.1 cluster_2.0.5
Hi, fcg-bio
I believe it is because the following line:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "###" normalize gene expression data (Note: default is no normalization). data_obj = cellNormalize(data_obj); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in which the normalization step was not executed ..
Try delete "data_obj" and rerun the whole script, with "data_obj=cellNormalize(data_obj)" in a new line.
all the best Huipeng
Thanks Huipeng, sorry for the stupid copy/paste mistake Best
You're welcome! Let me know if you encounter any other issues or inconvenience.
best Huipeng
Hi,
I was running the vignette example, and after running the line
> data_obj = featureConstruct(data_obj, method = "GlobalPanel");
I got the following error:
Error in data[temp5, , drop = FALSE] : incorrect number of dimensions