Skip to content
Snippets Groups Projects
Commit 96e6d832 authored by Venkat Malladi's avatar Venkat Malladi
Browse files

Add in call peaks step and configurations.

parent bb44fc95
1 merge request!13Resolve "Add in Macs2 support"
......@@ -48,6 +48,9 @@ workflow_modules:
- 'sambamba/0.6.6'
- 'bedtools/2.26.0'
- 'deeptools/2.5.0.1'
- 'phantompeakqualtools/1.2'
- 'macs/2.1.0-20151222'
- 'UCSC_userApps/v317'
# A list of parameters used by the workflow, defining how to present them,
# options etc in the web interface. For each parameter:
......
......@@ -39,19 +39,35 @@ process {
module = ['python/3.6.1-2-anaconda']
cpus = 32
}
$callPeaksMACS {
module = ['python/3.6.1-2-anaconda', 'phantompeakqualtools/1.2', 'macs/2.1.0-20151222', 'UCSC_userApps/v317']
cpus = 32
}
}
params {
// Reference file paths on BioHPC
genomes {
'GRCh38' { bwa = '/project/shared/bicf_workflow_ref/GRCh38' }
'GRCh37' { bwa = '/project/shared/bicf_workflow_ref/GRCh37' }
'GRCm38' { bwa = '/project/shared/bicf_workflow_ref/GRCm38' }
'GRCh38' {
bwa = '/project/shared/bicf_workflow_ref/GRCh38'
genomesize = 'hs'
chromsizes = '/project/shared/bicf_workflow_ref/GRCh38/chrom.sizes'
}
'GRCh37' {
bwa = '/project/shared/bicf_workflow_ref/GRCh37'
genomesize = 'hs'
chromsizes = '/project/shared/bicf_workflow_ref/GRCh37/chrom.sizes'
}
'GRCm38' {
bwa = '/project/shared/bicf_workflow_ref/GRCm38'
genomesize = 'mm'
chromsizes = '/project/shared/bicf_workflow_ref/GRCm38/chrom.sizes'
}
}
}
trace {
enabled = true
file = 'pipeline_trace.txt'
fields = 'task_id,native_id,process,name,status,exit,submit,start,complete,duration,realtime,%cpu,%mem,rss'
enabled = true
file = 'pipeline_trace.txt'
fields = 'task_id,native_id,process,name,status,exit,submit,start,complete,duration,realtime,%cpu,%mem,rss'
}
......@@ -10,6 +10,8 @@ params.designFile = "$baseDir/../test_data/design_ENCSR238SGC_SE.txt"
params.genome = 'GRCm38'
params.genomes = []
params.bwaIndex = params.genome ? params.genomes[ params.genome ].bwa ?: false : false
params.geneomeSize = params.genome ? params.genomes[ params.genome ].genomesize ?: false : false
params.chromSizes = params.genome ? params.genomes[ params.genome ].chromsizes ?: false : false
params.cutoffRatio = 1.2
// Check inputs
......@@ -31,6 +33,8 @@ readsList = Channel
// Define regular variables
pairedEnd = params.pairedEnd
designFile = params.designFile
genomeSize = params.genomeSize
chromSizes = params.chromSizes
cutoffRatio = params.cutoffRatio
process checkDesignFile {
......@@ -307,3 +311,35 @@ process poolAndPsuedoReads {
}
}
// Collect list of experiment design files into a single channel
experimentRows = experimentPoolObjs.collect()
.splitCsv(sep:'\t', header: true)
// Call Peaks using MACS
process callPeaksMacs {
tag "$sampleId-$replicate"
publishDir "$baseDir/output/${task.process}", mode: 'copy'
input:
set sampleId, tagAlign, xcor, experimentId, biosample, factor, treatment, replicate, controlId, controlTagAlign from experimentRows
output:
set sampleId, file('*.narrowPeak'), file('*.fc_signal.bw'), file('*.pvalue_signal.bw'), experimentId, biosample, factor, treatment, replicate, controlId from experimentRows
script:
if (pairedEnd) {
"""
python3 $baseDir/scripts/call_peaks_macs.py -t $tagAlign -x $xcor -c $controlTagAlign -s $sampleId -g $genomeSize -z $chromSizes -p
"""
}
else {
"""
python3 $baseDir/scripts/call_peaks_macs.py -t $tagAlign -x $xcor -c $controlTagAlign -s $sampleId -g $genomeSize -z $chromSizes -p
"""
}
}
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