WGCNA Module Trait Correlation
1
0
Entering edit mode
4.8 years ago

I am trying to find the correlation between gene modules and the tissue where the gene was found in. I have 2 seperate CSV files. One containing the genes and the gene expression in each sample. The second CSV file contains a column of the sample identifier and a column of the tissue the sample was taken from. Since I am dealing with only two tissues I am referring to them as -1 or 1. I have had success in finding the gene modules in the sample. When I try to follow this tutorial https://horvath.genetics.ucla.edu/html/CoexpressionNetwork/Rpackages/WGCNA/Tutorials/FemaleLiver-01-dataInput.pdf

I get this error reading

xSamples = rownames(datExpr); traitRows = match(xSamples, traitData$Tissue.Type); datTraits = traitData[traitRows, -1]; rownames(datTraits) = traitData[traitRows, 1]; Error in .rowNamesDF<-(x, value = value) :

Anny suggestions

software error • 1.5k views
ADD COMMENT
0
Entering edit mode

Can you please confirm that you have followed the tutorial exactly as it is written, and that each step has not produced any error message prior to the error message that you are reporting here. I ask because I have run that same tutorial multiple times and never encountered an error.

Please also confirm which version of WGCNA, R, and Bioconductor that you are using. Type sessionInfo() at the prompt and paste the output here.

ADD REPLY
0
Entering edit mode

Hi, I am not sure I was clear. I am using am applying the code in the tutorial to my own data. Therefore I am changing the lines of code that delete part of the expression data and trait data since I am only trying to find the correlation between gene modules and one trait. Other than that I am not changing the rest of the code.

R version 3.6.0 (2019-04-26)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

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] WGCNA_1.68            fastcluster_1.1.25    dynamicTreeCut_1.63-1

loaded via a namespace (and not attached):
 [1] robust_0.4-18         Rcpp_1.0.1            mvtnorm_1.0-11       
 [4] lattice_0.20-38       GO.db_3.8.2           digest_0.6.19        
 [7] foreach_1.4.4         backports_1.1.4       acepack_1.4.1        
[10] pcaPP_1.9-73          stats4_3.6.0          RSQLite_2.1.1        
[13] ggplot2_3.2.0         pillar_1.4.1          rlang_0.3.4          
[16] lazyeval_0.2.2        rstudioapi_0.10       data.table_1.12.2    
[19] blob_1.1.1            S4Vectors_0.22.0      rpart_4.1-15         
[22] Matrix_1.2-17         checkmate_1.9.3       preprocessCore_1.46.0
[25] splines_3.6.0         stringr_1.4.0         foreign_0.8-71       
[28] htmlwidgets_1.3       bit_1.1-14            munsell_0.5.0        
[31] compiler_3.6.0        xfun_0.7              pkgconfig_2.0.2      
[34] BiocGenerics_0.30.0   base64enc_0.1-3       htmltools_0.3.6      
[37] nnet_7.3-12           tibble_2.1.3          gridExtra_2.3        
[40] htmlTable_1.13.1      Hmisc_4.2-0           IRanges_2.18.1       
[43] codetools_0.2-16      matrixStats_0.54.0    rrcov_1.4-7          
[46] crayon_1.3.4          MASS_7.3-51.4         grid_3.6.0           
[49] gtable_0.3.0          DBI_1.0.0             magrittr_1.5         
[52] scales_1.0.0          stringi_1.4.3         impute_1.58.0        
[55] doParallel_1.0.14     latticeExtra_0.6-28   robustbase_0.93-5    
[58] Formula_1.2-3         RColorBrewer_1.1-2    iterators_1.0.10     
[61] tools_3.6.0           bit64_0.9-7           Biobase_2.44.0       
[64] DEoptimR_1.0-8        fit.models_0.5-14     parallel_3.6.0       
[67] survival_2.44-1.1     AnnotationDbi_1.46.0  colorspace_1.4-1     
[70] cluster_2.1.0         memoise_1.1.0         knitr_1.23
ADD REPLY
0
Entering edit mode

In that case, you will have to debug this yourself. My suggestion is to do the following:

  1. run the tutorial with the data provided by the WGCNA developer
  2. run the tutorial with your own data

Check the differences between 1) and 2) for every line of code in the tutorial (within reason...) so that you can see what is required for each step.

Sorry, we do not have time to debug your code at the level that you require.

ADD REPLY
0
Entering edit mode

Are you also this user? - nnry06

ADD REPLY
0
Entering edit mode

No I'm not that user

ADD REPLY
0
Entering edit mode
4.8 years ago

In lieu of my comment, above, I can confirm that the tutorial still functions as of Wednesday July 10, 2019 @ 00.39 BST.

Please follow the tutorial line by line and ensure that each command runs successfully without warnings or errors.

If you are using an older version of WGCNA, then upgrade to a new version.

Re-download the sample data (direct link): https://horvath.genetics.ucla.edu/html/CoexpressionNetwork/Rpackages/WGCNA/Tutorials/FemaleLiver-Data.zip

The resulting plot:

a

My Session Info:

sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/atlas-base/atlas/libblas.so.3.0
LAPACK: /usr/lib/atlas-base/atlas/liblapack.so.3.0

locale:
 [1] LC_CTYPE=pt_BR.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=pt_BR.UTF-8    
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=pt_BR.UTF-8   
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] WGCNA_1.68            fastcluster_1.1.25    dynamicTreeCut_1.63-1

loaded via a namespace (and not attached):
 [1] Biobase_2.44.0        bit64_0.9-7           splines_3.6.1        
 [4] foreach_1.4.4         Formula_1.2-3         assertthat_0.2.1     
 [7] BiocManager_1.30.4    stats4_3.6.1          latticeExtra_0.6-28  
[10] blob_1.1.1            fit.models_0.5-14     robustbase_0.93-5    
[13] impute_1.59.0         pillar_1.4.1          RSQLite_2.1.1        
[16] backports_1.1.4       lattice_0.20-38       glue_1.3.1           
[19] digest_0.6.19         RColorBrewer_1.1-2    checkmate_1.9.3      
[22] colorspace_1.4-1      htmltools_0.3.6       preprocessCore_1.46.0
[25] Matrix_1.2-17         pcaPP_1.9-73          pkgconfig_2.0.2      
[28] purrr_0.3.2           GO.db_3.8.2           mvtnorm_1.0-11       
[31] scales_1.0.0          htmlTable_1.13.1      tibble_2.1.3         
[34] IRanges_2.18.1        ggplot2_3.2.0         nnet_7.3-12          
[37] BiocGenerics_0.31.5   lazyeval_0.2.2        survival_2.44-1.1    
[40] magrittr_1.5          crayon_1.3.4          memoise_1.1.0        
[43] doParallel_1.0.14     MASS_7.3-51.4         foreign_0.8-71       
[46] tools_3.6.1           data.table_1.12.2     matrixStats_0.54.0   
[49] stringr_1.4.0         S4Vectors_0.22.0      munsell_0.5.0        
[52] cluster_2.1.0         AnnotationDbi_1.46.0  compiler_3.6.1       
[55] rlang_0.3.4           grid_3.6.1            iterators_1.0.10     
[58] rstudioapi_0.10       htmlwidgets_1.3       robust_0.4-18.1      
[61] base64enc_0.1-3       gtable_0.3.0          codetools_0.2-16     
[64] DBI_1.0.0             rrcov_1.4-7           R6_2.4.0             
[67] gridExtra_2.3         knitr_1.23            dplyr_0.8.1          
[70] bit_1.1-14            Hmisc_4.2-0           stringi_1.4.3        
[73] parallel_3.6.1        Rcpp_1.0.1            rpart_4.1-15         
[76] acepack_1.4.1         DEoptimR_1.0-8        tidyselect_0.2.5     
[79] xfun_0.7

Kevin

ADD COMMENT

Login before adding your answer.

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