Wrapper function for galaxy's joinWrapper
ctk_joinWrapper(
file1,
file2,
field1,
field2,
mode,
outFile = file.path(dirname(file1), paste0("Unique_", basename(file1))),
sb = "joinWrapper.py",
python = "python",
stderr = file.path(dirname(file1), paste0(basename(file1),
"_ctk_joinWrapper_stderr.txt")),
stdout = file.path(dirname(file1), paste0(basename(file1),
"_ctk_joinWrapper_stdout.txt")),
useClipRConda = ifelse(is.null(getOption("CLIPflexR.condaEnv")), FALSE, TRUE),
additional_Args = NULL,
verbose = FALSE,
writelog = T
)
path to file 1 to join (BED or tab delimited text).
path to file 2 to join (BED or tab delimited text).
field/column for file 1 join.
field/column for file 2 join.
join mode.
path to output file.
path to joinWrapper.py from Galaxy
path to python.
path to stdout file.
path to stdout file.
use conda environment installed by Herper, TRUE (default) or FALSE.
additional arguments to be passed to system call.
print messages, TRUE or FALSE (default).
write stderr/stdout logs, TRUE (default) or FALSE.
path to joined file.
if (FALSE) {
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"))
mutationFile <- system.file("extdata/Fox3_Std_small_mutation.txt",package="CLIPflexR")
parsedAlignment <- ctk_parseAlignment(bam,mutationFile=mutationFile)
uniqueTags <- ctk_tag2collapse(parsedAlignment,weight=FALSE,randomBarcode=FALSE,
weightInName=FALSE,verbose=TRUE)
ctk_joinWrapper(mutationFile,uniqueTags,4,4,"N",verbose=TRUE)
}