From c3e5db490810753b2c0268811e5f3c59f3079eb1 Mon Sep 17 00:00:00 2001 From: skchronicles Date: Wed, 10 Apr 2024 10:42:10 -0400 Subject: [PATCH] Create fastqc adapters TSV file from fasta file --- workflow/rules/qc.smk | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/workflow/rules/qc.smk b/workflow/rules/qc.smk index 2459200..f164d0e 100644 --- a/workflow/rules/qc.smk +++ b/workflow/rules/qc.smk @@ -30,13 +30,19 @@ rule fastqc_raw: tmp=$(mktemp -d -p "{params.tmpdir}") trap 'rm -rf "${{tmp}}"' EXIT + # Create fastqc adapters file, + # file needs to be in TSV format + paste - - < "{params.adapters}" \\ + | sed 's/^>//g' \\ + > "${{tmp}}/adapters.tsv" + # Running fastqc with local # disk or a tmpdir, fastqc # has been observed to lock # up gpfs filesystems, adding # this on request by HPC staff fastqc \\ - -a "{params.adapters}" \\ + -a "${{tmp}}/adapters.tsv" \\ -t {threads} \\ -o "${{tmp}}" \\ {input.fq} @@ -80,13 +86,19 @@ rule fastqc_trim: tmp=$(mktemp -d -p "{params.tmpdir}") trap 'rm -rf "${{tmp}}"' EXIT + # Create fastqc adapters file, + # file needs to be in TSV format + paste - - < "{params.adapters}" \\ + | sed 's/^>//g' \\ + > "${{tmp}}/adapters.tsv" + # Running fastqc with local # disk or a tmpdir, fastqc # has been observed to lock # up gpfs filesystems, adding # this on request by HPC staff fastqc \\ - -a "{params.adapters}" \\ + -a "${{tmp}}/adapters.tsv" \\ -t {threads} \\ -o "${{tmp}}" \\ {input.fq}