Update tools not in rnaseq pipeline too

This commit is contained in:
drpatelh 2020-10-14 18:59:25 +01:00
parent 14525ed50d
commit 1d30e2c21a
15 changed files with 188 additions and 141 deletions

4
git_update.sh Executable file
View file

@ -0,0 +1,4 @@
git pull
git pull upstream master
git push

View file

@ -10,7 +10,7 @@ include { initOptions; saveFiles; getSoftwareName } from './functions'
// TODO nf-core: The key words "MUST", "MUST NOT", "SHOULD", etc. are to be interpreted as described in RFC 2119 (https://tools.ietf.org/html/rfc2119). // TODO nf-core: The key words "MUST", "MUST NOT", "SHOULD", etc. are to be interpreted as described in RFC 2119 (https://tools.ietf.org/html/rfc2119).
// TODO nf-core: A module file SHOULD only define input and output files as command-line parameters. // TODO nf-core: A module file SHOULD only define input and output files as command-line parameters.
// All other parameters MUST be provided as a string i.e. "options.args" // All other parameters MUST be provided as a string i.e. "options.args"
// where "options" is a Groovy Map that MUST be provided in the "input:" section of the process. // where "params.options" is a Groovy Map that MUST be provided via the addParams section of the including workflow.
// Any parameters that need to be evaluated in the context of a particular sample // Any parameters that need to be evaluated in the context of a particular sample
// e.g. single-end/paired-end data MUST also be defined and evaluated appropriately. // e.g. single-end/paired-end data MUST also be defined and evaluated appropriately.
// TODO nf-core: Software that can be piped together SHOULD be added to separate module files // TODO nf-core: Software that can be piped together SHOULD be added to separate module files
@ -18,6 +18,9 @@ include { initOptions; saveFiles; getSoftwareName } from './functions'
// e.g. bwa mem | samtools view -B -T ref.fasta to output BAM instead of SAM. // e.g. bwa mem | samtools view -B -T ref.fasta to output BAM instead of SAM.
// TODO nf-core: Optional inputs are not currently supported by Nextflow. However, "fake files" MAY be used to work around this issue. // TODO nf-core: Optional inputs are not currently supported by Nextflow. However, "fake files" MAY be used to work around this issue.
params.options = [:]
def options = initOptions(params.options)
// TODO nf-core: Process name MUST be all uppercase, // TODO nf-core: Process name MUST be all uppercase,
// "SOFTWARE" and (ideally) "TOOL" MUST be all one word separated by an "_". // "SOFTWARE" and (ideally) "TOOL" MUST be all one word separated by an "_".
process SOFTWARE_TOOL { process SOFTWARE_TOOL {
@ -31,18 +34,22 @@ process SOFTWARE_TOOL {
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
// TODO nf-core: If a meta map of sample information is NOT provided in "input:" section // TODO nf-core: If a meta map of sample information is NOT provided in "input:" section
// change "publish_id:meta.id" to initialise an empty string e.g. "publish_id:''". // change "publish_id:meta.id" to initialise an empty string e.g. "publish_id:''".
saveAs: { filename -> saveFiles(filename:filename, options:options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) } saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
// TODO nf-core: List required Conda packages.
// Software MUST be pinned to channel (i.e. "bioconda") and version (i.e. "1.10") as in the example below.
// Pinning the build too e.g. "bioconda::samtools=1.10=h9402c20_2" is not currently a requirement.
conda (params.enable_conda ? "bioconda::samtools=1.10" : null)
// TODO nf-core: Fetch "docker pull" address for latest BioContainer image of software: e.g. https://biocontainers.pro/#/tools/samtools // TODO nf-core: Fetch "docker pull" address for latest BioContainer image of software: e.g. https://biocontainers.pro/#/tools/samtools
// Click on the Pacakages and Containers tab, sort by Version and get the portion of the link after the docker pull command where Type is Docker. // Click on the Pacakages and Containers tab, sort by Version and get the portion of the link after the docker pull command where Type is Docker.
// You may need to double-check that you are using the latest version of the software because you may find that containers for older versions have been rebuilt more recently. // You may need to double-check that you are using the latest version of the software because you may find that containers for older versions have been rebuilt more recently.
// If required, multi-tool containers may also be available and are usually named to start with "mulled". // If required, multi-tool containers may also be available and are usually named to start with "mulled".
container "quay.io/biocontainers/samtools:1.10--h9402c20_2" if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/samtools:1.10--h9402c20_2"
// TODO nf-core: List required Conda packages. } else {
// Software MUST be pinned to channel (i.e. "bioconda") and version (i.e. "1.10") as in the example below. container "quay.io/biocontainers/samtools:1.10--h9402c20_2"
// Pinning the build too e.g. "bioconda::samtools=1.10=h9402c20_2" is not currently a requirement. }
conda (params.conda ? "bioconda::samtools=1.10" : null)
input: input:
// TODO nf-core: Where applicable all sample-specific information e.g. "id", "single_end", "read_group" // TODO nf-core: Where applicable all sample-specific information e.g. "id", "single_end", "read_group"
@ -52,9 +59,7 @@ process SOFTWARE_TOOL {
// TODO nf-core: Where applicable please provide/convert compressed files as input/output // TODO nf-core: Where applicable please provide/convert compressed files as input/output
// e.g. "*.fastq.gz" and NOT "*.fastq", "*.bam" and NOT "*.sam" etc. // e.g. "*.fastq.gz" and NOT "*.fastq", "*.bam" and NOT "*.sam" etc.
tuple val(meta), path(reads) tuple val(meta), path(reads)
// TODO nf-core: List additional required input channels/values here
val options
output: output:
// TODO nf-core: Named file extensions MUST be emitted for ALL output channels // TODO nf-core: Named file extensions MUST be emitted for ALL output channels
// TODO nf-core: If meta is provided in "input:" section then it MUST be added to ALL output channels (except version) // TODO nf-core: If meta is provided in "input:" section then it MUST be added to ALL output channels (except version)
@ -64,19 +69,18 @@ process SOFTWARE_TOOL {
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def ioptions = initOptions(options)
// TODO nf-core: If a meta map of sample information is NOT provided in "input:" section delete the line below // TODO nf-core: If a meta map of sample information is NOT provided in "input:" section delete the line below
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}" def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
// TODO nf-core: Where possible, a command MUST be provided to obtain the version number of the software e.g. 1.10 // TODO nf-core: Where possible, a command MUST be provided to obtain the version number of the software e.g. 1.10
// If the software is unable to output a version number on the command-line then it can be manually specified // If the software is unable to output a version number on the command-line then it can be manually specified
// e.g. https://github.com/nf-core/modules/blob/master/software/homer/annotatepeaks/main.nf // e.g. https://github.com/nf-core/modules/blob/master/software/homer/annotatepeaks/main.nf
// TODO nf-core: It MUST be possible to pass additional parameters to the tool as a command-line string via the "$ioptions.args" variable // TODO nf-core: It MUST be possible to pass additional parameters to the tool as a command-line string via the "$options.args" variable
// TODO nf-core: If the tool supports multi-threading then you MUST provide the appropriate parameter // TODO nf-core: If the tool supports multi-threading then you MUST provide the appropriate parameter
// using the Nextflow "task" variable e.g. "--threads $task.cpus" // using the Nextflow "task" variable e.g. "--threads $task.cpus"
// TODO nf-core: Please indent the command appropriately (4 spaces!!) to help with readability ;) // TODO nf-core: Please indent the command appropriately (4 spaces!!) to help with readability ;)
""" """
software tool \\ software tool \\
$ioptions.args \\ $options.args \\
--threads $task.cpus \\ --threads $task.cpus \\
$reads \\ $reads \\
> ${prefix}.bam > ${prefix}.bam

View file

@ -1,31 +1,34 @@
// Import generic module functions // Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions' include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:]
def options = initOptions(params.options)
process BWA_INDEX { process BWA_INDEX {
tag "$fasta" tag "$fasta"
label 'process_high' label 'process_high'
publishDir "${params.outdir}", publishDir "${params.outdir}",
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:options, publish_dir:getSoftwareName(task.process), publish_id:'') } saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:'') }
container "biocontainers/bwa:v0.7.17_cv1" conda (params.enable_conda ? "bioconda::bwa=0.7.17" : null)
//container "https://depot.galaxyproject.org/singularity/bwa:0.7.17--hed695b0_7" if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/bwa:0.7.17--hed695b0_7"
conda (params.conda ? "bioconda::bwa=0.7.17" : null) } else {
container "biocontainers/bwa:v0.7.17_cv1"
}
input: input:
path fasta path fasta
val options
output: output:
path "${fasta}.*" , emit: index path "${fasta}.*" , emit: index
path "*.version.txt", emit: version path "*.version.txt", emit: version
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def ioptions = initOptions(options)
""" """
bwa index $ioptions.args $fasta bwa index $options.args $fasta
echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt
""" """
} }

View file

@ -1,41 +1,44 @@
// Import generic module functions // Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions' include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:]
def options = initOptions(params.options)
process BWA_MEM { process BWA_MEM {
tag "$meta.id" tag "$meta.id"
label 'process_high' label 'process_high'
publishDir "${params.outdir}", publishDir "${params.outdir}",
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) } saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
container "quay.io/biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:eabfac3657eda5818bae4090db989e3d41b01542-0" conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.10" : null)
//container "https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:eabfac3657eda5818bae4090db989e3d41b01542-0" if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:eabfac3657eda5818bae4090db989e3d41b01542-0"
conda (params.conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.10" : null) } else {
container "quay.io/biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:eabfac3657eda5818bae4090db989e3d41b01542-0"
}
input: input:
tuple val(meta), path(reads) tuple val(meta), path(reads)
path index path index
path fasta path fasta
val options
output: output:
tuple val(meta), path("*.bam"), emit: bam tuple val(meta), path("*.bam"), emit: bam
path "*.version.txt" , emit: version path "*.version.txt" , emit: version
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def ioptions = initOptions(options) def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
def read_group = meta.read_group ? "-R ${meta.read_group}" : "" def read_group = meta.read_group ? "-R ${meta.read_group}" : ""
""" """
bwa mem \\ bwa mem \\
$ioptions.args \\ $options.args \\
$read_group \\ $read_group \\
-t $task.cpus \\ -t $task.cpus \\
$fasta \\ $fasta \\
$reads \\ $reads \\
| samtools view $ioptions.args2 -@ $task.cpus -bS -o ${prefix}.bam - | samtools view $options.args2 -@ $task.cpus -bS -o ${prefix}.bam -
echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt
""" """

View file

@ -1,23 +1,27 @@
// Import generic module functions // Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions' include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:]
def options = initOptions(params.options)
process DEEPTOOLS_COMPUTEMATRIX { process DEEPTOOLS_COMPUTEMATRIX {
tag "$meta.id" tag "$meta.id"
label 'process_high' label 'process_high'
publishDir "${params.outdir}", publishDir "${params.outdir}",
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) } saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
container "quay.io/biocontainers/deeptools:3.4.3--py_0" conda (params.enable_conda ? "bioconda::deeptools=3.4.3" : null)
//container "https://depot.galaxyproject.org/singularity/deeptools:3.4.3--py_0" if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/deeptools:3.4.3--py_0"
conda (params.conda ? "bioconda::deeptools=3.4.3" : null) } else {
container "quay.io/biocontainers/deeptools:3.4.3--py_0"
}
input: input:
tuple val(meta), path(bigwig) tuple val(meta), path(bigwig)
path bed path bed
val options
output: output:
tuple val(meta), path("*.mat.gz") , emit: matrix tuple val(meta), path("*.mat.gz") , emit: matrix
tuple val(meta), path("*.mat.tab"), emit: table tuple val(meta), path("*.mat.tab"), emit: table
@ -25,11 +29,10 @@ process DEEPTOOLS_COMPUTEMATRIX {
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def ioptions = initOptions(options) def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
""" """
computeMatrix \\ computeMatrix \\
$ioptions.args \\ $options.args \\
--regionsFileName $bed \\ --regionsFileName $bed \\
--scoreFileName $bigwig \\ --scoreFileName $bigwig \\
--outFileName ${prefix}.computeMatrix.mat.gz \\ --outFileName ${prefix}.computeMatrix.mat.gz \\

View file

@ -1,22 +1,26 @@
// Import generic module functions // Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions' include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:]
def options = initOptions(params.options)
process DEEPTOOLS_PLOTFINGERPRINT { process DEEPTOOLS_PLOTFINGERPRINT {
tag "$meta.id" tag "$meta.id"
label 'process_high' label 'process_high'
publishDir "${params.outdir}", publishDir "${params.outdir}",
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) } saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
container "quay.io/biocontainers/deeptools:3.4.3--py_0" conda (params.enable_conda ? "bioconda::deeptools=3.4.3" : null)
//container "https://depot.galaxyproject.org/singularity/deeptools:3.4.3--py_0" if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/deeptools:3.4.3--py_0"
conda (params.conda ? "bioconda::deeptools=3.4.3" : null) } else {
container "quay.io/biocontainers/deeptools:3.4.3--py_0"
}
input: input:
tuple val(meta), path(bams), path(bais) tuple val(meta), path(bams), path(bais)
val options
output: output:
tuple val(meta), path("*.pdf") , emit: pdf tuple val(meta), path("*.pdf") , emit: pdf
tuple val(meta), path("*.raw.txt") , emit: matrix tuple val(meta), path("*.raw.txt") , emit: matrix
@ -25,12 +29,11 @@ process DEEPTOOLS_PLOTFINGERPRINT {
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def ioptions = initOptions(options) def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
def extend = (meta.single_end && params.fragment_size > 0) ? "--extendReads ${params.fragment_size}" : '' def extend = (meta.single_end && params.fragment_size > 0) ? "--extendReads ${params.fragment_size}" : ''
""" """
plotFingerprint \\ plotFingerprint \\
$ioptions.args \\ $options.args \\
$extend \\ $extend \\
--bamfiles ${bams.join(' ')} \\ --bamfiles ${bams.join(' ')} \\
--plotFile ${prefix}.plotFingerprint.pdf \\ --plotFile ${prefix}.plotFingerprint.pdf \\

View file

@ -1,22 +1,26 @@
// Import generic module functions // Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions' include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:]
def options = initOptions(params.options)
process DEEPTOOLS_PLOTHEATMAP { process DEEPTOOLS_PLOTHEATMAP {
tag "$meta.id" tag "$meta.id"
label 'process_low' label 'process_low'
publishDir "${params.outdir}", publishDir "${params.outdir}",
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) } saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
container "quay.io/biocontainers/deeptools:3.4.3--py_0" conda (params.enable_conda ? "bioconda::deeptools=3.4.3" : null)
//container "https://depot.galaxyproject.org/singularity/deeptools:3.4.3--py_0" if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/deeptools:3.4.3--py_0"
conda (params.conda ? "bioconda::deeptools=3.4.3" : null) } else {
container "quay.io/biocontainers/deeptools:3.4.3--py_0"
}
input: input:
tuple val(meta), path(matrix) tuple val(meta), path(matrix)
val options
output: output:
tuple val(meta), path("*.pdf"), emit: pdf tuple val(meta), path("*.pdf"), emit: pdf
tuple val(meta), path("*.tab"), emit: table tuple val(meta), path("*.tab"), emit: table
@ -24,11 +28,10 @@ process DEEPTOOLS_PLOTHEATMAP {
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def ioptions = initOptions(options) def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
""" """
plotHeatmap \\ plotHeatmap \\
$ioptions.args \\ $options.args \\
--matrixFile $matrix \\ --matrixFile $matrix \\
--outFileName ${prefix}.plotHeatmap.pdf \\ --outFileName ${prefix}.plotHeatmap.pdf \\
--outFileNameMatrix ${prefix}.plotHeatmap.mat.tab --outFileNameMatrix ${prefix}.plotHeatmap.mat.tab

View file

@ -1,22 +1,26 @@
// Import generic module functions // Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions' include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:]
def options = initOptions(params.options)
process DEEPTOOLS_PLOTPROFILE { process DEEPTOOLS_PLOTPROFILE {
tag "$meta.id" tag "$meta.id"
label 'process_low' label 'process_low'
publishDir "${params.outdir}", publishDir "${params.outdir}",
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) } saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
container "quay.io/biocontainers/deeptools:3.4.3--py_0" conda (params.enable_conda ? "bioconda::deeptools=3.4.3" : null)
//container "https://depot.galaxyproject.org/singularity/deeptools:3.4.3--py_0" if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/deeptools:3.4.3--py_0"
conda (params.conda ? "bioconda::deeptools=3.4.3" : null) } else {
container "quay.io/biocontainers/deeptools:3.4.3--py_0"
}
input: input:
tuple val(meta), path(matrix) tuple val(meta), path(matrix)
val options
output: output:
tuple val(meta), path("*.pdf"), emit: pdf tuple val(meta), path("*.pdf"), emit: pdf
tuple val(meta), path("*.tab"), emit: table tuple val(meta), path("*.tab"), emit: table
@ -24,11 +28,10 @@ process DEEPTOOLS_PLOTPROFILE {
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def ioptions = initOptions(options) def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
""" """
plotProfile \\ plotProfile \\
$ioptions.args \\ $options.args \\
--matrixFile $matrix \\ --matrixFile $matrix \\
--outFileName ${prefix}.plotProfile.pdf \\ --outFileName ${prefix}.plotProfile.pdf \\
--outFileNameData ${prefix}.plotProfile.tab --outFileNameData ${prefix}.plotProfile.tab

View file

@ -1,6 +1,9 @@
// Import generic module functions // Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions' include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:]
def options = initOptions(params.options)
def VERSION = '4.11' def VERSION = '4.11'
process HOMER_ANNOTATEPEAKS { process HOMER_ANNOTATEPEAKS {
@ -8,18 +11,19 @@ process HOMER_ANNOTATEPEAKS {
label 'process_medium' label 'process_medium'
publishDir "${params.outdir}", publishDir "${params.outdir}",
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) } saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
container "quay.io/biocontainers/homer:4.11--pl526h9a982cc_2" conda (params.enable_conda ? "bioconda::homer=4.11" : null)
//container "https://depot.galaxyproject.org/singularity/homer:4.11--pl526h9a982cc_2" if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/homer:4.11--pl526h9a982cc_2"
conda (params.conda ? "bioconda::homer=4.11" : null) } else {
container "quay.io/biocontainers/homer:4.11--pl526h9a982cc_2"
}
input: input:
tuple val(meta), path(peak) tuple val(meta), path(peak)
path fasta path fasta
path gtf path gtf
val options
output: output:
tuple val(meta), path("*annotatePeaks.txt"), emit: txt tuple val(meta), path("*annotatePeaks.txt"), emit: txt
@ -27,13 +31,12 @@ process HOMER_ANNOTATEPEAKS {
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def ioptions = initOptions(options) def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
""" """
annotatePeaks.pl \\ annotatePeaks.pl \\
$peak \\ $peak \\
$fasta \\ $fasta \\
$ioptions.args \\ $options.args \\
-gtf $gtf \\ -gtf $gtf \\
-cpu $task.cpus \\ -cpu $task.cpus \\
> ${prefix}.annotatePeaks.txt > ${prefix}.annotatePeaks.txt

View file

@ -1,23 +1,27 @@
// Import generic module functions // Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions' include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:]
def options = initOptions(params.options)
process MACS2_CALLPEAK { process MACS2_CALLPEAK {
tag "$meta.id" tag "$meta.id"
label 'process_medium' label 'process_medium'
publishDir "${params.outdir}", publishDir "${params.outdir}",
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) } saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
container "quay.io/biocontainers/macs2:2.2.7.1--py37h516909a_0" conda (params.enable_conda ? "bioconda::macs2=2.2.7.1" : null)
//container "https://depot.galaxyproject.org/singularity/macs2:2.2.7.1--py37h516909a_0" if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/macs2:2.2.7.1--py37h516909a_0"
conda (params.conda ? "bioconda::macs2=2.2.7.1" : null) } else {
container "quay.io/biocontainers/macs2:2.2.7.1--py37h516909a_0"
}
input: input:
tuple val(meta), path(ipbam), path(controlbam) tuple val(meta), path(ipbam), path(controlbam)
val macs2_gsize val macs2_gsize
val options
output: output:
tuple val(meta), path("*.{narrowPeak,broadPeak}"), emit: peak tuple val(meta), path("*.{narrowPeak,broadPeak}"), emit: peak
tuple val(meta), path("*.xls") , emit: xls tuple val(meta), path("*.xls") , emit: xls
@ -29,14 +33,13 @@ process MACS2_CALLPEAK {
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def ioptions = initOptions(options) def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
def format = meta.single_end ? 'BAM' : 'BAMPE' def format = meta.single_end ? 'BAM' : 'BAMPE'
def control = controlbam ? "--control $controlbam" : '' def control = controlbam ? "--control $controlbam" : ''
""" """
macs2 \\ macs2 \\
callpeak \\ callpeak \\
$ioptions.args \\ $options.args \\
--gsize $macs2_gsize \\ --gsize $macs2_gsize \\
--format $format \\ --format $format \\
--name $prefix \\ --name $prefix \\

View file

@ -1,6 +1,9 @@
// Import generic module functions // Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions' include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:]
def options = initOptions(params.options)
def VERSION = '1.2.2' def VERSION = '1.2.2'
process PHANTOMPEAKQUALTOOLS { process PHANTOMPEAKQUALTOOLS {
@ -8,17 +11,18 @@ process PHANTOMPEAKQUALTOOLS {
label 'process_medium' label 'process_medium'
publishDir "${params.outdir}", publishDir "${params.outdir}",
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) } saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
container "quay.io/biocontainers/phantompeakqualtools:1.2.2--0" conda (params.enable_conda ? "bioconda::phantompeakqualtools=1.2.2" : null)
//container "https://depot.galaxyproject.org/singularity/phantompeakqualtools:1.2.2--0" if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/phantompeakqualtools:1.2.2--0"
conda (params.conda ? "bioconda::phantompeakqualtools=1.2.2" : null) } else {
container "quay.io/biocontainers/phantompeakqualtools:1.2.2--0"
}
input: input:
tuple val(meta), path(bam) tuple val(meta), path(bam)
val options
output: output:
tuple val(meta), path("*.out") , emit: spp tuple val(meta), path("*.out") , emit: spp
tuple val(meta), path("*.pdf") , emit: pdf tuple val(meta), path("*.pdf") , emit: pdf
@ -27,8 +31,7 @@ process PHANTOMPEAKQUALTOOLS {
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def ioptions = initOptions(options) def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
""" """
RUN_SPP=`which run_spp.R` RUN_SPP=`which run_spp.R`
Rscript -e "library(caTools); source(\\"\$RUN_SPP\\")" -c="$bam" -savp="${prefix}.spp.pdf" -savd="${prefix}.spp.Rdata" -out="${prefix}.spp.out" -p=$task.cpus Rscript -e "library(caTools); source(\\"\$RUN_SPP\\")" -c="$bam" -savp="${prefix}.spp.pdf" -savd="${prefix}.spp.Rdata" -out="${prefix}.spp.out" -p=$task.cpus

View file

@ -1,22 +1,26 @@
// Import generic module functions // Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions' include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:]
def options = initOptions(params.options)
process PICARD_COLLECTMULTIPLEMETRICS { process PICARD_COLLECTMULTIPLEMETRICS {
tag "$meta.id" tag "$meta.id"
label 'process_medium' label 'process_medium'
publishDir "${params.outdir}", publishDir "${params.outdir}",
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) } saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
container "quay.io/biocontainers/picard:2.23.6--0" conda (params.enable_conda ? "bioconda::picard=2.23.6" : null)
//container "https://depot.galaxyproject.org/singularity/picard:2.23.6--0" if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/picard:2.23.6--0"
conda (params.conda ? "bioconda::picard=2.23.6" : null) } else {
container "quay.io/biocontainers/picard:2.23.6--0"
}
input: input:
tuple val(meta), path(bam) tuple val(meta), path(bam)
path fasta path fasta
val options
output: output:
tuple val(meta), path("*_metrics"), emit: metrics tuple val(meta), path("*_metrics"), emit: metrics
@ -25,8 +29,7 @@ process PICARD_COLLECTMULTIPLEMETRICS {
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def ioptions = initOptions(options) def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
def avail_mem = 3 def avail_mem = 3
if (!task.memory) { if (!task.memory) {
log.info '[Picard CollectMultipleMetrics] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' log.info '[Picard CollectMultipleMetrics] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
@ -37,7 +40,7 @@ process PICARD_COLLECTMULTIPLEMETRICS {
picard \\ picard \\
-Xmx${avail_mem}g \\ -Xmx${avail_mem}g \\
CollectMultipleMetrics \\ CollectMultipleMetrics \\
$ioptions.args \\ $options.args \\
INPUT=$bam \\ INPUT=$bam \\
OUTPUT=${prefix}.CollectMultipleMetrics \\ OUTPUT=${prefix}.CollectMultipleMetrics \\
REFERENCE_SEQUENCE=$fasta REFERENCE_SEQUENCE=$fasta

View file

@ -1,22 +1,26 @@
// Import generic module functions // Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions' include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:]
def options = initOptions(params.options)
process PICARD_MARKDUPLICATES { process PICARD_MARKDUPLICATES {
tag "$meta.id" tag "$meta.id"
label 'process_medium' label 'process_medium'
publishDir "${params.outdir}", publishDir "${params.outdir}",
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) } saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
container "quay.io/biocontainers/picard:2.23.6--0" conda (params.enable_conda ? "bioconda::picard=2.23.6" : null)
//container "https://depot.galaxyproject.org/singularity/picard:2.23.6--0" if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/picard:2.23.6--0"
conda (params.conda ? "bioconda::picard=2.23.6" : null) } else {
container "quay.io/biocontainers/picard:2.23.6--0"
}
input: input:
tuple val(meta), path(bam) tuple val(meta), path(bam)
val options
output: output:
tuple val(meta), path("*.bam") , emit: bam tuple val(meta), path("*.bam") , emit: bam
tuple val(meta), path("*.metrics.txt"), emit: metrics tuple val(meta), path("*.metrics.txt"), emit: metrics
@ -24,8 +28,7 @@ process PICARD_MARKDUPLICATES {
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def ioptions = initOptions(options) def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
def avail_mem = 3 def avail_mem = 3
if (!task.memory) { if (!task.memory) {
log.info '[Picard MarkDuplicates] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' log.info '[Picard MarkDuplicates] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
@ -36,7 +39,7 @@ process PICARD_MARKDUPLICATES {
picard \\ picard \\
-Xmx${avail_mem}g \\ -Xmx${avail_mem}g \\
MarkDuplicates \\ MarkDuplicates \\
$ioptions.args \\ $options.args \\
INPUT=$bam \\ INPUT=$bam \\
OUTPUT=${prefix}.bam \\ OUTPUT=${prefix}.bam \\
METRICS_FILE=${prefix}.MarkDuplicates.metrics.txt METRICS_FILE=${prefix}.MarkDuplicates.metrics.txt

View file

@ -1,30 +1,33 @@
// Import generic module functions // Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions' include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:]
def options = initOptions(params.options)
process PICARD_MERGESAMFILES { process PICARD_MERGESAMFILES {
tag "$meta.id" tag "$meta.id"
label 'process_medium' label 'process_medium'
publishDir "${params.outdir}", publishDir "${params.outdir}",
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) } saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
container "quay.io/biocontainers/picard:2.23.6--0" conda (params.enable_conda ? "bioconda::picard=2.23.6" : null)
//container "https://depot.galaxyproject.org/singularity/picard:2.23.6--0" if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/picard:2.23.6--0"
conda (params.conda ? "bioconda::picard=2.23.6" : null) } else {
container "quay.io/biocontainers/picard:2.23.6--0"
}
input: input:
tuple val(meta), path(bams) tuple val(meta), path(bams)
val options
output: output:
tuple val(meta), path("*.bam"), emit: bam tuple val(meta), path("*.bam"), emit: bam
path "*.version.txt" , emit: version path "*.version.txt" , emit: version
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def ioptions = initOptions(options) def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
def bam_files = bams.sort() def bam_files = bams.sort()
def avail_mem = 3 def avail_mem = 3
if (!task.memory) { if (!task.memory) {
@ -37,7 +40,7 @@ process PICARD_MERGESAMFILES {
picard \\ picard \\
-Xmx${avail_mem}g \\ -Xmx${avail_mem}g \\
MergeSamFiles \\ MergeSamFiles \\
$ioptions.args \\ $options.args \\
${'INPUT='+bam_files.join(' INPUT=')} \\ ${'INPUT='+bam_files.join(' INPUT=')} \\
OUTPUT=${prefix}.bam OUTPUT=${prefix}.bam
echo \$(picard MergeSamFiles --version 2>&1) | awk -F' ' '{print \$NF}' > ${software}.version.txt echo \$(picard MergeSamFiles --version 2>&1) | awk -F' ' '{print \$NF}' > ${software}.version.txt

View file

@ -1,6 +1,9 @@
// Import generic module functions // Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions' include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:]
def options = initOptions(params.options)
def VERSION = '377' def VERSION = '377'
process UCSC_BEDRAPHTOBIGWIG { process UCSC_BEDRAPHTOBIGWIG {
@ -8,26 +11,26 @@ process UCSC_BEDRAPHTOBIGWIG {
label 'process_medium' label 'process_medium'
publishDir "${params.outdir}", publishDir "${params.outdir}",
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) } saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
container "quay.io/biocontainers/ucsc-bedgraphtobigwig:377--h446ed27_1" conda (params.enable_conda ? "bioconda::ucsc-bedgraphtobigwig=377" : null)
//container "https://depot.galaxyproject.org/singularity/ucsc-bedgraphtobigwig:377--h446ed27_1" if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/ucsc-bedgraphtobigwig:377--h446ed27_1"
conda (params.conda ? "bioconda::ucsc-bedgraphtobigwig=377" : null) } else {
container "quay.io/biocontainers/ucsc-bedgraphtobigwig:377--h446ed27_1"
}
input: input:
tuple val(meta), path(bedgraph) tuple val(meta), path(bedgraph)
path sizes path sizes
val options
output: output:
tuple val(meta), path("*.bigWig"), emit: bigwig tuple val(meta), path("*.bigWig"), emit: bigwig
path "*.version.txt" , emit: version path "*.version.txt" , emit: version
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def ioptions = initOptions(options) def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
""" """
bedGraphToBigWig $bedgraph $sizes ${prefix}.bigWig bedGraphToBigWig $bedgraph $sizes ${prefix}.bigWig
echo $VERSION > ${software}.version.txt echo $VERSION > ${software}.version.txt