diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ea53a7f0dc2a8265a0a93ba8cfd4ef0dd9afc1b..d6f9e172e1f622d8b7a1ebb564002b10daaae4b5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -55,6 +55,12 @@ alignReads: - singularity run 'docker://bicf/gudmaprbkaligner:2.0.0' samtools index -@ `nproc` -b 16-1ZX4.sorted.bam 16-1ZX4.sorted.bai - pytest -m alignData +dedupReads: + stage: unit + script: + - singularity run 'docker://bicf/picard2.21.7:2.0.0' java -jar /picard/build/libs/picard.jar MarkDuplicates I=${sortedBam} O=${repRID}.deduped.bam M=${repRID}.deduped.Metrics.txt REMOVE_DUPLICATES=true + - pytest -m dedupData + integration_se: stage: integration script: diff --git a/workflow/tests/test_dedupReads.py b/workflow/tests/test_dedupReads.py new file mode 100644 index 0000000000000000000000000000000000000000..a2d7e5ebe402b3e0ff416a073826ab9309cbd845 --- /dev/null +++ b/workflow/tests/test_dedupReads.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python3 + +import pytest +import pandas as pd +import os +import utils + +data_output_path = os.path.dirname(os.path.abspath(__file__)) + \ + '/../../' +logs_output_path = os.path.dirname(os.path.abspath(__file__)) + \ + '/../../' + + +@pytest.mark.dedupData +def test_dedupData_se(): + assert os.path.exists(os.path.join(data_output_path, '16-1ZX4.deduped.bm')) + assert os.path.exists(os.path.join(data_output_path, '16-1ZX4.deduped.Metrics.txt')) + +@pytest.mark.dedupData +def test_dedupData_pe(): + assert os.path.exists(os.path.join(data_output_path, 'Q-Y5JA.deduped.bm')) + assert os.path.exists(os.path.join(data_output_path, 'Q-Y5JA.deduped.Metrics.txt')) + + +@pytest.mark.dedupLogs +def test_dedupLogs_se(): + assert os.path.exists(os.path.join(logs_output_path, '16-1ZX4.dedup.err')) + assert os.path.exists(os.path.join(logs_output_path, '16-1ZX4.dedup.out')) + +@pytest.mark.dedupLogs +def test_dedupLogs_pe(): + assert os.path.exists(os.path.join(logs_output_path, 'Q-Y5JA.dedup.err')) + assert os.path.exists(os.path.join(logs_output_path, 'Q-Y5JA.dedup.out'))