diff --git a/.gitignore b/.gitignore index 9b75a201f875574a221bd0e4bf073e5a0d0db406..f86b65e13780bc14b987372cb35d5dd8e310adcc 100644 --- a/.gitignore +++ b/.gitignore @@ -298,4 +298,4 @@ timeline*.html* *.out run*.sh -!.gitkeep +!.gitkeep \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3dbf06e01799a2a0d0b563d387b8705e98b54203..f25142b6974f61122a848c0071394055c91945ee 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -51,7 +51,7 @@ trimData: alignData: stage: unit script: - - singularity run 'docker://bicf/gudmaprbkaligner:2.0.0' hisat2 -p `nproc` --add-chrname --un-gz Q-Y5JA_1M.se.unal.gz -S Q-Y5JA_1M.se.sam -x /project/BICF/BICF_Core/shared/gudmap/references/GRCh38.p12/hisat2/genome --rna-strandness FR -U ./test_data/fastq/small/Q-Y5JA_1M_trimmed.fq.gz + - singularity run 'docker://bicf/gudmaprbkaligner:2.0.0' hisat2 -p `nproc` --add-chrname --un-gz Q-Y5JA_1M.se.unal.gz -S Q-Y5JA_1M.se.sam -x /project/BICF/BICF_Core/shared/gudmap/references/GRCh38.p12/hisat2/genome --rna-strandness F -U ./test_data/fastq/small/Q-Y5JA_1M_trimmed.fq.gz - singularity run 'docker://bicf/gudmaprbkaligner:2.0.0' samtools view -1 -@ `nproc` -F 4 -F 8 -F 256 -o Q-Y5JA_1M.se.bam Q-Y5JA_1M.se.sam - singularity run 'docker://bicf/gudmaprbkaligner:2.0.0' samtools sort -@ `nproc` -O BAM -o Q-Y5JA_1M.se.sorted.bam Q-Y5JA_1M.se.bam - singularity run 'docker://bicf/gudmaprbkaligner:2.0.0' samtools index -@ `nproc` -b Q-Y5JA_1M.se.sorted.bam Q-Y5JA_1M.se.sorted.bai diff --git a/workflow/rna-seq.nf b/workflow/rna-seq.nf index 46abbf1eee0aadaeb764305ef7a39a0de3ca1bb6..6c3622b2f7b94baec7b8a906fe2dd0dcef59c4d0 100755 --- a/workflow/rna-seq.nf +++ b/workflow/rna-seq.nf @@ -234,7 +234,7 @@ process getRef { */ process trimData { tag "${repRID}" - publishDir "${logsDir}", mode: "copy", pattern: "${repRID}.trimData.*" + publishDir "${logsDir}", mode: "copy", pattern: "*.trimData.*" input: val endsManual_trimData @@ -266,7 +266,6 @@ process trimData { */ process alignData { tag "${repRID}" - publishDir "${outDir}/alignData", mode: "copy", pattern: "*.{bam,bai}" publishDir "${logsDir}", mode: "copy", pattern: "*.align.{out,err}" input: diff --git a/workflow/tests/test_alignReads.py b/workflow/tests/test_alignReads.py index 74507ee89105270db492f2d0a1a54a404afe6517..7c20dd3f269e202e824285daa00a85d4301b3278 100644 --- a/workflow/tests/test_alignReads.py +++ b/workflow/tests/test_alignReads.py @@ -7,8 +7,6 @@ import utils data_output_path = os.path.dirname(os.path.abspath(__file__)) + \ '/../../' -logs_output_path = os.path.dirname(os.path.abspath(__file__)) + \ - '/../../' @pytest.mark.alignData @@ -27,15 +25,15 @@ def test_alignData_pe(): @pytest.mark.alignLogs def test_alignLogs_se(): - assert os.path.exists(os.path.join(logs_output_path, '16-1ZX4.align.err')) - 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 os.path.exists(os.path.join(data_output_path, '16-1ZX4.align.err')) + assert '34497376 reads; of these:' in open(os.path.join(data_output_path, '16-1ZX4.align.err')).readlines()[0] + assert os.path.exists(os.path.join(data_output_path, '16-1ZX4.align.out')) @pytest.mark.alignLogs 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 + assert os.path.exists(os.path.join(data_output_path, 'Q-Y5JA.align.err')) + assert utils.count_lines(os.path.join(data_output_path, 'Q-Y5JA.align.err')) == 7 + assert '15824858 reads; of these:' in open(os.path.join(data_output_path, 'Q-Y5JA.align.err')).readlines()[0] + assert os.path.exists(os.path.join(data_output_path, 'Q-Y5JA.align.out')) + assert utils.count_lines(os.path.join(data_output_path, 'Q-Y5JA.align.out')) == 0