Wrapper function for ctk's bed2rgb

ctk_bed2rgb(
  filesToRun,
  outFile = paste0(file_path_sans_ext(filesToRun), ".RGB.", file_ext(filesToRun)),
  sb = "bed2rgb.pl",
  perl = "perl",
  PATHTOPERLLIB = NULL,
  col = "blue",
  stderr = file.path(dirname(fileToRun), paste0(basename(fileToRun),
    "_ctk_bed2rgb_stderr.txt")),
  stdout = file.path(dirname(fileToRun), paste0(basename(fileToRun),
    "_ctk_bed2rgb_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).

sb

path to bed2rgb.pl from CTK.

perl

path to PERL.

PATHTOPERLLIB

path to PERL5LIB.

col

color to include in BED rgb column (default is "blue").

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 with color specified.

Author

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")
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)
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)
myCollapsed <- ctk_tag2collapse(parsedAlignment,weight=FALSE,randomBarcode=FALSE,
weightInName=FALSE,verbose=TRUE)
#> tag2collapse.pl command is /Users/runner/Library/r-miniconda/envs/CLIPflexR_0.1.20/bin/ctk/tag2collapse.pl
#> tag2collapse.pl arguments are /Users/runner/Library/r-miniconda/envs/CLIPflexR_0.1.20/bin/ctk/tag2collapse.pl  --keep-tag-name   --keep-max-score   -EM -1  --seq-error-model em-local  /Users/runner/work/_temp/Library/CLIPflexR/extdata/Collapsed_QT_FF_Fox3_Std_small_clip_rm5.bed  /Users/runner/work/_temp/Library/CLIPflexR/extdata/TC_Collapsed_QT_FF_Fox3_Std_small_clip_rm5.bed 
ctk_bed2rgb(myCollapsed,col="128,0,0")
#> [1] "/Users/runner/work/_temp/Library/CLIPflexR/extdata/TC_Collapsed_QT_FF_Fox3_Std_small_clip_rm5.RGB.bed"