Wrapper function for ctk's CIMS

ctk_cims(
  filesToRun,
  mutationBedFile,
  outFile = paste(file_path_sans_ext(fileToRun), "CIMS", "txt", sep = "."),
  sb = "CIMS.pl",
  perl = "perl",
  PATHTOPERLLIB = NULL,
  bigFile = FALSE,
  mutationSize = 1,
  permutations = 5,
  trackMutationPos = FALSE,
  noSparseCorrect = FALSE,
  FDR = 1,
  mfr = 0,
  cacheDir = paste0(filesToRun, "_cache", paste(sample(letters, 10), collapse = "")),
  stderr = file.path(dirname(fileToRun), paste0(basename(fileToRun), "_cims_stderr.txt")),
  stdout = file.path(dirname(fileToRun), paste0(basename(fileToRun), "_cims_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).

mutationBedFile

mutation BED file.

outFile

path to output file (BED & text).

sb

path to CIMS.pl from CTK.

perl

path to PERL.

PATHTOPERLLIB

path to PERL5LIB.

bigFile

big file, TRUE or FALSE (default).

mutationSize

mutation size (default is 1).

permutations

number of iterations for permutation (default is 5).

trackMutationPos

track mutation position relative to read start, TRUE or FALSE (default).

noSparseCorrect

no sparcity correction, TRUE or FALSE (default).

FDR

threshold of FDR (default is 1).

mfr

threshold of m-over-k-ratio (default is 0).

cacheDir

name for cache directory.

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 CIMS text & bed files.

Author

Kathryn Rozen-Gagnon

Examples

if (FALSE) {
mutations <- system.file("extdata/BrdU.Fox.pool.tag.uniq.mutation.small.txt",package="CLIPflexR")
delBed <- ctk_getMutationType(mutations)
ctk_cims("~/Downloads/uniq_tags_mutations/Fox.pool.tag.uniq.rgb.bed",delBed,verbose=TRUE)
}