From 647ce6a04382210e4e1802b1e414e47755d72ada Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Thu, 30 Jan 2025 16:48:48 -0500 Subject: [PATCH] chore: document() --- NAMESPACE | 3 ++ man/abort_packages_not_installed.Rd | 23 ++++++++ man/aggregate_duplicate_gene_names.Rd | 4 +- man/batch_correct_counts.Rd | 76 +++++++++++++++++++++++++++ man/check_packages_installed.Rd | 25 +++++++++ man/clean_raw_counts.Rd | 4 +- man/counts_dat_to_matrix.Rd | 4 +- man/filter_counts.Rd | 16 +++--- man/glue_gene_symbols.Rd | 2 +- man/nidap_batch_corrected_counts.Rd | 16 ++++++ man/nidap_batch_corrected_counts_2.Rd | 18 +++++++ man/normalize_counts.Rd | 16 +++--- man/plot_heatmap.Rd | 8 +-- man/plot_histogram.Rd | 10 ++-- man/plot_pca.Rd | 8 +-- man/plot_read_depth.Rd | 4 +- man/reexports.Rd | 3 ++ man/remove_low_count_genes.Rd | 8 +-- man/separate_gene_meta_columns.Rd | 4 +- 19 files changed, 208 insertions(+), 44 deletions(-) create mode 100644 man/abort_packages_not_installed.Rd create mode 100644 man/batch_correct_counts.Rd create mode 100644 man/check_packages_installed.Rd create mode 100644 man/nidap_batch_corrected_counts.Rd create mode 100644 man/nidap_batch_corrected_counts_2.Rd diff --git a/NAMESPACE b/NAMESPACE index 0df9961..d62df83 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,6 +1,8 @@ # Generated by roxygen2: do not edit by hand +export("%<>%") export("%>%") +export(batch_correct_counts) export(calc_cpm) export(clean_raw_counts) export(create_multiOmicDataSet_from_dataframes) @@ -16,3 +18,4 @@ export(strip_ensembl_version) if (getRversion() < "4.3.0") importFrom("S7", "@") importFrom(DESeq2,DESeq) importFrom(dplyr,"%>%") +importFrom(magrittr,"%<>%") diff --git a/man/abort_packages_not_installed.Rd b/man/abort_packages_not_installed.Rd new file mode 100644 index 0000000..9e4916d --- /dev/null +++ b/man/abort_packages_not_installed.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/utils.R +\name{abort_packages_not_installed} +\alias{abort_packages_not_installed} +\title{Throw error if required packages are not installed.} +\usage{ +abort_packages_not_installed(...) +} +\arguments{ +\item{...}{names of packages to check} +} +\description{ +Reports which packages need to be installed and the parent function name. +See \url{https://stackoverflow.com/questions/15595478/how-to-get-the-name-of-the-calling-function-inside-the-called-routine} +This is only intended to be used inside a function. It will error otherwise. +} +\examples{ +\dontrun{ +abort_packages_not_installed("base") +abort_packages_not_installed("not-a-package-name", "caret", "dplyr", "non_package") +} +} +\keyword{internal} diff --git a/man/aggregate_duplicate_gene_names.Rd b/man/aggregate_duplicate_gene_names.Rd index 8a3decd..90081dc 100644 --- a/man/aggregate_duplicate_gene_names.Rd +++ b/man/aggregate_duplicate_gene_names.Rd @@ -5,14 +5,14 @@ \title{Aggregate duplicate gene names} \usage{ aggregate_duplicate_gene_names( - counts_matrix, + counts_dat, gene_name_column_to_use_for_collapsing_duplicates, aggregate_rows_with_duplicate_gene_names, split_gene_name ) } \arguments{ -\item{counts_matrix}{dataframe with raw counts data} +\item{counts_dat}{dataframe with raw counts data} \item{gene_name_column_to_use_for_collapsing_duplicates}{Select the column with Feature IDs to use as grouping elements to collapse the counts matrix. diff --git a/man/batch_correct_counts.Rd b/man/batch_correct_counts.Rd new file mode 100644 index 0000000..a896353 --- /dev/null +++ b/man/batch_correct_counts.Rd @@ -0,0 +1,76 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/batch-correction.R +\name{batch_correct_counts} +\alias{batch_correct_counts} +\title{Perform batch correction} +\usage{ +batch_correct_counts( + moo, + count_type = "norm", + sub_count_type = "voom", + sample_id_colname = NULL, + feature_id_colname = NULL, + samples_to_include = NULL, + covariates_colnames = "Group", + batch_colname = "Batch", + label_colname = NULL +) +} +\arguments{ +\item{moo}{multiOmicDataSet object (see \code{create_multiOmicDataSet_from_dataframes()})} + +\item{count_type}{the type of counts to use -- must be a name in the counts slot (\code{moo@counts})} + +\item{sub_count_type}{if \code{count_type} is a list, specify the sub count type within the list. (Default: \code{"voom"})} + +\item{sample_id_colname}{The column from the sample metadata containing the sample names. The names in this column must exactly match the names used as the sample column names of your input Counts Matrix. (Default: \code{NULL} - first column in the sample metadata will be used.)} + +\item{feature_id_colname}{The column from the counts dataa containing the Feature IDs (Usually Gene or Protein ID). This is usually the first column of your input Counts Matrix. Only columns of Text type from your input Counts Matrix will be available to select for this parameter. (Default: \code{NULL} - first column in the counts matrix will be used.)} + +\item{samples_to_include}{Which samples would you like to include? Usually, you will choose all sample columns, or you could choose to remove certain samples. Samples excluded here will be removed in this step and from further analysis downstream of this step. (Default: \code{NULL} - all sample IDs in \code{moo@sample_meta} will be used.)} + +\item{covariates_colnames}{The column name(s) from the sample metadata +containing variable(s) of interest, such as phenotype. +Most commonly this will be the same column selected for your Groups Column. +Some experimental designs may require that you add additional covariate columns here. +Do not include the \code{batch_colname} here.} + +\item{batch_colname}{The column from the sample metadata containing the batch information. +Samples extracted, prepared, or sequenced at separate times or using separate materials/staff/equipment +may belong to different batches. +Not all data sets have batches, in which case you do not need batch correction. +If your data set has no batches, you can provide a batch column with the same +value in every row to skip batch correction (alternatively, simply do not run this function).} + +\item{label_colname}{The column from the sample metadata containing the sample labels as you wish them to appear in the plots produced by this template. This can be the same Sample Names Column. However, you may desire different labels to display on your figure (e.g. shorter labels are sometimes preferred on plots). In that case, select the column with your preferred Labels here. The selected column should contain unique names for each sample. (Default: \code{NULL} -- \code{sample_id_colname} will be used.)} +} +\value{ +\code{multiOmicDataSet} with batch-corrected counts +} +\description{ +using \code{sva::ComBat()} +} +\examples{ +moo <- multiOmicDataSet( + sample_meta_dat = as.data.frame(nidap_sample_metadata), + anno_dat = data.frame(), + counts_lst = list( + "raw" = as.data.frame(nidap_raw_counts), + "clean" = as.data.frame(nidap_clean_raw_counts), + "filt" = as.data.frame(nidap_filtered_counts), + "norm" = list( + "voom" = as.data.frame(nidap_norm_counts) + ) + ) +) \%>\% + batch_correct_counts( + count_type = "norm", + sub_count_type = "voom", + covariates_colname = "Group", + batch_colname = "Batch", + label_colname = "Label" + ) + +head(moo@counts[["batch"]]) + +} diff --git a/man/check_packages_installed.Rd b/man/check_packages_installed.Rd new file mode 100644 index 0000000..96e5a77 --- /dev/null +++ b/man/check_packages_installed.Rd @@ -0,0 +1,25 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/utils.R +\name{check_packages_installed} +\alias{check_packages_installed} +\title{Check whether package(s) are installed} +\usage{ +check_packages_installed(...) +} +\arguments{ +\item{...}{names of packages to check} +} +\value{ +named vector with status of each packages; installed (\code{TRUE}) or not (\code{FALSE}) +} +\description{ +Check whether package(s) are installed +} +\examples{ +\dontrun{ +check_packages_installed("base") +check_packages_installed("not-a-package-name") +all(check_packages_installed("parallel", "doFuture")) +} +} +\keyword{internal} diff --git a/man/clean_raw_counts.Rd b/man/clean_raw_counts.Rd index 2d3211b..d961838 100644 --- a/man/clean_raw_counts.Rd +++ b/man/clean_raw_counts.Rd @@ -21,9 +21,9 @@ clean_raw_counts( \item{count_type}{the type of counts to use -- must be a name in the counts slot (\code{moo@counts})} -\item{sample_id_colname}{The column from your input Sample Metadata table containing the sample names. The names in this column must exactly match the names used as the sample column names of your input Counts Matrix. Only columns of Text type from your input Sample Metadata table will be available to select for this parameter. (Default: \code{NULL} - first column in the sample metadata will be used.)} +\item{sample_id_colname}{The column from the sample metadata containing the sample names. The names in this column must exactly match the names used as the sample column names of your input Counts Matrix. (Default: \code{NULL} - first column in the sample metadata will be used.)} -\item{feature_id_colname}{The column from your input Counts Matrix containing the Feature IDs (Usually Gene or Protein ID). This is usually the first column of your input Counts Matrix. Only columns of Text type from your input Counts Matrix will be available to select for this parameter. (Default: \code{NULL} - first column in the counts matrix will be used.)} +\item{feature_id_colname}{The column from the counts dataa containing the Feature IDs (Usually Gene or Protein ID). This is usually the first column of your input Counts Matrix. Only columns of Text type from your input Counts Matrix will be available to select for this parameter. (Default: \code{NULL} - first column in the counts matrix will be used.)} \item{samples_to_rename}{If you do not have a Plot Labels Column in your sample metadata table, you can use this parameter to rename samples manually for display on the PCA plot. Use "Add item" to add each additional sample for renaming. Use the following format to describe which old name (in your sample metadata table) you want to rename to which new name: old_name: new_name} diff --git a/man/counts_dat_to_matrix.Rd b/man/counts_dat_to_matrix.Rd index d7f72b9..a989cc1 100644 --- a/man/counts_dat_to_matrix.Rd +++ b/man/counts_dat_to_matrix.Rd @@ -4,10 +4,10 @@ \alias{counts_dat_to_matrix} \title{Convert a data frame of gene counts to a matrix} \usage{ -counts_dat_to_matrix(counts_tbl, feature_id_colname = "gene_id") +counts_dat_to_matrix(counts_tbl, feature_id_colname = NULL) } \arguments{ -\item{counts_tbl}{expected gene counts from RSEM as a data frame or tibble.} +\item{counts_tbl}{expected feature counts as a dataframe or tibble, with all columns except \code{feature_id_colname}} \item{feature_id_colname}{name of the column in \code{count_dat} that contains feature/gene IDs. (Default: \code{NULL} - first column in the count data will be used.)} } diff --git a/man/filter_counts.Rd b/man/filter_counts.Rd index ac2ff82..d1f9f13 100644 --- a/man/filter_counts.Rd +++ b/man/filter_counts.Rd @@ -9,8 +9,8 @@ filter_counts( count_type = "clean", feature_id_colname = NULL, sample_id_colname = NULL, - group_column = "Group", - label_column = "Label", + group_colname = "Group", + label_colname = NULL, samples_to_include = NULL, minimum_count_value_to_be_considered_nonzero = 8, minimum_number_of_samples_with_nonzero_counts_in_total = 7, @@ -46,13 +46,13 @@ filter_counts( \item{count_type}{the type of counts to use -- must be a name in the counts slot (\code{moo@counts})} -\item{feature_id_colname}{The column from your input Counts Matrix containing the Feature IDs (Usually Gene or Protein ID). This is usually the first column of your input Counts Matrix. Only columns of Text type from your input Counts Matrix will be available to select for this parameter. (Default: \code{NULL} - first column in the counts matrix will be used.)} +\item{feature_id_colname}{The column from the counts dataa containing the Feature IDs (Usually Gene or Protein ID). This is usually the first column of your input Counts Matrix. Only columns of Text type from your input Counts Matrix will be available to select for this parameter. (Default: \code{NULL} - first column in the counts matrix will be used.)} -\item{sample_id_colname}{The column from your input Sample Metadata table containing the sample names. The names in this column must exactly match the names used as the sample column names of your input Counts Matrix. Only columns of Text type from your input Sample Metadata table will be available to select for this parameter. (Default: \code{NULL} - first column in the sample metadata will be used.)} +\item{sample_id_colname}{The column from the sample metadata containing the sample names. The names in this column must exactly match the names used as the sample column names of your input Counts Matrix. (Default: \code{NULL} - first column in the sample metadata will be used.)} -\item{group_column}{The column from your input Sample Metadata table containing the sample group information. This is usually a column showing to which experimental treatments each sample belongs (e.g. WildType, Knockout, Tumor, Normal, Before, After, etc.). Only columns of Text type from your input Sample Metadata will be available to select for this parameter.} +\item{group_colname}{The column from the sample metadata containing the sample group information. This is usually a column showing to which experimental treatments each sample belongs (e.g. WildType, Knockout, Tumor, Normal, Before, After, etc.).} -\item{label_column}{The column from your input Sample Metadata table containing the sample labels as you wish them to appear in the plots produced by this template. This can be the same Sample Names Column. However, you may desire different labels to display on your figure (e.g. shorter labels are sometimes preferred on plots). In that case, select the column with your preferred Labels here. The selected column should contain unique names for each sample.} +\item{label_colname}{The column from the sample metadata containing the sample labels as you wish them to appear in the plots produced by this template. This can be the same Sample Names Column. However, you may desire different labels to display on your figure (e.g. shorter labels are sometimes preferred on plots). In that case, select the column with your preferred Labels here. The selected column should contain unique names for each sample. (Default: \code{NULL} -- \code{sample_id_colname} will be used.)} \item{samples_to_include}{Which samples would you like to include? Usually, you will choose all sample columns, or you could choose to remove certain samples. Samples excluded here will be removed in this step and from further analysis downstream of this step. (Default: \code{NULL} - all sample IDs in \code{moo@sample_meta} will be used.)} @@ -135,8 +135,8 @@ another based on unsupervised clustering. moo <- create_multiOmicDataSet_from_dataframes( as.data.frame(nidap_sample_metadata), as.data.frame(nidap_clean_raw_counts), - sample_id_colname = "Sample", - feature_id_colname = "Gene" + sample_id_colname = "Sample", + feature_id_colname = "Gene" ) \%>\% filter_counts( count_type = "raw" diff --git a/man/glue_gene_symbols.Rd b/man/glue_gene_symbols.Rd index 1a233fb..4d4aa6d 100644 --- a/man/glue_gene_symbols.Rd +++ b/man/glue_gene_symbols.Rd @@ -20,6 +20,6 @@ Glue gene_id and GeneName columns into one column gene_counts \%>\% glue_gene_symbols() \%>\% head() - } +} } \keyword{internal} diff --git a/man/nidap_batch_corrected_counts.Rd b/man/nidap_batch_corrected_counts.Rd new file mode 100644 index 0000000..f99af51 --- /dev/null +++ b/man/nidap_batch_corrected_counts.Rd @@ -0,0 +1,16 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{nidap_batch_corrected_counts} +\alias{nidap_batch_corrected_counts} +\title{Batch-corrected counts for the NIDAP test dataset.} +\format{ +An object of class \code{spec_tbl_df} (inherits from \code{tbl_df}, \code{tbl}, \code{data.frame}) with 7943 rows and 10 columns. +} +\usage{ +nidap_batch_corrected_counts +} +\description{ +Batch-corrected counts for the NIDAP test dataset. +} +\keyword{datasets} diff --git a/man/nidap_batch_corrected_counts_2.Rd b/man/nidap_batch_corrected_counts_2.Rd new file mode 100644 index 0000000..8f7889d --- /dev/null +++ b/man/nidap_batch_corrected_counts_2.Rd @@ -0,0 +1,18 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{nidap_batch_corrected_counts_2} +\alias{nidap_batch_corrected_counts_2} +\title{Batch-corrected counts for the NIDAP test dataset. +The result of running \code{batch_correct_counts()} on \code{nidap_norm_counts}.} +\format{ +An object of class \code{data.frame} with 7943 rows and 10 columns. +} +\usage{ +nidap_batch_corrected_counts_2 +} +\description{ +Batch-corrected counts for the NIDAP test dataset. +The result of running \code{batch_correct_counts()} on \code{nidap_norm_counts}. +} +\keyword{datasets} diff --git a/man/normalize_counts.Rd b/man/normalize_counts.Rd index 0ec20ba..ed65848 100644 --- a/man/normalize_counts.Rd +++ b/man/normalize_counts.Rd @@ -10,8 +10,8 @@ normalize_counts( feature_id_colname = NULL, samples_to_include = NULL, sample_id_colname = NULL, - group_column = "Group", - label_column = "Label", + group_colname = "Group", + label_colname = NULL, input_in_log_counts = FALSE, voom_normalization_method = "quantile", samples_to_rename = c(""), @@ -42,15 +42,15 @@ normalize_counts( \item{count_type}{the type of counts to use -- must be a name in the counts slot (\code{moo@counts})} -\item{feature_id_colname}{The column from your input Counts Matrix containing the Feature IDs (Usually Gene or Protein ID). This is usually the first column of your input Counts Matrix. Only columns of Text type from your input Counts Matrix will be available to select for this parameter. (Default: \code{NULL} - first column in the counts matrix will be used.)} +\item{feature_id_colname}{The column from the counts dataa containing the Feature IDs (Usually Gene or Protein ID). This is usually the first column of your input Counts Matrix. Only columns of Text type from your input Counts Matrix will be available to select for this parameter. (Default: \code{NULL} - first column in the counts matrix will be used.)} \item{samples_to_include}{Which samples would you like to include? Usually, you will choose all sample columns, or you could choose to remove certain samples. Samples excluded here will be removed in this step and from further analysis downstream of this step. (Default: \code{NULL} - all sample IDs in \code{moo@sample_meta} will be used.)} -\item{sample_id_colname}{The column from your input Sample Metadata table containing the sample names. The names in this column must exactly match the names used as the sample column names of your input Counts Matrix. Only columns of Text type from your input Sample Metadata table will be available to select for this parameter. (Default: \code{NULL} - first column in the sample metadata will be used.)} +\item{sample_id_colname}{The column from the sample metadata containing the sample names. The names in this column must exactly match the names used as the sample column names of your input Counts Matrix. (Default: \code{NULL} - first column in the sample metadata will be used.)} -\item{group_column}{The column from your input Sample Metadata table containing the sample group information. This is usually a column showing to which experimental treatments each sample belongs (e.g. WildType, Knockout, Tumor, Normal, Before, After, etc.). Only columns of Text type from your input Sample Metadata will be available to select for this parameter.} +\item{group_colname}{The column from the sample metadata containing the sample group information. This is usually a column showing to which experimental treatments each sample belongs (e.g. WildType, Knockout, Tumor, Normal, Before, After, etc.).} -\item{label_column}{The column from your input Sample Metadata table containing the sample labels as you wish them to appear in the plots produced by this template. This can be the same Sample Names Column. However, you may desire different labels to display on your figure (e.g. shorter labels are sometimes preferred on plots). In that case, select the column with your preferred Labels here. The selected column should contain unique names for each sample.} +\item{label_colname}{The column from the sample metadata containing the sample labels as you wish them to appear in the plots produced by this template. This can be the same Sample Names Column. However, you may desire different labels to display on your figure (e.g. shorter labels are sometimes preferred on plots). In that case, select the column with your preferred Labels here. The selected column should contain unique names for each sample. (Default: \code{NULL} -- \code{sample_id_colname} will be used.)} \item{input_in_log_counts}{set this to \code{TRUE} if counts are already log2-transformed} @@ -113,8 +113,8 @@ moo <- multiOmicDataSet( ) ) \%>\% normalize_counts( - group_column = "Group", - label_column = "Label" + group_colname = "Group", + label_colname = "Label" ) head(moo@counts[["norm"]][["voom"]]) } diff --git a/man/plot_heatmap.Rd b/man/plot_heatmap.Rd index d41f812..8ddf5ce 100644 --- a/man/plot_heatmap.Rd +++ b/man/plot_heatmap.Rd @@ -5,18 +5,18 @@ \title{Make a heatmap} \usage{ plot_heatmap( - counts_matrix, + counts_dat, sample_metadata, sample_id_colname, - label_column, + label_colname, anno_column, anno_colors ) } \arguments{ -\item{sample_id_colname}{The column from your input Sample Metadata table containing the sample names. The names in this column must exactly match the names used as the sample column names of your input Counts Matrix. Only columns of Text type from your input Sample Metadata table will be available to select for this parameter. (Default: \code{NULL} - first column in the sample metadata will be used.)} +\item{sample_id_colname}{The column from the sample metadata containing the sample names. The names in this column must exactly match the names used as the sample column names of your input Counts Matrix. (Default: \code{NULL} - first column in the sample metadata will be used.)} -\item{label_column}{The column from your input Sample Metadata table containing the sample labels as you wish them to appear in the plots produced by this template. This can be the same Sample Names Column. However, you may desire different labels to display on your figure (e.g. shorter labels are sometimes preferred on plots). In that case, select the column with your preferred Labels here. The selected column should contain unique names for each sample.} +\item{label_colname}{The column from the sample metadata containing the sample labels as you wish them to appear in the plots produced by this template. This can be the same Sample Names Column. However, you may desire different labels to display on your figure (e.g. shorter labels are sometimes preferred on plots). In that case, select the column with your preferred Labels here. The selected column should contain unique names for each sample. (Default: \code{NULL} -- \code{sample_id_colname} will be used.)} \item{anno_column}{annotation (group) column} diff --git a/man/plot_histogram.Rd b/man/plot_histogram.Rd index 1d4e040..9e3c8dd 100644 --- a/man/plot_histogram.Rd +++ b/man/plot_histogram.Rd @@ -8,8 +8,8 @@ plot_histogram( log_counts, sample_metadata, feature_id_colname, - group_column, - label_column, + group_colname, + label_colname, color_values, color_histogram_by_group = FALSE, set_min_max_for_x_axis_for_histogram = FALSE, @@ -28,11 +28,11 @@ plot_histogram( \item{sample_metadata}{sample metadata as a data frame or tibble.} -\item{feature_id_colname}{The column from your input Counts Matrix containing the Feature IDs (Usually Gene or Protein ID). This is usually the first column of your input Counts Matrix. Only columns of Text type from your input Counts Matrix will be available to select for this parameter. (Default: \code{NULL} - first column in the counts matrix will be used.)} +\item{feature_id_colname}{The column from the counts dataa containing the Feature IDs (Usually Gene or Protein ID). This is usually the first column of your input Counts Matrix. Only columns of Text type from your input Counts Matrix will be available to select for this parameter. (Default: \code{NULL} - first column in the counts matrix will be used.)} -\item{group_column}{The column from your input Sample Metadata table containing the sample group information. This is usually a column showing to which experimental treatments each sample belongs (e.g. WildType, Knockout, Tumor, Normal, Before, After, etc.). Only columns of Text type from your input Sample Metadata will be available to select for this parameter.} +\item{group_colname}{The column from the sample metadata containing the sample group information. This is usually a column showing to which experimental treatments each sample belongs (e.g. WildType, Knockout, Tumor, Normal, Before, After, etc.).} -\item{label_column}{The column from your input Sample Metadata table containing the sample labels as you wish them to appear in the plots produced by this template. This can be the same Sample Names Column. However, you may desire different labels to display on your figure (e.g. shorter labels are sometimes preferred on plots). In that case, select the column with your preferred Labels here. The selected column should contain unique names for each sample.} +\item{label_colname}{The column from the sample metadata containing the sample labels as you wish them to appear in the plots produced by this template. This can be the same Sample Names Column. However, you may desire different labels to display on your figure (e.g. shorter labels are sometimes preferred on plots). In that case, select the column with your preferred Labels here. The selected column should contain unique names for each sample. (Default: \code{NULL} -- \code{sample_id_colname} will be used.)} \item{color_values}{vector of colors as hex values or names recognized by R} diff --git a/man/plot_pca.Rd b/man/plot_pca.Rd index f475d56..63eedc4 100644 --- a/man/plot_pca.Rd +++ b/man/plot_pca.Rd @@ -9,8 +9,8 @@ plot_pca( sample_metadata, samples_to_include, samples_to_rename, - group_column, - label_column, + group_colname, + label_colname, color_values, principal_component_on_x_axis = 1, principal_component_on_y_axis = 2, @@ -32,9 +32,9 @@ plot_pca( \item{samples_to_rename}{If you do not have a Plot Labels Column in your sample metadata table, you can use this parameter to rename samples manually for display on the PCA plot. Use "Add item" to add each additional sample for renaming. Use the following format to describe which old name (in your sample metadata table) you want to rename to which new name: old_name: new_name} -\item{group_column}{The column from your input Sample Metadata table containing the sample group information. This is usually a column showing to which experimental treatments each sample belongs (e.g. WildType, Knockout, Tumor, Normal, Before, After, etc.). Only columns of Text type from your input Sample Metadata will be available to select for this parameter.} +\item{group_colname}{The column from the sample metadata containing the sample group information. This is usually a column showing to which experimental treatments each sample belongs (e.g. WildType, Knockout, Tumor, Normal, Before, After, etc.).} -\item{label_column}{The column from your input Sample Metadata table containing the sample labels as you wish them to appear in the plots produced by this template. This can be the same Sample Names Column. However, you may desire different labels to display on your figure (e.g. shorter labels are sometimes preferred on plots). In that case, select the column with your preferred Labels here. The selected column should contain unique names for each sample.} +\item{label_colname}{The column from the sample metadata containing the sample labels as you wish them to appear in the plots produced by this template. This can be the same Sample Names Column. However, you may desire different labels to display on your figure (e.g. shorter labels are sometimes preferred on plots). In that case, select the column with your preferred Labels here. The selected column should contain unique names for each sample. (Default: \code{NULL} -- \code{sample_id_colname} will be used.)} \item{color_values}{vector of colors as hex values or names recognized by R} diff --git a/man/plot_read_depth.Rd b/man/plot_read_depth.Rd index 5cfbcd9..93f15b5 100644 --- a/man/plot_read_depth.Rd +++ b/man/plot_read_depth.Rd @@ -4,10 +4,10 @@ \alias{plot_read_depth} \title{Create read depth plot} \usage{ -plot_read_depth(counts_matrix) +plot_read_depth(counts_dat) } \arguments{ -\item{counts_matrix}{dataframe with raw counts data} +\item{counts_dat}{dataframe with raw counts data} } \value{ ggplot object diff --git a/man/reexports.Rd b/man/reexports.Rd index 9c345fa..3662e7a 100644 --- a/man/reexports.Rd +++ b/man/reexports.Rd @@ -4,6 +4,7 @@ \name{reexports} \alias{reexports} \alias{\%>\%} +\alias{\%<>\%} \title{dplyr pipe} \keyword{internal} \description{ @@ -12,5 +13,7 @@ below to see their documentation. \describe{ \item{dplyr}{\code{\link[dplyr:reexports]{\%>\%}}} + + \item{magrittr}{\code{\link[magrittr:compound]{\%<>\%}}} }} diff --git a/man/remove_low_count_genes.Rd b/man/remove_low_count_genes.Rd index f78fb83..e09481a 100644 --- a/man/remove_low_count_genes.Rd +++ b/man/remove_low_count_genes.Rd @@ -5,10 +5,10 @@ \title{Remove low-count genes} \usage{ remove_low_count_genes( - counts_matrix, + counts_dat, sample_metadata, feature_id_colname, - group_column, + group_colname, use_cpm_counts_to_filter = TRUE, use_group_based_filtering = FALSE, minimum_count_value_to_be_considered_nonzero = 8, @@ -17,9 +17,9 @@ remove_low_count_genes( ) } \arguments{ -\item{feature_id_colname}{The column from your input Counts Matrix containing the Feature IDs (Usually Gene or Protein ID). This is usually the first column of your input Counts Matrix. Only columns of Text type from your input Counts Matrix will be available to select for this parameter. (Default: \code{NULL} - first column in the counts matrix will be used.)} +\item{feature_id_colname}{The column from the counts dataa containing the Feature IDs (Usually Gene or Protein ID). This is usually the first column of your input Counts Matrix. Only columns of Text type from your input Counts Matrix will be available to select for this parameter. (Default: \code{NULL} - first column in the counts matrix will be used.)} -\item{group_column}{The column from your input Sample Metadata table containing the sample group information. This is usually a column showing to which experimental treatments each sample belongs (e.g. WildType, Knockout, Tumor, Normal, Before, After, etc.). Only columns of Text type from your input Sample Metadata will be available to select for this parameter.} +\item{group_colname}{The column from the sample metadata containing the sample group information. This is usually a column showing to which experimental treatments each sample belongs (e.g. WildType, Knockout, Tumor, Normal, Before, After, etc.).} \item{use_cpm_counts_to_filter}{If no transformation has been been performed on counts matrix (eg Raw Counts) set to TRUE. If TRUE counts will be transformed to CPM and filtered based on given criteria. If gene counts matrix has been transformed (eg log2, CPM, FPKM or some form of Normalization) set to FALSE. If FALSE no further transformation will be applied and features will be filtered as is. For RNAseq data RAW counts should be transformed to CPM in order to properly filter.} diff --git a/man/separate_gene_meta_columns.Rd b/man/separate_gene_meta_columns.Rd index a0ab3ed..6206b30 100644 --- a/man/separate_gene_meta_columns.Rd +++ b/man/separate_gene_meta_columns.Rd @@ -4,10 +4,10 @@ \alias{separate_gene_meta_columns} \title{Separate gene metadata column} \usage{ -separate_gene_meta_columns(counts_matrix, split_gene_name = TRUE) +separate_gene_meta_columns(counts_dat, split_gene_name = TRUE) } \arguments{ -\item{counts_matrix}{dataframe with raw counts data} +\item{counts_dat}{dataframe with raw counts data} \item{split_gene_name}{If \code{TRUE}, split the gene name column by any of these special characters: \verb{,|_-:}} }