Skip to content
Snippets Groups Projects
Commit a28ab789 authored by Jonathan Gesell's avatar Jonathan Gesell
Browse files

Added unit testing

parent 75c31810
Branches
Tags
2 merge requests!37v0.0.1,!17Resolve "process_dedup"
Pipeline #5844 failed with stages
in 38 minutes and 45 seconds
......@@ -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:
......
#!/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'))
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment