qualityScores_EM: Wrapper function to calculate EM metrics

Description Usage Arguments Value Examples

View source: R/GlobalFunctions.R

Description

Wrapper that reads bam files and provides EM QC-metrics from cross-correlation analysis, peak calling and general metrics like for example the read-length or NRF. In total 22 features are calculated.

qualityScores_EM

Usage

1
2
qualityScores_EM(chipName, inputName, read_length, annotationID = "hg19",
    mc = 1, savePlotPath = NULL, debug = FALSE)

Arguments

chipName

String, filename and path to the ChIP bam file (without extension)

inputName

String, filename and path to the Input bam file (without extension)

read_length

Integer, length of the reads

annotationID

String, indicating the genome assembly (Default="hg19")

mc

Integer, the number of CPUs for parallelization (default=1)

savePlotPath,

set if Cross-correlation plot should be saved under "savePlotPath". Default=NULL and plot will be forwarded to stdout

debug

Boolean, to enter debugging mode. Intermediate files are saved in working directory

Value

returnList, contains QCscores_ChIP List of QC-metrics with crosscorrelation values for the ChIP QCscores_binding List of QCscores from peak calls TagDensityChip Tag-density profile, smoothed by the Gaussian kernel (for further details see "spp" package) TagDensityInput Tag density-profile, smoothed by the Gaussian kernel (for further details see "spp" package)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## This command is time intensive to run

## To run this example code the user MUST provide 2 bam files: one for ChIP 
## and one for the input". Here we used ChIP-seq data from ENCODE. Two 
## example files can be downloaded using the following link:
## https://www.encodeproject.org/files/ENCFF000BFX/
## https://www.encodeproject.org/files/ENCFF000BDQ/
## and save them in the working directory (here given in the temporary 
## directory "filepath"

mc=4
## Not run: 

filepath=tempdir()
setwd(filepath)

system("wget 
https://www.encodeproject.org/files/ENCFF000BFX/@download/ENCFF000BFX.bam")
system("wget 
https://www.encodeproject.org/files/ENCFF000BDQ/@download/ENCFF000BDQ.bam")

chipName=file.path(filepath,"ENCFF000BFX")
inputName=file.path(filepath,"ENCFF000BDQ")

CC_Result=qualityScores_EM(chipName=chipName, inputName=inputName, 
read_length=36, mc=mc, annotationID = "hg19")

## End(Not run)

ChIC documentation built on Nov. 8, 2020, 5:15 p.m.