This function runs a complete RNA-seq analysis pipeline including quality control, differential expression analysis, and gene set enrichment analysis for all possible comparisons in the experiment. It generates various plots and saves results in organized directories.
Usage
run_rna_pip(
dds,
org,
group_by,
remove_xy = FALSE,
remove_mt = FALSE,
quantile = 0.05,
pals = NULL,
batch = NULL,
order = "pxfc",
save_dir = getwd()
)Arguments
- dds
DESeq2 object
- org
The organism to use, either "human" or "mouse".
- group_by
Column name in colData(dds) to use for grouping.
- remove_xy
Logical. If TRUE, removes genes on X and Y chromosomes. Default is FALSE
- remove_mt
Logical. If TRUE, removes mitochondrial genes. Default is FALSE
- quantile
Quantile threshold for filtering lowly expressed genes. Default is 0.05
- pals
Vector of colors to use for groups. If NULL, uses default ggplot2 colors. Default is NULL
- batch
Column name in colData(dds) to use for batch correction. Default is NULL
- order
Column name to use for ranking genes. Default is "pxfc"
- save_dir
Directory where all output files will be saved. Default is current working directory
Examples
if (FALSE) { # \dontrun{
# Run complete pipeline with default settings
dds <- run_rna_pip(dds)
# Run pipeline with custom settings
dds <- run_rna_pip(dds,
org = "mouse",
remove_xy = TRUE,
group_by = "Treatment",
save_dir = "output")
# Run pipeline with batch correction
dds <- run_rna_pip(dds, batch = "Batch")
} # }