batchQC: Checks for presence of batch effect and creates a html report...

Description Usage Arguments Value Examples

View source: R/batchQC.R

Description

Checks for presence of batch effect and creates a html report with information including whether the batch needs to be adjusted

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
batchQC(
  dat,
  batch,
  condition = NULL,
  report_file = "batchqc_report.html",
  report_dir = ".",
  report_option_binary = "111111111",
  view_report = FALSE,
  interactive = TRUE,
  batchqc_output = FALSE,
  log2cpm_transform = FALSE
)

Arguments

dat

Given data or simulated data from rnaseq_sim()

batch

Batch covariate

condition

Covariates or conditions of interest besides batch

report_file

Output report file name

report_dir

Output report directory path

report_option_binary

9 bits Binary String representing the plots to display and hide in the report

view_report

when TRUE, opens the report in a browser

interactive

when TRUE, opens the interactive shinyApp

batchqc_output

when TRUE, creates BatchQCout object in batchqc_output.rda R object file

log2cpm_transform

when TRUE, transforms the data using log2CPM - log2 Counts Per Million transformation function

Value

outputfile Report file generated by batchQC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
nbatch <- 3
ncond <- 2
npercond <- 10
data.matrix <- rnaseq_sim(ngenes=50, nbatch=nbatch, ncond=ncond, npercond=
    npercond, basemean=10000, ggstep=50, bbstep=2000, ccstep=800, 
    basedisp=100, bdispstep=-10, swvar=1000, seed=1234)
batch <- rep(1:nbatch, each=ncond*npercond)
condition <- rep(rep(1:ncond, each=npercond), nbatch)
batchQC(data.matrix, batch=batch, condition=condition, view_report=FALSE, 
    interactive=FALSE)

BatchQC documentation built on Nov. 8, 2020, 8:30 p.m.