chicWrapper: ChIC analysis in one command

Description Usage Arguments Value Examples

View source: R/chicWrapper.R

Description

This function creates a single document (in pdf format) containing all the analysis plots produced by ChIC: the CrossCorrelation profile of the immunoprecipitation, the fingerprint plot and the different metagene profiles and returns the ChIC RF score.

chicWrapper

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
chicWrapper(
  chipName,
  inputName,
  read_length,
  savePlotPath = getwd(),
  target,
  annotationID,
  mc = 1,
  debug = FALSE
)

Arguments

chipName

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

inputName

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

read_length

Integer, length of the sequencing reads

savePlotPath

path, needs to be set to save the summary plot under "savePlotPath" (default=getwd()). In the current version of the code we MUST save the output summary plots in a PDF file. If the end users really needs to suppress the PDF output, they can use the "/dev/null" as output savePlotPath

target

String, chromatin mark or transcription factor to be analysed. Using the function "listAvailableElements" with the keywords "mark" and "TF" shows a list with the available elements.

annotationID

String, indicating the genome assembly

mc

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

debug

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

Value

ChIC RF score, returns the rnadom forest prediction score of the predictionScore() function, produces the summary report and saves it under "savePlotPath".

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
29
30
## 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=5
## Not run: 

filepath=tempdir()
setwd(filepath)

target= "H3K4me3"
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")

prediction=chicWrapper(chipName=chipName, inputName=inputName, 
target= "H3K4me3", read_length=36, mc=mc , savePlotPath=filepath)
print(prediction)

## End(Not run)

carmencita/CHIC documentation built on May 2, 2021, 5:09 p.m.