Skip to content

Commit

Permalink
bugfix for modulepreservation and updates to tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
smorabit committed Mar 8, 2024
1 parent 985d90a commit b3b5acf
Show file tree
Hide file tree
Showing 158 changed files with 400 additions and 347 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: hdWGCNA
Title: hdWGCNA
Version: 0.3.00
Version: 0.3.01
Authors@R: c(
person("Sam", "Morabito", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-7768-4856")),
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# hdWGCNA 0.3.01 (2024-03-07)
## Added
- None

## Changes
- Bugfix in `ModulePreservation`
- Update to module preservation tutorial and project modules tutorial.

# hdWGCNA 0.3.00 (2024-02-27)
## Added
- First version with support for Seurat v5.
Expand Down
8 changes: 7 additions & 1 deletion R/ModulePreservation.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,19 @@ ModulePreservation <- function(
colnames(datExpr_query) <- gene_mapping[,genome1_col]
}

genes_keep <- intersect(colnames(datExpr_ref), colnames(datExpr_query))
datExpr_ref <- datExpr_ref[,genes_keep]
datExpr_query <- datExpr_query[,genes_keep]

# set up multiExpr:
setLabels <- c("ref", "query")
multiExpr <- list(
ref = list(data=datExpr_ref),
query = list(data=datExpr_query)
)
ref_modules <- list(ref = GetModules(seurat_ref, wgcna_name=wgcna_name)$module)
ref_modules <- GetModules(seurat_ref, wgcna_name=wgcna_name_ref)
ref_modules <- ref_modules[genes_keep,]
ref_modules <- list(ref = ref_modules$module)

# print('ref:')
# print(dim(multiExpr$ref$data))
Expand Down
1 change: 1 addition & 0 deletions R/ProjectModules.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ ProjectModules <- function(

# get data from active assay if wgcna_name is not given
if(is.null(wgcna_name)){wgcna_name <- seurat_ref@misc$active_wgcna}
CheckWGCNAName(seurat_ref, wgcna_name)

# get modules to be projected:
if(is.null(modules)){
Expand Down
4 changes: 0 additions & 4 deletions R/plotting.R
Original file line number Diff line number Diff line change
Expand Up @@ -1725,8 +1725,6 @@ DoHubGeneHeatmap <- function(
#' @param wgcna_name The name of the hdWGCNA experiment in the seurat_obj@misc slot
#' @keywords scRNA-seq
#' @export
#' @examples
#' PlotModulePreservation
PlotModulePreservation <- function(
seurat_obj,
name,
Expand Down Expand Up @@ -1847,8 +1845,6 @@ PlotModulePreservation <- function(
#' @param combine logical determining whether to plot as one combined plot (TRUE) or to return individual plots as a list (FALSE)
#' @keywords scRNA-seq
#' @export
#' @examples
#' PlotModulePreservation
PlotModuleTraitCorrelation <- function(
seurat_obj,
high_color = 'red',
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/ST_basics.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/basic_tutorial.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/consensus_wgcna.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/customization.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/differential_MEs.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/enrichment_analysis.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified docs/articles/figures/.DS_Store
Binary file not shown.
Binary file modified docs/articles/figures/projection/compare_umaps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/figures/projection/module_preservation_all.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/figures/projection/module_preservation_rank.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/figures/projection/projected_dotplot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/figures/projection/projected_featureplots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/articles/hdWGCNA.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/isoform_pbmcs.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b3b5acf

Please sign in to comment.