ctk_tag2peak: Wrapper function for ctk's bed2rgb

View source: R/wrapperFunctions_ctk.R

ctk_tag2peakR Documentation

Wrapper function for ctk's bed2rgb

Description

Wrapper function for ctk's bed2rgb

Usage

ctk_tag2peak(
  filesToRun,
  outFile = paste0(file_path_sans_ext(filesToRun), ".peak.bed"),
  outBoundary = paste0(file_path_sans_ext(filesToRun), ".boundary.bed"),
  outHalfPH = paste0(file_path_sans_ext(filesToRun), ".halfPF.bed"),
  sb = "tag2peak.pl",
  perl = "perl",
  PATHTOPERLLIB = NULL,
  bigFile = FALSE,
  ss = TRUE,
  valleySeeking = TRUE,
  valleyDepth = 0.9,
  genes = NULL,
  multiTest = FALSE,
  useExpr = FALSE,
  skipOutOfRangePeaks = FALSE,
  pCutOff = 0.01,
  minPH = 2,
  maxPH = -1,
  gap = -1,
  peakPrefix = "Peak",
  stderr = file.path(dirname(fileToRun), paste0(basename(fileToRun),
    "_ctk_tag2peak_stderr.txt")),
  stdout = file.path(dirname(fileToRun), paste0(basename(fileToRun),
    "_ctk_tag2peak_stdout.txt")),
  useClipRConda = ifelse(is.null(getOption("CLIPflexR.condaEnv")), FALSE, TRUE),
  additional_Args = NULL,
  verbose = FALSE,
  writelog = T
)

Arguments

filesToRun

path to file to process (BED).

outFile

path to output file (BED).

outBoundary

output cluster boundaries.

outHalfPH

output half peak height boundaries.

sb

path to tag2peak.pl from CTK.

perl

path to PERL.

PATHTOPERLLIB

path to PERL5LIB.

bigFile

big input file, TRUE or FALSE (default).

ss

separate the two strands, TRUE (default) or FALSE.

valleySeeking

find candidate peaks by valley seeking.

valleyDepth

depth of valley if valley seeking (between 0.5 and 1, default is 0.9).

genes

custom gene bed file for scan statistics (will override –dbkey)

multiTest

do Bonferroni multiple test correction.

useExpr

use expression levels given in the score column in the gene bed file for normalization.

skipOutOfRangePeaks

Remove out of bounds ranges.

pCutOff

threshold of p-value to call peak (e.g. 0.01).

minPH

min peak height.

maxPH

max peak height.

gap

merge cluster peaks closer than the gap (-1, no merge if < 0).

peakPrefix

prefix of peak id (Peak) (so output file will look like Peak1, Peak2, etc).

stderr

path to stdout file.

stdout

path to stdout file.

useClipRConda

use conda environment installed by Herper, TRUE (default) or FALSE.

additional_Args

additional arguments to be passed to system call.

verbose

print messages, TRUE or FALSE (default).

writelog

write stderr/stdout logs, TRUE (default) or FALSE

Value

path to BED file.

Author(s)

Kathryn Rozen-Gagnon

Examples

testFasta <- system.file("extdata/hg19Small.fa",package="CLIPflexR")
myIndex <-suppressWarnings(bowtie2_index(testFasta, overwrite = TRUE))
testFQ <- system.file("extdata/Fox3_Std_small.fq.gz",package="CLIPflexR")
FqFile_FF <- ctk_fastqFilter(testFQ,qsFilter="mean:0-29:20",verbose=TRUE)
FqFile <- decompress(FqFile_FF,overwrite=TRUE)
FqFile_clipped <- fastx_clipper(FqFile,length=20)
FqFile_QF <- fastq_quality_trimmer(FqFile_clipped)
FqFile_Col <- ctk_fastq2collapse(FqFile_QF,verbose=TRUE)
FqFile_QFColStripped <- ctk_stripBarcode(FqFile_Col,linkerlength=5,inputFormat="fastq")
bam <- suppressWarnings(bowtie_align(FqFile_QFColStripped,myIndex, 
overwrite=TRUE, inputFormat="fastq"))
parsedAlignment <- ctk_parseAlignment(bam)
myCollaped <- ctk_tag2collapse(parsedAlignment,weight=FALSE,randomBarcode=FALSE,
weightInName=FALSE,verbose=TRUE)
myrgbBed <- ctk_bed2rgb(myCollaped,col="128,0,0")
ctk_tag2profile(myrgbBed,verbose=TRUE)

kathrynrozengagnon/CLIPflexR documentation built on Dec. 8, 2022, 7:31 p.m.