Skip to content

Commit 4fb56c3

Browse files
WT: Updated documentation and added support for setting resolution for RNA-seq analyses
1 parent 1bf97b7 commit 4fb56c3

9 files changed

Lines changed: 31 additions & 27 deletions

R/process_batches.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,13 +431,14 @@ IntegrateByBatch_ATAC <- function(proj, output_dir = getwd(), exit_with_code = F
431431
#'
432432
#' @param sc_obj Seurat object containing cells for all samples
433433
#' @param output_dir Path to directory where output will be saved. Defaults to working directory ([getwd()]).
434+
#' @param resolution Resolution used for clustering
434435
#' @param exit_with_code Boolean flag to indicate whether we will terminate R session with exit code (via [quit()]) if error occurs. If set to FALSE, we just use [stop()].
435436
#' @param log_flag If set to TRUE, record certain output (e.g., parameters) to a previously set up log file. Most likely only used in the context of [run_SPEEDI()].
436437
#' @return A Seurat object with SCT markers and visualizations
437438
#' @examples
438439
#' \dontrun{sc_obj <- VisualizeIntegration(sc_obj)}
439440
#' @export
440-
VisualizeIntegration <- function(sc_obj, output_dir = getwd(), exit_with_code = FALSE, log_flag = FALSE) {
441+
VisualizeIntegration <- function(sc_obj, output_dir = getwd(), resolution = 2, exit_with_code = FALSE, log_flag = FALSE) {
441442
exit_code <- -1
442443
sc_obj <- tryCatch(
443444
{
@@ -458,7 +459,7 @@ VisualizeIntegration <- function(sc_obj, output_dir = getwd(), exit_with_code =
458459
} else {
459460
print_SPEEDI("Neighbors exist. Skipping constructing neighborhood graph...", log_flag)
460461
}
461-
sc_obj <- find_clusters_SPEEDI(sc_obj = sc_obj, resolution = 2, method = "Leiden", log_flag = log_flag)
462+
sc_obj <- find_clusters_SPEEDI(sc_obj = sc_obj, resolution = resolution, method = "Leiden", log_flag = log_flag)
462463
sample_count <- length(unique(sc_obj$sample))
463464
cell_count <- length(sc_obj$cell_name)
464465
# Plot by cluster

R/wrapper.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ run_SPEEDI <- function(reference_tissue, data_type = "RNA", species = "human", i
8787
log_flag = SPEEDI_variables$log_flag)
8888
sc_obj <- IntegrateByBatch_RNA(sc_obj = sc_obj, exit_with_code = SPEEDI_variables$exit_with_code,
8989
log_flag = SPEEDI_variables$log_flag)
90-
sc_obj <- VisualizeIntegration(sc_obj = sc_obj, output_dir = SPEEDI_variables$RNA_output_dir,
90+
sc_obj <- VisualizeIntegration(sc_obj = sc_obj, output_dir = SPEEDI_variables$RNA_output_dir, resolution = 2,
9191
exit_with_code = SPEEDI_variables$exit_with_code, log_flag = SPEEDI_variables$log_flag)
9292
}
9393
if(data_type != "RNA") {

man/Read_ATAC.Rd

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/Read_RNA.Rd

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/VisualizeIntegration.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/create_pseudobulk_counts.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/initialize_SPEEDI.Rd

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/preliminary_check_for_SPEEDI_errors.Rd

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/run_SPEEDI.Rd

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)