Skip to content
Snippets Groups Projects
Commit 88c55e12 authored by Gervaise Henry's avatar Gervaise Henry :cowboy:
Browse files

Add unit test for makeFeatureCounts

parent 9663d913
Branches
Tags
2 merge requests!37v0.0.1,!22Resolve "process_count"
Pipeline #6236 failed with stages
in 8 minutes and 11 seconds
......@@ -77,6 +77,13 @@ makeBigWig:
- singularity run 'docker://bicf/deeptools3.3:2.0.0' bamCoverage -p `nproc` -b ./test_data/bam/small/Q-Y5JA_1M.se.sorted.deduped.bam -o Q-Y5JA_1M.se.bw
- pytest -m makeBigWig
makeFeatureCounts:
stage: unit
script:
- singularity run 'docker://bicf/bicf/subread2:2.0.0' featureCounts -R SAM -p -G /project/BICF/BICF_Core/shared/gudmap/references/GRCh38.p12.v31/genome.fna -T `nproc` -a /project/BICF/BICF_Core/shared/gudmap/references/GRCh38.p12.v31/genome.gtf -o Q-Y5JA_1M.se.featureCounts ./test_data/bam/small/Q-Y5JA_1M.se.sorted.deduped.bam
- singularity run 'docker://bicf/bicf/subread2:2.0.0' Rscript calculateTPM.R --count Q-Y5JA_1M.se.featureCounts
- pytest -m makeFeatureCounts
fastqc:
stage: unit
script:
......
......@@ -362,31 +362,7 @@ process dedupData {
}
/*
*fastqc: run fastqc on untrimmed fastq's
*/
process fastqc {
tag "${repRID}"
publishDir "${outDir}/fastqc", mode: 'copy', pattern: "*_fastqc.zip"
publishDir "${logsDir}", mode: 'copy', pattern: "*.fastq.err"
input:
path (fastq) from fastqs_fastqc
output:
path ("*_fastqc.zip") into fastqc
script:
"""
hostname >${repRID}.fastqc.err
ulimit -a >>${repRID}.fastqc.err
# run fastqc
fastqc *.fastq.gz -o . >>${repRID}.fastqc.err
"""
}
/*
*Make BigWig files for later processes
*makeBigWig: make bigwig file
*/
process makeBigWig {
tag "${repRID}"
......@@ -405,7 +381,7 @@ process makeBigWig {
}
/*
*Run featureCounts and get the counts, tpm, and fpkm
*Run featureCounts and get the counts, tpm
*/
process makeFeatureCounts {
tag "${repRID}"
......@@ -426,3 +402,28 @@ process makeFeatureCounts {
Rscript calculateTPM.R --count "${repRID}.featureCounts"
"""
}
/*
*fastqc: run fastqc on untrimmed fastq's
*/
process fastqc {
tag "${repRID}"
publishDir "${outDir}/fastqc", mode: 'copy', pattern: "*_fastqc.zip"
publishDir "${logsDir}", mode: 'copy', pattern: "*.fastq.err"
input:
path (fastq) from fastqs_fastqc
output:
path ("*_fastqc.zip") into fastqc
script:
"""
hostname >${repRID}.fastqc.err
ulimit -a >>${repRID}.fastqc.err
# run fastqc
fastqc *.fastq.gz -o . >>${repRID}.fastqc.err
"""
}
#!/usr/bin/env python3
import pytest
import pandas as pd
import os
import utils
data_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../../'
@pytest.mark.makeFeatureCounts
def test_makeFeatureCounts():
assert os.path.exists(os.path.join(data_output_path, 'Q-Y5JA_1M.se.featureCounts'))
assert os.path.exists(os.path.join(data_output_path, 'Q-Y5JA_1M.se.countTable.csv'))
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