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

Added files necessary for CI of output files.

parent 724ecd45
Branches
Tags
2 merge requests!37v0.0.1,!15Resolve "process_align"
Pipeline #5791 failed with stages
in 9 minutes and 33 seconds
[pytest]
python_paths = workflow/scripts
......@@ -17,7 +17,7 @@ bdbag = Channel
.ifEmpty { exit 1, "deriva cookie file for bdbag not found: ${params.bdbag}" }
repRID = params.repRID
outDir = params.outDir
reference = params.reference
referenceBase = file ("${params.reference}")
logsDir = "${outDir}/Logs"
// Define fixed files
......@@ -203,7 +203,7 @@ referenceDir.into {
*/
process trimData {
tag "${repRID}"
publishDir "${logsDir}", mode: 'copy', pattern: "\${repRID}.trimData.*"
publishDir "${logsDir}", mode: 'copy', pattern: "${repRID}.trimData.*"
input:
val endsManual_trimData
......@@ -234,7 +234,8 @@ process trimData {
*/
process alignReads {
tag "align-${repRID}"
publishDir "${outDir}/aligned", mode: "copy"
publishDir "${outDir}/aligned", mode: "copy", pattern: "${repRID}.{unal,sorted}.{gz,bam,bai}"
publishDir "${logsDir}", mode: 'copy', pattern: "${repRID}.align.{out,err}"
input:
val endsManual_alignReads
......@@ -244,6 +245,7 @@ process alignReads {
output:
set repRID, file ("${repRID}.unal.gz"), file ("${repRID}.sorted.bam"), file ("${repRID}.sorted.bai")
set repRID, file ("${repRID}.align.out"), file ("${repRID}.align.err")
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__)) + \
'/../../output/aligned'
logs_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../../output/Logs'
@pytest.mark.alignData
def test_alignData_se():
assert os.path.exists(os.path.join(data_output_path, '16-1ZX4.unal.gz'))
assert utils.count_lines(os.path.join(data_output_path, '16-1ZX4.unal.gz')) == 3070504
assert os.path.exists(os.path.join(data_output_path, 'Q-Y5JA.sorted.bam'))
assert utils.count_lines(os.path.join(data_output_path, 'Q-Y5JA.sorted.bam')) == 5805611
assert os.path.exists(os.path.join(data_output_path, 'Q-Y5JA.sorted.bai'))
assert utils.count_lines(os.path.join(data_output_path, 'Q-Y5JA.sorted.bai')) == 12824
def test_alignData_pe():
assert os.path.exists(os.path.join(data_output_path, 'Q-Y5JA.unal.gz'))
assert utils.count_lines(os.path.join(data_output_path, 'Q-Y5JA.unal.gz')) == 0
assert os.path.exists(os.path.join(data_output_path, 'Q-Y5JA.sorted.bam'))
assert utils.count_lines(os.path.join(data_output_path, 'Q-Y5JA.sorted.bam')) == 5805611
assert os.path.exists(os.path.join(data_output_path, 'Q-Y5JA.sorted.bai'))
assert utils.count_lines(os.path.join(data_output_path, 'Q-Y5JA.sorted.bai')) == 12824
@pytest.mark.alignLogs
def test_alignLogs_se():
assert os.path.exists(os.path.join(logs_output_path, '16-1ZX4.align.err'))
assert utils.count_lines(os.path.join(logs_output_path, '16-1ZX4.align.err')) == 7
assert '34497376 reads; of these:' in open(os.path.join(logs_output_path, '16-1ZX4.align.err')).readlines()[0]
assert os.path.exists(os.path.join(logs_output_path, '16-1ZX4.align.out'))
assert utils.count_lines(os.path.join(logs_output_path, '16-1ZX4.align.out')) == 0
def test_alignLogs_pe():
assert os.path.exists(os.path.join(logs_output_path, 'Q-Y5JA.align.err'))
assert utils.count_lines(os.path.join(logs_output_path, 'Q-Y5JA.align.err')) == 7
assert '15824858 reads; of these:' in open(os.path.join(logs_output_path, 'Q-Y5JA.align.err')).readlines()[0]
assert os.path.exists(os.path.join(logs_output_path, 'Q-Y5JA.align.out'))
assert utils.count_lines(os.path.join(logs_output_path, 'Q-Y5JA.align.out')) == 0
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