From 5a59273d0e9949f37388b46de1b73ae9c70a23cd Mon Sep 17 00:00:00 2001 From: Fontrodona Nicolas <nicolas.fontrodona@ens-lyon.fr> Date: Fri, 15 Jul 2022 18:27:37 +0200 Subject: [PATCH] man/*.Rd: update doc --- man/build_count_matrices.Rd | 18 ++++++++----- man/cli_run_deseq2.Rd | 2 +- man/de_analysis.Rd | 13 ++++++++-- man/de_analyzes.Rd | 21 +++++++++++++-- man/filter_dds.Rd | 7 ++--- man/hline.Rd | 19 ++++++++++++++ man/load_matrix.Rd | 7 ++--- man/make_html_pca.Rd | 21 +++++++++++++++ man/make_pca.Rd | 21 +++++++++++++++ man/run_deseq2.Rd | 51 +++++++++++++++++++++++++------------ man/vline.Rd | 19 ++++++++++++++ 11 files changed, 166 insertions(+), 33 deletions(-) create mode 100644 man/hline.Rd create mode 100644 man/make_html_pca.Rd create mode 100644 man/make_pca.Rd create mode 100644 man/vline.Rd diff --git a/man/build_count_matrices.Rd b/man/build_count_matrices.Rd index 0f7a019..2b863bb 100644 --- a/man/build_count_matrices.Rd +++ b/man/build_count_matrices.Rd @@ -5,28 +5,34 @@ \title{Build matrices} \usage{ build_count_matrices( - design, + design_table, path, - formula, - filter_file, + my_formula, + filter_list, min_expression, output_folder ) } \arguments{ -\item{design}{A design file with the column count_files, sample and condition} +\item{design_table}{A dataframe with the column count_files, sample and +condition. Other columns corresponding to cofactors can be present} \item{path}{The path were the count file are stored} -\item{formula}{The formula to use in DESeq2} +\item{my_formula}{The formula to use in DESeq2} -\item{filter_file}{A file containing genes} +\item{filter_list}{A vector containing the list of genes to keep in the +analysis. To keep all gene use a NULL object} \item{min_expression}{The minimum average required expression across all samples to keep the gene} \item{output_folder}{Folder were the matrices will be produced} } +\value{ +The dds object corresponding to a DESeqDatase object obtained after +running the DESeq function. +} \description{ Build matrices } diff --git a/man/cli_run_deseq2.Rd b/man/cli_run_deseq2.Rd index 401056b..8cef804 100644 --- a/man/cli_run_deseq2.Rd +++ b/man/cli_run_deseq2.Rd @@ -16,6 +16,6 @@ perform a complete DESeq2 analysis including: \item Sample loading \item Normalisation \item Figure creation -\item Differential expression analysis for the hcosen contrasts +\item Differential expression analysis for the chosen contrasts } } diff --git a/man/de_analysis.Rd b/man/de_analysis.Rd index d978493..fb7e89a 100644 --- a/man/de_analysis.Rd +++ b/man/de_analysis.Rd @@ -23,8 +23,17 @@ de_analysis(dds, my_contrast, output_folder, basemean_threshold, lfc_threshold) \item{basemean_threshold:}{The minimum basemean of gene to be knameept} } \value{ -A dataframe indicating The number of differentially expressed genes -and the number of up and down regulated genes +A list containing: +\enumerate{ +\item at \code{data} key: A dataframe indicating The number of differentially +expressed genes and the number of up and down regulated genes +\item at \code{dds} key: The dds object corresponding to a DESeqDatase object +obtained after running the DESeq function. +\item at \code{results} key: A dataframe containing the results of DEseQ2 analysis +but for all gene +\item at \code{de_results} key: A dataframe containing only differentially expressed +genes +} } \description{ Perform a DESeq2 analysis with a given contrast diff --git a/man/de_analyzes.Rd b/man/de_analyzes.Rd index 8cd4162..1facc3f 100644 --- a/man/de_analyzes.Rd +++ b/man/de_analyzes.Rd @@ -13,14 +13,31 @@ de_analyzes( ) } \arguments{ +\item{dds}{The dds object corresponding to a DESeqDatase object obtained +after running the DESeq function.} + +\item{my_contrasts}{A list containing contrast vectors} + \item{output_folder}{Folder where the result table will be created} \item{lfc_threshold}{The minimum fold change to consider a gene significant} -\item{my_contrast}{A list containing contrast vectors} - \item{basemean_threshold:}{The minimum basemean of genes to be kept} } +\value{ +A list containing for each comparison given in my_contrasts +(keys of the list) a sublist containing: +\enumerate{ +\item at \code{data} key: A dataframe indicating The number of differentially +expressed genes and the number of up and down regulated genes +\item at \code{dds} key: The dds object corresponding to a DESeqDataSet object +obtained after running the DESeq function. +\item at \code{results} key: A dataframe containing the results of DEseQ2 analysis +but for all gene +\item at \code{de_results} key: A dataframe containing only differentially expressed +genes +} +} \description{ Perform multiple differential expression analysis } diff --git a/man/filter_dds.Rd b/man/filter_dds.Rd index a3fffce..807c756 100644 --- a/man/filter_dds.Rd +++ b/man/filter_dds.Rd @@ -4,19 +4,20 @@ \alias{filter_dds} \title{Filter DESeq2 object on expressed gene if needed} \usage{ -filter_dds(dds, filter_file, min_expression, addition_col, formula) +filter_dds(dds, filter_list, min_expression, addition_col, my_formula) } \arguments{ \item{dds}{A dds object} -\item{filter_file}{A file containing genes} +\item{filter_list}{A vector containing the list of genes to keep in the +analysis. To keep all gene use a NULL object} \item{min_expression}{The minimum average required expression across all samples to keep the gene} \item{addition_col}{Additional design columns} -\item{formula}{The formula to use in DESeq2} +\item{my_formula}{The formula to use in DESeq2} } \value{ A DESeqDataset object filtered diff --git a/man/hline.Rd b/man/hline.Rd new file mode 100644 index 0000000..cecc98c --- /dev/null +++ b/man/hline.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/differiential_expression.R +\name{hline} +\alias{hline} +\title{Function to draw a plotly horizontal line} +\usage{ +hline(y = 0, color = "black") +} +\arguments{ +\item{y}{Location of horizontal line} + +\item{color}{Color of horizontal line} +} +\value{ +a list containing plotly parameters +} +\description{ +Function to draw a plotly horizontal line +} diff --git a/man/load_matrix.Rd b/man/load_matrix.Rd index 976867a..59a93f6 100644 --- a/man/load_matrix.Rd +++ b/man/load_matrix.Rd @@ -4,14 +4,15 @@ \alias{load_matrix} \title{Build the deseq2 count matrix from design file} \usage{ -load_matrix(design, path, formula) +load_matrix(design_table, path, my_formula) } \arguments{ -\item{design}{A design file with the column count_files, sample and condition} +\item{design_table}{A dataframe with the column count_files, sample and +condition. Other columns corresponding to cofactors can be present} \item{path}{The path were the count file are stored} -\item{formula}{The formula to use in DESeq2} +\item{my_formula}{The formula to use in DESeq2} } \value{ A DESeqDataset object filtered diff --git a/man/make_html_pca.Rd b/man/make_html_pca.Rd new file mode 100644 index 0000000..44eac28 --- /dev/null +++ b/man/make_html_pca.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plots.R +\name{make_html_pca} +\alias{make_html_pca} +\title{Create plotly PCA plot} +\usage{ +make_html_pca(pca_data, percent_var, output_folder, columns) +} +\arguments{ +\item{pca_data}{Object returned by DESeq2::plotPCA containing PCA table} + +\item{percent_var}{Vector containing the percentage of variance +of PC1 and PC2} + +\item{output_folder}{Folder where the figure will be created} + +\item{columns}{The design columns} +} +\description{ +Create plotly PCA plot +} diff --git a/man/make_pca.Rd b/man/make_pca.Rd new file mode 100644 index 0000000..f312f9f --- /dev/null +++ b/man/make_pca.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plots.R +\name{make_pca} +\alias{make_pca} +\title{Make ggplot PCA} +\usage{ +make_pca(pca_data, percent_var, columns, dds) +} +\arguments{ +\item{pca_data}{Object returned by DESeq2::plotPCA containing PCA table} + +\item{percent_var}{Vector containing the percentage of variance +of PC1 and PC2} + +\item{columns}{A vector containing the columns to display in PCA data} + +\item{dds}{a DESeqDataSet object} +} +\description{ +Make ggplot PCA +} diff --git a/man/run_deseq2.Rd b/man/run_deseq2.Rd index e9b18c1..e139a16 100644 --- a/man/run_deseq2.Rd +++ b/man/run_deseq2.Rd @@ -5,36 +5,55 @@ \title{DESeq2 wrapper} \usage{ run_deseq2( - design, + design_table, path, - formula, - filter_file, - min_expression, - output_folder, my_contrasts, - basemean_threshold, - lfc_threshold + my_formula = "~ condition", + filter_list = NULL, + min_expression = 2, + output_folder = ".", + basemean_threshold = 0, + lfc_threshold = 0 ) } \arguments{ -\item{design}{A design file with the column count_files, sample and condition} +\item{design_table}{A dataframe with the column count_files, sample and +condition. Other columns corresponding to cofactors can be present} \item{path}{The path were the count file are stored} -\item{formula}{The formula to use in DESeq2} +\item{my_formula}{The formula to use in DESeq2 (default '~ condition')} -\item{filter_file}{A file containing genes} +\item{filter_list}{A vector containing the list of genes to keep in the +analysis. To keep all gene use a NULL object, (default NULL)} \item{min_expression}{The minimum average required expression across -all samples to keep the gene} +all samples to keep the gene (default 2)} -\item{output_folder}{Folder were the matrices will be produced} +\item{output_folder}{Folder were the matrices will be produced (default .)} -\item{lfc_threshold}{The minimum fold change to consider a gene significant} +\item{lfc_threshold}{The minimum fold change to consider a gene significant +(default 0)} -\item{my_contrast}{A list containing contrast vectors} +\item{my_contrast}{A list containing contrast vectors: you can use +list(c('condition', 'TEST', 'CTRL') to build it)} -\item{basemean_threshold:}{The minimum basemean of genes to be kept} +\item{basemean_threshold:}{The minimum basemean of genes to be kept +(default 0)} +} +\value{ +A list containing for each comparison given in my_contrasts +(keys of the list) a sublist containing: +\enumerate{ +\item at \code{data} key: A dataframe indicating The number of differentially +expressed genes and the number of up and down regulated genes +\item at \code{dds} key: The dds object corresponding to a DESeqDatase object +obtained after running the DESeq function. +\item at \code{results} key: A dataframe containing the results of DEseQ2 analysis +but for all gene +\item at \code{de_results} key: A dataframe containing only differentially expressed +genes +} } \description{ DESeq2 wrapper @@ -45,6 +64,6 @@ perform a complete DESeq2 analysis including: \item Sample loading \item Normalisation \item Figure creation -\item Differential expression analysis for the hcosen contrasts +\item Differential expression analysis for the chosen contrasts } } diff --git a/man/vline.Rd b/man/vline.Rd new file mode 100644 index 0000000..bc6a8ea --- /dev/null +++ b/man/vline.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/differiential_expression.R +\name{vline} +\alias{vline} +\title{Function to draw a plotly horizontal line} +\usage{ +vline(x = 0, color = "black") +} +\arguments{ +\item{x}{Location of vertical line} + +\item{color}{Color of vertical line} +} +\value{ +a list containing plotly parameters +} +\description{ +Function to draw a plotly horizontal line +} -- GitLab