Commit 517ee01c authored by smorabit's avatar smorabit
Browse files

SetDatExpr change when checking for goodgenes

parent 28a1da79
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -222,18 +222,20 @@ SetDatExpr <- function(
    )[genes_use,cells]
  )


  # transpose data
  datExpr <- as.data.frame(t(datExpr))

  # only get good genes:
  if(is.null(multi.group.by)){
    gene_list = genes_use[WGCNA::goodGenes(datExpr, ...)]
    datExpr <- datExpr[,gene_list]
  }
  # if(is.null(multi.group.by)){
  #   gene_list = genes_use[WGCNA::goodGenes(datExpr, ...)]
  #   datExpr <- datExpr[,gene_list]
  # }

  if(return_seurat){

    gene_list <- genes_use[WGCNA::goodGenes(datExpr, ...)]
    datExpr <- datExpr[,gene_list]

    # update the WGCNA gene list:
    seurat_obj <- SetWGCNAGenes(seurat_obj, gene_list, wgcna_name)

@@ -1093,6 +1095,7 @@ GetModulePreservation <- function(seurat_obj, mod_name, wgcna_name=NULL){
ResetModuleNames <- function(
  seurat_obj,
  new_name = "M",
  reset_levels = FALSE,
  wgcna_name=NULL
){

+1 −1
Original line number Diff line number Diff line
@@ -510,7 +510,7 @@ ModuleFeaturePlot<- function(
  # use all modules except gray if not specified by the user
  modules <- GetModules(seurat_obj, wgcna_name)
  if(is.null(module_names)){
    module_names <- colnames(MEs)
    module_names <- levels(modules$module)
    module_names <- module_names[module_names != 'grey']
  }

(6 KiB)

File changed.

No diff preview for this file type.

(6 KiB)

File changed.

No diff preview for this file type.

(10 KiB)

File changed.

No diff preview for this file type.

Loading