From 8c413eab4c1873a392e127f50ca039a83f50d104 Mon Sep 17 00:00:00 2001 From: Brandi Cantarel <brandi.cantarel@utsouthwestern.edu> Date: Fri, 7 Feb 2020 13:04:05 -0600 Subject: [PATCH] filter option trimgalore --- preproc_fastq/trimgalore.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/preproc_fastq/trimgalore.sh b/preproc_fastq/trimgalore.sh index 1ae8ba1..e1e2966 100644 --- a/preproc_fastq/trimgalore.sh +++ b/preproc_fastq/trimgalore.sh @@ -10,12 +10,13 @@ usage() { exit 1 } OPTIND=1 # Reset OPTIND -while getopts :a:b:p:h opt +while getopts :a:b:p:fh opt do case $opt in a) fq1=$OPTARG;; b) fq2=$OPTARG;; p) pair_id=$OPTARG;; + f) filter=1;; h) usage;; esac done @@ -42,3 +43,8 @@ else mv ${r1base}_trimmed.fq.gz ${pair_id}.trim.R1.fastq.gz cp ${pair_id}.trim.R1.fastq.gz ${pair_id}.trim.R2.fastq.gz fi + +if [[ $filter == 1 ]] +then + perl $baseDir/parse_trimreport.pl ${pair_id}.trimreport.txt *trimming_report.txt +fi -- GitLab