filterIntbias: Method filterIntbias

Description Usage Arguments Value Author(s) See Also Examples

Description

Method filterIntbias

Filters the data frame available within a BaalChIP object (slot alleleCounts). This filter performs simulations of reads of the same length as the original ChIP-seq reads, aligns the simulated reads to the genome, calculates the allelic ratios for each variant and finally ignores those variants for which the allelic ratio (REF/TOTAL) is different than 0.5.

Usage

1
2
3
4
5
6
7
8
filterIntbias(.Object, simul_output = NULL, tmpfile_prefix = NULL,
  simulation_script = "local", alignmentSimulArgs = NULL,
  skipScriptRun = FALSE, verbose = TRUE)

## S4 method for signature 'BaalChIP'
filterIntbias(.Object, simul_output = NULL,
  tmpfile_prefix = NULL, simulation_script = "local",
  alignmentSimulArgs = NULL, skipScriptRun = FALSE, verbose = TRUE)

Arguments

.Object

An object of the BaalChIP class.

simul_output

a non-empty character vector giving the directory of where to save the FASTQ and BAM files generated by the function. If NULL, a random directory under the current working directory will be generated.

tmpfile_prefix

an optional character vector giving the initial part of the name of the FASTQ and BAM files generated by the function. If NULL, a random name will be generated.

simulation_script

the file path for simulation script containing the instructions of simulation and alignment commands. If NULL, the default simulation script distributed with BaalChIP ('extra/simulation_run.sh') will be used.

alignmentSimulArgs

a character vector with arguments to the simulation script. If NULL no arguments are passed.

skipScriptRun

a logical value indicating if simulation BAM files should not be generated. If TRUE BaalChIP will look for the BAM files in the 'simul_output/temp_prefix' (default is FALSE).

verbose

logical. If TRUE reports extra information on the process

Value

An updated BaalChIP object with the slot alleleCounts containing a list of GRanges objects that pass filters.

Author(s)

Ines de Santiago

See Also

BaalChIP.get, plotQC, summaryQC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
setwd(system.file('test',package='BaalChIP'))
samplesheet <- 'exampleChIP.tsv'
hets <- c('MCF7'='MCF7_hetSNP.txt', 'GM12891'='GM12891_hetSNP.txt')
res <- BaalChIP(samplesheet=samplesheet, hets=hets)
res <- alleleCounts(res, min_base_quality=10, min_mapq=15)
skipScriptRun=TRUE #For demonstration purposes only (read details in vignette)
res <- filterIntbias(res,
      simul_output=system.file('test/simuloutput',package='BaalChIP'),
      tmpfile_prefix='c67c6ec6c433', skipScriptRun=TRUE)

#check results
plotSimul(res)
summaryQC(res)

BaalChIP documentation built on Nov. 8, 2020, 5:23 p.m.