From d73d19eba9c612a59faf32fac3286327da0bcff4 Mon Sep 17 00:00:00 2001 From: Louise Huuki Date: Fri, 17 May 2024 15:44:26 -0400 Subject: [PATCH] Update function name add_qc_metrics in docs --- NAMESPACE | 2 +- R/add_qc_metrics.R | 4 ++-- man/{metrics_qc.Rd => add_qc_metrics.Rd} | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) rename man/{metrics_qc.Rd => add_qc_metrics.Rd} (91%) diff --git a/NAMESPACE b/NAMESPACE index 4a9ab05e..4eba582c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -3,6 +3,7 @@ export(add10xVisiumAnalysis) export(add_images) export(add_key) +export(add_qc_metrics) export(annotate_registered_clusters) export(check_modeling_results) export(check_sce) @@ -25,7 +26,6 @@ export(layer_matrix_plot) export(layer_stat_cor) export(layer_stat_cor_plot) export(locate_images) -export(metrics_qc) export(read10xVisiumAnalysis) export(read10xVisiumWrapper) export(registration_block_cor) diff --git a/R/add_qc_metrics.R b/R/add_qc_metrics.R index df7cf2f0..01067f87 100644 --- a/R/add_qc_metrics.R +++ b/R/add_qc_metrics.R @@ -26,7 +26,7 @@ #' spe_qc$in_tissue[spe_qc$array_col < 10] <- FALSE #' #' ## adds QC metrics to colData of the spe -#' spe_qc <- add_qc_metrics()(spe_qc) +#' spe_qc <- add_qc_metrics(spe_qc) #' colData(spe_qc) #' #' ## visualize edge spots @@ -43,7 +43,7 @@ #' vis_clus(spe_qc, sampleid = "151507", clustervar = "scran_low_lib_size_edge") #' } #' -add_qc_metrics() <- function(spe) { +add_qc_metrics <- function(spe) { stopifnot("in_tissue" %in% colnames(colData(spe))) stopifnot("sum_umi" %in% colnames(colData(spe))) stopifnot("sum_gene" %in% colnames(colData(spe))) diff --git a/man/metrics_qc.Rd b/man/add_qc_metrics.Rd similarity index 91% rename from man/metrics_qc.Rd rename to man/add_qc_metrics.Rd index db964436..b1d5dc5d 100644 --- a/man/metrics_qc.Rd +++ b/man/add_qc_metrics.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/metrics_qc.R -\name{metrics_qc} -\alias{metrics_qc} +% Please edit documentation in R/add_qc_metrics.R +\name{add_qc_metrics} +\alias{add_qc_metrics} \title{Quality Control for Spatial Data} \usage{ -metrics_qc(spe) +add_qc_metrics(spe) } \arguments{ \item{spe}{a \link[SpatialExperiment:SpatialExperiment]{SpatialExperiment}} @@ -30,7 +30,7 @@ if (enough_ram()) { spe_qc$in_tissue[spe_qc$array_col < 10] <- FALSE ## adds QC metrics to colData of the spe - spe_qc <- metrics_qc(spe_qc) + spe_qc <- add_qc_metrics(spe_qc) colData(spe_qc) ## visualize edge spots