From de2308587542d5be87ebd22eda580d4a4b22c812 Mon Sep 17 00:00:00 2001 From: emmarousseau Date: Wed, 18 Sep 2024 15:32:33 +0200 Subject: [PATCH] simplify, get rid of test_data folder --- .../rsem_calculate_expression/config.vsh.yaml | 2 -- src/rsem/rsem_calculate_expression/test.sh | 26 ++++++++++++++++--- .../test_data/output/ref.cnt | 5 ---- .../test_data/output/ref.genes.results | 3 --- .../test_data/output/ref.isoforms.results | 3 --- .../test_data/script.sh | 23 ---------------- 6 files changed, 23 insertions(+), 39 deletions(-) delete mode 100644 src/rsem/rsem_calculate_expression/test_data/output/ref.cnt delete mode 100644 src/rsem/rsem_calculate_expression/test_data/output/ref.genes.results delete mode 100644 src/rsem/rsem_calculate_expression/test_data/output/ref.isoforms.results delete mode 100755 src/rsem/rsem_calculate_expression/test_data/script.sh diff --git a/src/rsem/rsem_calculate_expression/config.vsh.yaml b/src/rsem/rsem_calculate_expression/config.vsh.yaml index 722de215..2cd950cb 100644 --- a/src/rsem/rsem_calculate_expression/config.vsh.yaml +++ b/src/rsem/rsem_calculate_expression/config.vsh.yaml @@ -435,8 +435,6 @@ resources: test_resources: - type: bash_script path: test.sh - - type: file - path: test_data engines: - type: docker diff --git a/src/rsem/rsem_calculate_expression/test.sh b/src/rsem/rsem_calculate_expression/test.sh index ee9abf9f..c9ede884 100644 --- a/src/rsem/rsem_calculate_expression/test.sh +++ b/src/rsem/rsem_calculate_expression/test.sh @@ -47,6 +47,26 @@ chr1 example_source gene 100 219 . + . gene_id "gene2"; transcript_id "transcrip chr1 example_source exon 191 210 . + . gene_id "gene2"; transcript_id "transcript2"; EOF +cat > ref.cnt <<'EOF' +1 0 0 1 +0 0 0 +0 3 +0 1 +Inf 0 +EOF + +cat > ref.genes.results <<'EOF' +gene_id transcript_id(s) length effective_length expected_count TPM FPKM +gene1 transcript1 21.00 21.00 0.00 0.00 0.00 +gene2 transcript2 20.00 20.00 0.00 0.00 0.00 +EOF + +cat > ref.isoforms.results <<'EOF' +transcript_id gene_id length effective_length expected_count TPM FPKM IsoPct +transcript1 gene1 21 21.00 0.00 0.00 0.00 0.00 +transcript2 gene2 20 20.00 0.00 0.00 0.00 0.00 +EOF + echo "> Generate index" @@ -86,9 +106,9 @@ echo ">>> Checking whether output exists" [ ! -d "test.stat" ] && echo "Stats file does not exist!" && exit 1 echo ">>> Check wheter output is correct" -diff $test_dir/output/ref.genes.results test.genes.results || { echo "Gene level expression counts file is incorrect!"; exit 1; } -diff $test_dir/output/ref.isoforms.results test.isoforms.results || { echo "Transcript level expression counts file is incorrect!"; exit 1; } -diff $test_dir/output/ref.cnt test.stat/test.cnt || { echo "Stats file is incorrect!"; exit 1; } +diff ref.genes.results test.genes.results || { echo "Gene level expression counts file is incorrect!"; exit 1; } +diff ref.isoforms.results test.isoforms.results || { echo "Transcript level expression counts file is incorrect!"; exit 1; } +diff ref.cnt test.stat/test.cnt || { echo "Stats file is incorrect!"; exit 1; } ##################################################################################################### diff --git a/src/rsem/rsem_calculate_expression/test_data/output/ref.cnt b/src/rsem/rsem_calculate_expression/test_data/output/ref.cnt deleted file mode 100644 index a0fe8608..00000000 --- a/src/rsem/rsem_calculate_expression/test_data/output/ref.cnt +++ /dev/null @@ -1,5 +0,0 @@ -1 0 0 1 -0 0 0 -0 3 -0 1 -Inf 0 diff --git a/src/rsem/rsem_calculate_expression/test_data/output/ref.genes.results b/src/rsem/rsem_calculate_expression/test_data/output/ref.genes.results deleted file mode 100644 index a86eef2a..00000000 --- a/src/rsem/rsem_calculate_expression/test_data/output/ref.genes.results +++ /dev/null @@ -1,3 +0,0 @@ -gene_id transcript_id(s) length effective_length expected_count TPM FPKM -gene1 transcript1 21.00 21.00 0.00 0.00 0.00 -gene2 transcript2 20.00 20.00 0.00 0.00 0.00 diff --git a/src/rsem/rsem_calculate_expression/test_data/output/ref.isoforms.results b/src/rsem/rsem_calculate_expression/test_data/output/ref.isoforms.results deleted file mode 100644 index a0d96bee..00000000 --- a/src/rsem/rsem_calculate_expression/test_data/output/ref.isoforms.results +++ /dev/null @@ -1,3 +0,0 @@ -transcript_id gene_id length effective_length expected_count TPM FPKM IsoPct -transcript1 gene1 21 21.00 0.00 0.00 0.00 0.00 -transcript2 gene2 20 20.00 0.00 0.00 0.00 0.00 diff --git a/src/rsem/rsem_calculate_expression/test_data/script.sh b/src/rsem/rsem_calculate_expression/test_data/script.sh deleted file mode 100755 index a5185889..00000000 --- a/src/rsem/rsem_calculate_expression/test_data/script.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -wget https://raw.githubusercontent.com/nf-core/test-datasets/rnaseq3/reference/rsem.tar.gz -wget https://raw.githubusercontent.com/nf-core/test-datasets/rnaseq3/testdata/GSE110004/SRR6357070_1.fastq.gz -wget https://raw.githubusercontent.com/nf-core/test-datasets/rnaseq3/testdata/GSE110004/SRR6357070_2.fastq.gz - -# decompress file without keeping the original -gunzip SRR6357070_1.fastq.gz -gunzip SRR6357070_2.fastq.gz - -# only keep 100 reads per file -head -n 400 SRR6357070_1.fastq > SRR6357070_1.fastq.tmp -head -n 400 SRR6357070_2.fastq > SRR6357070_2.fastq.tmp - -mv SRR6357070_1.fastq.tmp SRR6357070_1.fastq -mv SRR6357070_2.fastq.tmp SRR6357070_2.fastq - -rm SRR6357070_1.fastq.gz -rm SRR6357070_2.fastq.gz - -gzip SRR6357070_1.fastq -gzip SRR6357070_2.fastq -