Commit fabc6fe6 authored by smorabit's avatar smorabit
Browse files

adding in functinos that accidently got removed

parent e09b2bdb
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
export(AvgModuleExpr)
export(ConstructMetacells)
export(ConstructMetaspots)
export(DimPlotMetacells)
export(DoHubGeneHeatmap)
export(EnrichrBarPlot)
export(EnrichrDotPlot)
@@ -49,6 +50,7 @@ export(ModuleUMAPPlot)
export(MotifOverlapBarPlot)
export(MotifScan)
export(MotifTargetScore)
export(NormalizeMetacells)
export(OverlapBarPlot)
export(OverlapDotPlot)
export(OverlapModulesDEGs)
@@ -64,7 +66,11 @@ export(ROCCurves)
export(ResetModuleColors)
export(ResetModuleNames)
export(RunEnrichr)
export(RunHarmonyMetacells)
export(RunModuleUMAP)
export(RunPCAMetacells)
export(RunUMAPMetacells)
export(ScaleMetacells)
export(SelectNetworkGenes)
export(SetActiveWGCNA)
export(SetAvgModuleExpr)
+6 −2
Original line number Diff line number Diff line
@@ -234,9 +234,7 @@ ConstructMetacells <- function(
#' @param max_iter the maximum number of iterations in the metacells bootstrapping loop
#' @param verbose logical indicating whether to print additional information
#' @param wgcna_name name of the WGCNA experiment
#' @keywords scRNA-seq
#' @export
#' @examples
#' MetacellsByGroups
MetacellsByGroups <- function(
  seurat_obj, group.by=c('seurat_clusters'),
@@ -396,6 +394,7 @@ MetacellsByGroups <- function(
#' Wrapper function to run Seurat's NormalizeData function on the metacell object.
#'
#' @param seurat_obj A Seurat object
#' @export
NormalizeMetacells <- function(seurat_obj, wgcna_name=NULL, ...){
  metacell_obj <- GetMetacellObject(seurat_obj, wgcna_name)
  metacell_obj <- Seurat::NormalizeData(metacell_obj, ...)
@@ -407,6 +406,7 @@ NormalizeMetacells <- function(seurat_obj, wgcna_name=NULL, ...){
#' Wrapper function to run Seurat's ScaleData function on the metacell object.
#'
#' @param seurat_obj A Seurat object
#' @export
ScaleMetacells <- function(seurat_obj, wgcna_name=NULL, ...){
  if(!exists("features")){
    features = VariableFeatures(seurat_obj)
@@ -421,6 +421,7 @@ ScaleMetacells <- function(seurat_obj, wgcna_name=NULL, ...){
#' Wrapper function to run Seurat's RunPCA function on the metacell object.
#'
#' @param seurat_obj A Seurat object
#' @export
RunPCAMetacells <- function(seurat_obj, wgcna_name=NULL, ...){
  metacell_obj <- GetMetacellObject(seurat_obj, wgcna_name)
  metacell_obj <- Seurat::RunPCA(metacell_obj, ...)
@@ -432,6 +433,7 @@ RunPCAMetacells <- function(seurat_obj, wgcna_name=NULL, ...){
#' Wrapper function to run harmony's RunHarmony function on the metacell object.
#'
#' @param seurat_obj A Seurat object
#' @export
RunHarmonyMetacells <- function(seurat_obj, ...){
  seurat_obj@misc[[seurat_obj@misc$active_wgcna]]$wgcna_metacell_obj <- harmony::RunHarmony(seurat_obj@misc[[seurat_obj@misc$active_wgcna]]$wgcna_metacell_obj, ...)
  seurat_obj
@@ -443,6 +445,7 @@ RunHarmonyMetacells <- function(seurat_obj, ...){
#'
#' @param seurat_obj A Seurat object
#' @keywords scRNA-seq
#' @export
RunUMAPMetacells <- function(seurat_obj, ...){
  seurat_obj@misc[[seurat_obj@misc$active_wgcna]]$wgcna_metacell_obj <- Seurat::RunUMAP(seurat_obj@misc[[seurat_obj@misc$active_wgcna]]$wgcna_metacell_obj, ...)
  seurat_obj
@@ -455,6 +458,7 @@ RunUMAPMetacells <- function(seurat_obj, ...){
#'
#' @param seurat_obj A Seurat object
#' @keywords scRNA-seq
#' @export
DimPlotMetacells <- function(seurat_obj, ...){
  Seurat::DimPlot(seurat_obj@misc[[seurat_obj@misc$active_wgcna]]$wgcna_metacell_obj, ...)
}
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ articles:
  projecting_modules: projecting_modules.html
  projecting_modules_cross: projecting_modules_cross.html
  sctransform: sctransform.html
last_built: 2023-01-25T05:59Z
last_built: 2023-01-25T22:03Z
urls:
  reference: https://smorabit.github.io/hdWGCNA/reference
  article: https://smorabit.github.io/hdWGCNA/articles
+1 −1
Original line number Diff line number Diff line
@@ -295,7 +295,7 @@ on neighboring cells.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span>     }</span>
<span class="r-out co"><span class="r-pr">#&gt;</span>     out</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> }</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;bytecode: 0x7fd88baf0ab0&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;bytecode: 0x7fcdad94f928&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;environment: namespace:hdWGCNA&gt;</span>
</code></pre></div>
    </div>
+1 −1
Original line number Diff line number Diff line
@@ -233,7 +233,7 @@ using Seurat's DoHeatmap, and then assembles them all into one big heatmap.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span>     }</span>
<span class="r-out co"><span class="r-pr">#&gt;</span>     out</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> }</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;bytecode: 0x7fd88fd73c90&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;bytecode: 0x7fcdb4c1f778&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;environment: namespace:hdWGCNA&gt;</span>
</code></pre></div>
    </div>
Loading