run_deeptools: Run Deeptools

View source: R/run_deeptools.R

run_deeptoolsR Documentation

Run Deeptools

Description

Runs the deeptools suite of programs

Usage

run_deeptools(
  command = NULL,
  input = NULL,
  control = NULL,
  output = NULL,
  sample.names = NULL,
  gtf = NULL,
  before.region = NULL,
  region.bases = NULL,
  after.region = NULL,
  plotType = NULL,
  kmeans = NULL,
  effective.genome.size = NULL,
  normalization = NULL,
  scale.factors = NULL,
  threads = 10,
  parallel = FALSE,
  cores = 4,
  execute = TRUE,
  deeptools = NULL,
  version = FALSE
)

Arguments

command

deeptools command to run, at present can choose from bamCoverage, computeMatrix and plotHeatmap, required

input

List of files to be processed, required

control

List of input control files, for bamCompare only

output

Name of output direcotry

sample.names

list of the sample name

gtf

Path to the gtf file

before.region

Distance upstream of the reference-point selected

region.bases

Distance in bases to which all regions will be fit

after.region

Distance downstream of the reference-point selected

plotType

Type of plot can select lines, fill, se, std, overlapped_lines or heatmap

kmeans

Number of kmeans clusters to compute.

effective.genome.size

The effective genome size is the portion of the genome that is mappable. Large fractions of the genome are stretches of NNNN that should be discarded. A table of values is available here: http://deeptools.readthedocs.io/en/latest/content/feature/effectiveGenomeSize.html

normalization

Possible choices: RPKM (Reads Per Kilobase per Million mapped reads), CPM (Counts Per Million mapped reads), BPM (Bins Per Million mapped reads, similar to TPM), RPGC (reads per genomic content)

scale.factors

Method to use to scale the samples. Possible choices: readCount, SES and None

threads

Number of threads for each instance of deeptools to use, default set to 10

parallel

Run in parallel, default set to FALSE

cores

Number of cores/threads to use for parallel processing, default set to 4

execute

Whether to execute the commands or not, default set to TRUE

deeptools

Path to the where the deeptools programs are sorted (usually /usr/local/bin), required

version

Returns the version number

Value

A list with the deeptools commands

Examples

## Not run: 
path <- "/usr/local/bin/"

# Version
command <- "deeptools"

deeptools.cmd <- run_deeptools(command = command,
                               deeptools.path = path,
                               version = TRUE)
deeptools.cmd

# Bam to bigwig
command <- "bamCoverage"
input.names <- "list of input file paths"
output.dir <- "directoryname"
output.names <- "list of names for samples"

deeptools.cmd <- run_deeptools(command = command,
                               input = input,
                               output = output,
                               sample.names = sample.names,
                               deeptools = path)
deeptools.cmd

# Bigwig to matrix
command <- "computeMatrix"
gtf <- "path/to/gtf"
input.names <- "list of input file paths"
output.dir <- "directoryname"
output.names <- "list of names for samples"

deeptools.cmd <- run_deeptools(command = command,
                               input = matrix.lists,
                               output = output,
                               sample.names = output.names,
                               gtf = gtf,
                               # parallel = TRUE,
                               # cores = 6,
                               deeptools = path)
deeptools.cmd

# plot heatmap
command <- "plotHeatmap"
input.names <- "list of input file paths"
output.dir <- "directoryname"
output.names <- "list of names for samples"

deeptools.cmd <- run_deeptools(command = command,
                               input = input.names,
                               output = output.dir
                               sample.names = output.names,
                               # parallel = TRUE,
                               # cores = 6,
                               deeptools = path)
deeptools.cmd

## End(Not run)

GrahamHamilton/pipelineTools documentation built on March 5, 2024, 12:23 p.m.