From 03f7f7424d7660fafcb4608d42f9b58941105bd3 Mon Sep 17 00:00:00 2001 From: tgaspe Date: Thu, 22 Aug 2024 11:12:19 +0200 Subject: [PATCH] tmpdir bug --- src/fastqc/config.vsh.yaml | 3 +-- src/fastqc/script.sh | 9 +++++---- src/fastqc/test.sh | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/fastqc/config.vsh.yaml b/src/fastqc/config.vsh.yaml index bbc97a6c..942e7c18 100644 --- a/src/fastqc/config.vsh.yaml +++ b/src/fastqc/config.vsh.yaml @@ -25,8 +25,7 @@ argument_groups: - name: Outputs description: | - At least one of the following output options must be used: - --html, --zip + At least one of the output options (--html or --zip) must be used: arguments: - name: --html diff --git a/src/fastqc/script.sh b/src/fastqc/script.sh index 9a3ab5e8..0eb1dad1 100644 --- a/src/fastqc/script.sh +++ b/src/fastqc/script.sh @@ -63,18 +63,19 @@ for file in "${input[@]}"; do # Removes everthing after the first dot of the basename sample_name=$(basename "${file}" | sed 's/\..*$//') if [[ -n "$par_html" ]]; then - input_html="$tempdir/${sample_name}_fastqc.html" + input_html="${tmpdir}/${sample_name}_fastqc.html" html_file="${par_html//\*/$sample_name}" mv "$input_html" "$html_file" fi if [[ -n "$par_zip" ]]; then - input_zip="$tempdir/${sample_name}_fastqc.zip" + input_zip="${tmpdir}/${sample_name}_fastqc.zip" zip_file="${par_zip//\*/$sample_name}" mv "$input_zip" "$zip_file" fi if [[ -n "$par_extract" ]]; then - # moves the extracted directory to the same directory as the input file - extract_dir="$tempdir/${sample_name}_fastqc" + # Moves the extracted directory to the same directory as the input file + extract_dir="${tmpdir}/${sample_name}_fastqc" mv "$extract_dir" "$file_dir" fi done + diff --git a/src/fastqc/test.sh b/src/fastqc/test.sh index d12eb797..cfa8f7da 100644 --- a/src/fastqc/test.sh +++ b/src/fastqc/test.sh @@ -107,6 +107,8 @@ echo "-> Run Test1: one input" "$meta_executable" \ --extract \ --input "../input_1.fq" \ + --html "*_fastqc.html" \ + --zip "*_fastqc.zip" \ assert_file_exists "input_1_fastqc.html" assert_file_exists "input_1_fastqc.zip"