mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
Update tools not in rnaseq pipeline too
This commit is contained in:
parent
14525ed50d
commit
1d30e2c21a
15 changed files with 188 additions and 141 deletions
4
git_update.sh
Executable file
4
git_update.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
|
||||
git pull
|
||||
git pull upstream master
|
||||
git push
|
|
@ -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: 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"
|
||||
// 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
|
||||
// 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
|
||||
|
@ -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.
|
||||
// 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,
|
||||
// "SOFTWARE" and (ideally) "TOOL" MUST be all one word separated by an "_".
|
||||
process SOFTWARE_TOOL {
|
||||
|
@ -31,18 +34,22 @@ process SOFTWARE_TOOL {
|
|||
mode: params.publish_dir_mode,
|
||||
// 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:''".
|
||||
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
|
||||
// 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.
|
||||
// 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"
|
||||
|
||||
// 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.conda ? "bioconda::samtools=1.10" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/samtools:1.10--h9402c20_2"
|
||||
} else {
|
||||
container "quay.io/biocontainers/samtools:1.10--h9402c20_2"
|
||||
}
|
||||
|
||||
input:
|
||||
// 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
|
||||
// e.g. "*.fastq.gz" and NOT "*.fastq", "*.bam" and NOT "*.sam" etc.
|
||||
tuple val(meta), path(reads)
|
||||
// TODO nf-core: List additional required input channels/values here
|
||||
val options
|
||||
|
||||
|
||||
output:
|
||||
// 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)
|
||||
|
@ -64,19 +69,18 @@ process SOFTWARE_TOOL {
|
|||
|
||||
script:
|
||||
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
|
||||
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
|
||||
// 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
|
||||
// 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
|
||||
// using the Nextflow "task" variable e.g. "--threads $task.cpus"
|
||||
// TODO nf-core: Please indent the command appropriately (4 spaces!!) to help with readability ;)
|
||||
"""
|
||||
software tool \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
--threads $task.cpus \\
|
||||
$reads \\
|
||||
> ${prefix}.bam
|
||||
|
|
|
@ -1,31 +1,34 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process BWA_INDEX {
|
||||
tag "$fasta"
|
||||
label 'process_high'
|
||||
publishDir "${params.outdir}",
|
||||
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"
|
||||
//container "https://depot.galaxyproject.org/singularity/bwa:0.7.17--hed695b0_7"
|
||||
|
||||
conda (params.conda ? "bioconda::bwa=0.7.17" : null)
|
||||
conda (params.enable_conda ? "bioconda::bwa=0.7.17" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/bwa:0.7.17--hed695b0_7"
|
||||
} else {
|
||||
container "biocontainers/bwa:v0.7.17_cv1"
|
||||
}
|
||||
|
||||
input:
|
||||
path fasta
|
||||
val options
|
||||
|
||||
|
||||
output:
|
||||
path "${fasta}.*" , emit: index
|
||||
path "*.version.txt", emit: version
|
||||
|
||||
script:
|
||||
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
|
||||
"""
|
||||
}
|
||||
|
|
|
@ -1,41 +1,44 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process BWA_MEM {
|
||||
tag "$meta.id"
|
||||
label 'process_high'
|
||||
publishDir "${params.outdir}",
|
||||
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"
|
||||
//container "https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:eabfac3657eda5818bae4090db989e3d41b01542-0"
|
||||
|
||||
conda (params.conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.10" : null)
|
||||
conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.10" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:eabfac3657eda5818bae4090db989e3d41b01542-0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:eabfac3657eda5818bae4090db989e3d41b01542-0"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(reads)
|
||||
path index
|
||||
path fasta
|
||||
val options
|
||||
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.bam"), emit: bam
|
||||
path "*.version.txt" , emit: version
|
||||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def read_group = meta.read_group ? "-R ${meta.read_group}" : ""
|
||||
"""
|
||||
bwa mem \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
$read_group \\
|
||||
-t $task.cpus \\
|
||||
$fasta \\
|
||||
$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
|
||||
"""
|
||||
|
|
|
@ -1,23 +1,27 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process DEEPTOOLS_COMPUTEMATRIX {
|
||||
tag "$meta.id"
|
||||
label 'process_high'
|
||||
publishDir "${params.outdir}",
|
||||
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"
|
||||
//container "https://depot.galaxyproject.org/singularity/deeptools:3.4.3--py_0"
|
||||
|
||||
conda (params.conda ? "bioconda::deeptools=3.4.3" : null)
|
||||
conda (params.enable_conda ? "bioconda::deeptools=3.4.3" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/deeptools:3.4.3--py_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/deeptools:3.4.3--py_0"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bigwig)
|
||||
path bed
|
||||
val options
|
||||
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.mat.gz") , emit: matrix
|
||||
tuple val(meta), path("*.mat.tab"), emit: table
|
||||
|
@ -25,11 +29,10 @@ process DEEPTOOLS_COMPUTEMATRIX {
|
|||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
"""
|
||||
computeMatrix \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
--regionsFileName $bed \\
|
||||
--scoreFileName $bigwig \\
|
||||
--outFileName ${prefix}.computeMatrix.mat.gz \\
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process DEEPTOOLS_PLOTFINGERPRINT {
|
||||
tag "$meta.id"
|
||||
label 'process_high'
|
||||
publishDir "${params.outdir}",
|
||||
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"
|
||||
//container "https://depot.galaxyproject.org/singularity/deeptools:3.4.3--py_0"
|
||||
|
||||
conda (params.conda ? "bioconda::deeptools=3.4.3" : null)
|
||||
conda (params.enable_conda ? "bioconda::deeptools=3.4.3" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/deeptools:3.4.3--py_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/deeptools:3.4.3--py_0"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bams), path(bais)
|
||||
val options
|
||||
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.pdf") , emit: pdf
|
||||
tuple val(meta), path("*.raw.txt") , emit: matrix
|
||||
|
@ -25,12 +29,11 @@ process DEEPTOOLS_PLOTFINGERPRINT {
|
|||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def extend = (meta.single_end && params.fragment_size > 0) ? "--extendReads ${params.fragment_size}" : ''
|
||||
"""
|
||||
plotFingerprint \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
$extend \\
|
||||
--bamfiles ${bams.join(' ')} \\
|
||||
--plotFile ${prefix}.plotFingerprint.pdf \\
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process DEEPTOOLS_PLOTHEATMAP {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
publishDir "${params.outdir}",
|
||||
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"
|
||||
//container "https://depot.galaxyproject.org/singularity/deeptools:3.4.3--py_0"
|
||||
|
||||
conda (params.conda ? "bioconda::deeptools=3.4.3" : null)
|
||||
conda (params.enable_conda ? "bioconda::deeptools=3.4.3" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/deeptools:3.4.3--py_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/deeptools:3.4.3--py_0"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(matrix)
|
||||
val options
|
||||
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.pdf"), emit: pdf
|
||||
tuple val(meta), path("*.tab"), emit: table
|
||||
|
@ -24,11 +28,10 @@ process DEEPTOOLS_PLOTHEATMAP {
|
|||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
"""
|
||||
plotHeatmap \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
--matrixFile $matrix \\
|
||||
--outFileName ${prefix}.plotHeatmap.pdf \\
|
||||
--outFileNameMatrix ${prefix}.plotHeatmap.mat.tab
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process DEEPTOOLS_PLOTPROFILE {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
publishDir "${params.outdir}",
|
||||
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"
|
||||
//container "https://depot.galaxyproject.org/singularity/deeptools:3.4.3--py_0"
|
||||
|
||||
conda (params.conda ? "bioconda::deeptools=3.4.3" : null)
|
||||
conda (params.enable_conda ? "bioconda::deeptools=3.4.3" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/deeptools:3.4.3--py_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/deeptools:3.4.3--py_0"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(matrix)
|
||||
val options
|
||||
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.pdf"), emit: pdf
|
||||
tuple val(meta), path("*.tab"), emit: table
|
||||
|
@ -24,11 +28,10 @@ process DEEPTOOLS_PLOTPROFILE {
|
|||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
"""
|
||||
plotProfile \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
--matrixFile $matrix \\
|
||||
--outFileName ${prefix}.plotProfile.pdf \\
|
||||
--outFileNameData ${prefix}.plotProfile.tab
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
def VERSION = '4.11'
|
||||
|
||||
process HOMER_ANNOTATEPEAKS {
|
||||
|
@ -8,18 +11,19 @@ process HOMER_ANNOTATEPEAKS {
|
|||
label 'process_medium'
|
||||
publishDir "${params.outdir}",
|
||||
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"
|
||||
//container "https://depot.galaxyproject.org/singularity/homer:4.11--pl526h9a982cc_2"
|
||||
|
||||
conda (params.conda ? "bioconda::homer=4.11" : null)
|
||||
conda (params.enable_conda ? "bioconda::homer=4.11" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/homer:4.11--pl526h9a982cc_2"
|
||||
} else {
|
||||
container "quay.io/biocontainers/homer:4.11--pl526h9a982cc_2"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(peak)
|
||||
path fasta
|
||||
path gtf
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*annotatePeaks.txt"), emit: txt
|
||||
|
@ -27,13 +31,12 @@ process HOMER_ANNOTATEPEAKS {
|
|||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
"""
|
||||
annotatePeaks.pl \\
|
||||
$peak \\
|
||||
$fasta \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
-gtf $gtf \\
|
||||
-cpu $task.cpus \\
|
||||
> ${prefix}.annotatePeaks.txt
|
||||
|
|
|
@ -1,23 +1,27 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process MACS2_CALLPEAK {
|
||||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
publishDir "${params.outdir}",
|
||||
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"
|
||||
//container "https://depot.galaxyproject.org/singularity/macs2:2.2.7.1--py37h516909a_0"
|
||||
|
||||
conda (params.conda ? "bioconda::macs2=2.2.7.1" : null)
|
||||
conda (params.enable_conda ? "bioconda::macs2=2.2.7.1" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/macs2:2.2.7.1--py37h516909a_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/macs2:2.2.7.1--py37h516909a_0"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(ipbam), path(controlbam)
|
||||
val macs2_gsize
|
||||
val options
|
||||
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.{narrowPeak,broadPeak}"), emit: peak
|
||||
tuple val(meta), path("*.xls") , emit: xls
|
||||
|
@ -29,14 +33,13 @@ process MACS2_CALLPEAK {
|
|||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def format = meta.single_end ? 'BAM' : 'BAMPE'
|
||||
def control = controlbam ? "--control $controlbam" : ''
|
||||
"""
|
||||
macs2 \\
|
||||
callpeak \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
--gsize $macs2_gsize \\
|
||||
--format $format \\
|
||||
--name $prefix \\
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
def VERSION = '1.2.2'
|
||||
|
||||
process PHANTOMPEAKQUALTOOLS {
|
||||
|
@ -8,17 +11,18 @@ process PHANTOMPEAKQUALTOOLS {
|
|||
label 'process_medium'
|
||||
publishDir "${params.outdir}",
|
||||
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"
|
||||
//container "https://depot.galaxyproject.org/singularity/phantompeakqualtools:1.2.2--0"
|
||||
|
||||
conda (params.conda ? "bioconda::phantompeakqualtools=1.2.2" : null)
|
||||
conda (params.enable_conda ? "bioconda::phantompeakqualtools=1.2.2" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/phantompeakqualtools:1.2.2--0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/phantompeakqualtools:1.2.2--0"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
val options
|
||||
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.out") , emit: spp
|
||||
tuple val(meta), path("*.pdf") , emit: pdf
|
||||
|
@ -27,8 +31,7 @@ process PHANTOMPEAKQUALTOOLS {
|
|||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
"""
|
||||
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
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process PICARD_COLLECTMULTIPLEMETRICS {
|
||||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
publishDir "${params.outdir}",
|
||||
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"
|
||||
//container "https://depot.galaxyproject.org/singularity/picard:2.23.6--0"
|
||||
|
||||
conda (params.conda ? "bioconda::picard=2.23.6" : null)
|
||||
conda (params.enable_conda ? "bioconda::picard=2.23.6" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/picard:2.23.6--0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/picard:2.23.6--0"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
path fasta
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*_metrics"), emit: metrics
|
||||
|
@ -25,8 +29,7 @@ process PICARD_COLLECTMULTIPLEMETRICS {
|
|||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def avail_mem = 3
|
||||
if (!task.memory) {
|
||||
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 \\
|
||||
-Xmx${avail_mem}g \\
|
||||
CollectMultipleMetrics \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
INPUT=$bam \\
|
||||
OUTPUT=${prefix}.CollectMultipleMetrics \\
|
||||
REFERENCE_SEQUENCE=$fasta
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process PICARD_MARKDUPLICATES {
|
||||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
publishDir "${params.outdir}",
|
||||
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"
|
||||
//container "https://depot.galaxyproject.org/singularity/picard:2.23.6--0"
|
||||
|
||||
conda (params.conda ? "bioconda::picard=2.23.6" : null)
|
||||
conda (params.enable_conda ? "bioconda::picard=2.23.6" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/picard:2.23.6--0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/picard:2.23.6--0"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
val options
|
||||
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.bam") , emit: bam
|
||||
tuple val(meta), path("*.metrics.txt"), emit: metrics
|
||||
|
@ -24,8 +28,7 @@ process PICARD_MARKDUPLICATES {
|
|||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def avail_mem = 3
|
||||
if (!task.memory) {
|
||||
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 \\
|
||||
-Xmx${avail_mem}g \\
|
||||
MarkDuplicates \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
INPUT=$bam \\
|
||||
OUTPUT=${prefix}.bam \\
|
||||
METRICS_FILE=${prefix}.MarkDuplicates.metrics.txt
|
||||
|
|
|
@ -1,30 +1,33 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process PICARD_MERGESAMFILES {
|
||||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
publishDir "${params.outdir}",
|
||||
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"
|
||||
//container "https://depot.galaxyproject.org/singularity/picard:2.23.6--0"
|
||||
|
||||
conda (params.conda ? "bioconda::picard=2.23.6" : null)
|
||||
conda (params.enable_conda ? "bioconda::picard=2.23.6" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/picard:2.23.6--0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/picard:2.23.6--0"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bams)
|
||||
val options
|
||||
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.bam"), emit: bam
|
||||
path "*.version.txt" , emit: version
|
||||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def bam_files = bams.sort()
|
||||
def avail_mem = 3
|
||||
if (!task.memory) {
|
||||
|
@ -37,7 +40,7 @@ process PICARD_MERGESAMFILES {
|
|||
picard \\
|
||||
-Xmx${avail_mem}g \\
|
||||
MergeSamFiles \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
${'INPUT='+bam_files.join(' INPUT=')} \\
|
||||
OUTPUT=${prefix}.bam
|
||||
echo \$(picard MergeSamFiles --version 2>&1) | awk -F' ' '{print \$NF}' > ${software}.version.txt
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
def VERSION = '377'
|
||||
|
||||
process UCSC_BEDRAPHTOBIGWIG {
|
||||
|
@ -8,26 +11,26 @@ process UCSC_BEDRAPHTOBIGWIG {
|
|||
label 'process_medium'
|
||||
publishDir "${params.outdir}",
|
||||
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"
|
||||
//container "https://depot.galaxyproject.org/singularity/ucsc-bedgraphtobigwig:377--h446ed27_1"
|
||||
|
||||
conda (params.conda ? "bioconda::ucsc-bedgraphtobigwig=377" : null)
|
||||
conda (params.enable_conda ? "bioconda::ucsc-bedgraphtobigwig=377" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/ucsc-bedgraphtobigwig:377--h446ed27_1"
|
||||
} else {
|
||||
container "quay.io/biocontainers/ucsc-bedgraphtobigwig:377--h446ed27_1"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bedgraph)
|
||||
path sizes
|
||||
val options
|
||||
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.bigWig"), emit: bigwig
|
||||
path "*.version.txt" , emit: version
|
||||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
"""
|
||||
bedGraphToBigWig $bedgraph $sizes ${prefix}.bigWig
|
||||
echo $VERSION > ${software}.version.txt
|
||||
|
|
Loading…
Reference in a new issue