# Batch Effects Quality Control Software

## Documentation for package ‘BatchQC’ version 2.8.0

- DESCRIPTION file
- User guides, package vignettes and other documentation
- Package NEWS
- Package README

## Help Pages

AIC_boxplots | Boxplots for the distribution of AIC for each method
BatchQC | Run BatchQC shiny app
batchqc_explained_variation | Returns a list of explained variation by batch and condition combinations
batch_correct | Batch Correct This function allows you to Add batch corrected count matrix to the SE object
batch_design | This function allows you to make a batch design matrix
batch_indicator | Batch and Condition indicator for signature data
bisect | bisect - a generic bisection function
bladder_data_upload | Bladder data upload This function uploads the Bladder data set from the bladderbatch package. This dataset is from bladder cancer data with 22,283 different microarray gene expression data. It has 57 bladder samples with 3 metadata variables (batch, outcome and cancer). It contains 5 batches, 3 cancer types (cancer, biopsy, control), and 5 outcomes (Biopsy, mTCC, sTCC-CIS, sTCC+CIS, and Normal). Batch 1 contains only cancer, 2 has cancer and controls, 3 has only controls, 4 contains only biopsy, and 5 contains cancer and biopsy
BMI_data | This function returns BMI data that comes form the data in "Comparing tuberculosis gene signatures in malnourished individuals using the TBSignatureProfiler" paper. Subject IDs were matched as shown on "github.com/jessmcc22/BatchQCv2_Manuscript/blob/devel/R/subjectID_match.R"
check_valid_input | Helper function to save variables as factors if not already factors
color_palette | Color palette
ComBat_correction | ComBat Correction This function applies ComBat correction to your summarized experiment object
ComBat_seq_correction | ComBat-Seq Correction This function applies ComBat-seq correction to your summarized experiment object
commentary | This function creates the commentary recommendation when there are more than 20 samples.
compute_aic | Compute the AIC for lognormal (ComBat) model, negative binomial (ComBat-seq) model and the Voom model
compute_lambda | Compute the lambda index for determining a need for batch correction
confound_metrics | Combine std. Pearson correlation coefficient and Cramer's V
cor_props | This function allows you to calculate correlation properties
covariates_not_confounded | Returns list of covariates not confounded by batch; helper function for explained variation and for populating shiny app condition options
cramers_v | This function allows you to calculate Cramer's V
dendrogram_alpha_numeric_check | Dendrogram alpha or numeric checker
dendrogram_color_palette | Dendrogram color palette
dendrogram_plotter | Dendrogram Plot
DESeq2_small_size | This function calculated the goodness of fit of DESeq2 for small sample sizes (intended for less than 20 samples).
DESeq_large_analysis | This function calculated the goodness of fit of DESeq2 for larger sample sizes (intended for more than 150 samples).
DE_analyze | Differential Expression Analysis
edgeR_large_analysis | This function calculated the goodness of fit of edgeR for larger sample sizes (intended for more than 150 samples).
edgeR_small_size | This function calculated the goodness of fit of edgeR for small sample sizes (intended for less than or equal to 20 samples).
EV_plotter | This function allows you to plot explained variation
EV_table | EV Table Returns table with percent variation explained for specified number of genes
get.res | Helper function to get residuals
goodness_of_fit_nb | This function calculates goodness-of-fit pvalues for all genes by looking at how the NB model by edgeR or DESeq2 fit the data
Harman_correction | Harman Correction This function applies Harman correction to a summarized experiment object with and reconstructs the data back into the original feature space
heatmap_num_to_char_converter | Heatmap numeric to character converter
heatmap_plotter | Heatmap Plotter
is_design_balanced | Check if the experimental design is balanced or unbalanced
kBET | kBET - k-nearest neighbour batch effect test
limma_correction | Limma Correction This function applies limma batch correction to your provided assay
merged_IDs | BMI and matched sample names for TB data
nb_histogram | This function creates a histogram from the negative binomial goodness-of-fit adjusted pvalues.
nb_proportion | This function determines the proportion of p-values below a specific value and compares to the previously determined threshold
normalize_SE | This function allows you to add normalized count matrix to the SE object
PCA_plotter | This function allows you to plot PCA
permuted_DESeq | This function performs DESeq on the permuted dataset.
permuted_edgeR | This function performs edgeR on the permuted dataset adjusted pvalues.
plot_data | This function formats the PCA plot using ggplot
plot_kBET | kBET Rejection Plotter
possible_distances | Create potential min_distance values for exploratory analysis based on the value of spread
possible_k_neighbors | Create a vector of possible nearest neighbor values from 5, 15, 25, 50, and 100
preprocess | Preprocess assay data
process_dendrogram | Process Dendrogram
protein_data | Protein data with 39 protein expression levels
protein_sample_info | Batch and Condition indicator for protein expression data
pval_plotter | P-value Plotter This function allows you to plot p-values of explained variation
pval_summary | Returns summary table for p-values of explained variation
ratio_plotter | This function allows you to plot ratios of explained variation
run_AIC_models | Helper function that contains the code to run the lognormal, voom, and negative binomial AIC models for 'compute_aic'
run_kBET | kBET rejection rate
run_lambda | Provide a recommendation on batch correction based on lambda calculation
signature_data | Signature data with 1600 gene expression levels
std_pearson_corr_coef | Calculate a standardized Pearson correlation coefficient
summarized_experiment | This function creates a summarized experiment object from count and metadata files uploaded by the user
summary_stats_EV_table | Summary Stats EV Table Returns table with min, 1st quartile, mean, 2nd quartile, and max for each variable in the explained variation boxplot
svaseq_correction | svaseq Correction This function applies sva correction to a summarized experiment object with count based RNA-seq data
sva_correction | sva Correction This function applies sva correction to a summarized experiment object (implementation adapted from sva::psva)
tb_data_upload | TB data upload This function uploads the TB data set from the curatedTBData package.
umap | Create a umap plot; wrapper function for umap package plus custom plotting
variation_ratios | Creates Ratios of batch to variable variation statistic
volcano_plot | Volcano plot