Wrapper function for ctk's stripBarcode
ctk_stripBarcode(
filesToRun,
outFile = paste(file_path_sans_ext(fileToRun), "_rm5.", file_ext(fileToRun), sep = ""),
sb = "stripBarcode.pl",
perl = "perl",
PATHTOPERLLIB = NULL,
linkerlength = 27,
inputFormat = "fasta",
barcodeStartWith = NULL,
barcodeEndWith = NULL,
stderr = file.path(dirname(fileToRun), paste0(basename(fileToRun),
"_stripBarcode_stderr.txt")),
stdout = file.path(dirname(fileToRun), paste0(basename(fileToRun),
"_stripBarcode_stdout.txt")),
useClipRConda = ifelse(is.null(getOption("CLIPflexR.condaEnv")), FALSE, TRUE),
additional_Args = NULL,
verbose = FALSE,
writelog = T
)
path to file to process (fastq or fasta).
path to output file (fastq or fasta).
path to stripBarcode.pl from CTK.
path to PERL.
path to PERL5LIB.
length of barcode/linker sequences (default is 27).
input file format, "fasta" (default) or "fastq"
filter sequences based on the starting nucleotides in the barcode.
filter sequences based on the ending nucleotides in the barcode.
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 file with index stripped, in the same format as the input file.
testFQ <- system.file("extdata/Fox3_Std_small.fq.gz",package="CLIPflexR")
FqFile_FF <- ctk_fastqFilter(testFQ,qsFilter="mean:0-29:20",verbose=TRUE)
#> fastq_filter.pl command is /Users/runner/Library/r-miniconda/envs/CLIPflexR_0.1.20/bin/ctk/fastq_filter.pl
#> fastq_filter.pl arguments are /Users/runner/Library/r-miniconda/envs/CLIPflexR_0.1.20/bin/ctk/fastq_filter.pl -if sanger -of fastq -f mean:0-29:20 /Users/runner/work/_temp/Library/CLIPflexR/extdata/Fox3_Std_small.fq.gz /Users/runner/work/_temp/Library/CLIPflexR/extdata/FF_Fox3_Std_small.fq.gz
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)
#> fastq_filter.pl command is /Users/runner/Library/r-miniconda/envs/CLIPflexR_0.1.20/bin/ctk/fastq2collapse.pl
#> fastq_filter.pl arguments are /Users/runner/Library/r-miniconda/envs/CLIPflexR_0.1.20/bin/ctk/fastq2collapse.pl /Users/runner/work/_temp/Library/CLIPflexR/extdata/QT_FF_Fox3_Std_small_clip.fq /Users/runner/work/_temp/Library/CLIPflexR/extdata/Collapsed_QT_FF_Fox3_Std_small_clip.fq
FqFile_QFColStripped <- ctk_stripBarcode(FqFile_Col,linkerlength=5,inputFormat="fastq")