hdWGCNA icon indicating copy to clipboard operation
hdWGCNA copied to clipboard

ModuleTraitCorrelation:Error in `stop_vctrs()`: ! Input must be a vector, not an environment.

Open zhanglu11 opened this issue 1 year ago • 4 comments

When I try to use the ModuleTraitCorrelation function to Correlates categorical and numeric variables with Module Eigengenes or hub-gene scores, I get the following error: Error in stop_vctrs(): ! Input must be a vector, not an environment. I'm wondering why this error appears everytime I tried, thanks for your help. The code is: cur_traits <- c('nCount_RNA','nFeature_RNA')

str([email protected][,cur_traits]) seurat_obj <- ModuleTraitCorrelation( seurat_obj, traits = cur_traits, features = "hMEs", cor_method = "pearson", group.by='celltype' )

'data.frame': 1884 obs. of 2 variables: $ nCount_RNA : num 3757 5269 2104 4044 3614 ... $ nFeature_RNA: int 1780 6319 547 2137 1745 2549 3607 6823 3824 5191 ...

zhanglu11 avatar Mar 08 '23 03:03 zhanglu11