mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 19:18:17 +00:00
Remove functions file
This commit is contained in:
parent
a6aab020df
commit
14525ed50d
32 changed files with 393 additions and 357 deletions
|
@ -1,21 +1,25 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process FASTQC {
|
||||
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) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::fastqc=0.11.9" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/fastqc:0.11.9--0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/fastqc:0.11.9--0"
|
||||
//container "https://depot.galaxyproject.org/singularity/fastqc:0.11.9--0"
|
||||
|
||||
conda (params.conda ? "bioconda::fastqc=0.11.9" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(reads)
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.html"), emit: html
|
||||
|
@ -25,19 +29,18 @@ process FASTQC {
|
|||
script:
|
||||
// Add soft-links to original FastQs for consistent naming in pipeline
|
||||
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}"
|
||||
if (meta.single_end) {
|
||||
"""
|
||||
[ ! -f ${prefix}.fastq.gz ] && ln -s $reads ${prefix}.fastq.gz
|
||||
fastqc $ioptions.args --threads $task.cpus ${prefix}.fastq.gz
|
||||
fastqc $options.args --threads $task.cpus ${prefix}.fastq.gz
|
||||
fastqc --version | sed -e "s/FastQC v//g" > ${software}.version.txt
|
||||
"""
|
||||
} else {
|
||||
"""
|
||||
[ ! -f ${prefix}_1.fastq.gz ] && ln -s ${reads[0]} ${prefix}_1.fastq.gz
|
||||
[ ! -f ${prefix}_2.fastq.gz ] && ln -s ${reads[1]} ${prefix}_2.fastq.gz
|
||||
fastqc $ioptions.args --threads $task.cpus ${prefix}_1.fastq.gz ${prefix}_2.fastq.gz
|
||||
fastqc $options.args --threads $task.cpus ${prefix}_1.fastq.gz ${prefix}_2.fastq.gz
|
||||
fastqc --version | sed -e "s/FastQC v//g" > ${software}.version.txt
|
||||
"""
|
||||
}
|
||||
|
|
|
@ -1,20 +1,24 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process GFFREAD {
|
||||
tag "$gff"
|
||||
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:'') }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gffread=0.12.1" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/gffread:0.12.1--h8b12597_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/gffread:0.12.1--h8b12597_0"
|
||||
//container https://depot.galaxyproject.org/singularity/gffread:0.12.1--h8b12597_0
|
||||
|
||||
conda (params.conda ? "bioconda::gffread=0.12.1" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
path gff
|
||||
val options
|
||||
|
||||
output:
|
||||
path "*.gtf" , emit: gtf
|
||||
|
@ -22,9 +26,8 @@ process GFFREAD {
|
|||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
"""
|
||||
gffread $gff $ioptions.args -o ${gff.baseName}.gtf
|
||||
gffread $gff $options.args -o ${gff.baseName}.gtf
|
||||
echo \$(gffread --version 2>&1) > ${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 = '2.2.0'
|
||||
|
||||
process HISAT2_ALIGN {
|
||||
|
@ -8,18 +11,19 @@ process HISAT2_ALIGN {
|
|||
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) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::hisat2=2.2.0 bioconda::samtools=1.10" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/mulled-v2-a97e90b3b802d1da3d6958e0867610c718cb5eb1:2880dd9d8ad0a7b221d4eacda9a818e92983128d-0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/mulled-v2-a97e90b3b802d1da3d6958e0867610c718cb5eb1:2880dd9d8ad0a7b221d4eacda9a818e92983128d-0"
|
||||
//container "https://depot.galaxyproject.org/singularity/mulled-v2-a97e90b3b802d1da3d6958e0867610c718cb5eb1:2880dd9d8ad0a7b221d4eacda9a818e92983128d-0"
|
||||
|
||||
conda (params.conda ? "bioconda::hisat2=2.2.0 bioconda::samtools=1.10" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(reads)
|
||||
path index
|
||||
path splicesites
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.bam"), emit: bam
|
||||
|
@ -30,8 +34,7 @@ process HISAT2_ALIGN {
|
|||
|
||||
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 strandedness = ''
|
||||
if (meta.strandedness == 'forward') {
|
||||
|
@ -53,7 +56,7 @@ process HISAT2_ALIGN {
|
|||
--threads $task.cpus \\
|
||||
$seq_center \\
|
||||
$unaligned \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
| samtools view -bS -F 4 -F 256 - > ${prefix}.bam
|
||||
|
||||
echo $VERSION > ${software}.version.txt
|
||||
|
@ -74,7 +77,7 @@ process HISAT2_ALIGN {
|
|||
$unaligned \\
|
||||
--no-mixed \\
|
||||
--no-discordant \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
| samtools view -bS -F 4 -F 8 -F 256 - > ${prefix}.bam
|
||||
|
||||
if [ -f ${prefix}.unmapped.fastq.1.gz ]; then
|
||||
|
|
|
@ -1,24 +1,28 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
def VERSION = '2.2.0'
|
||||
|
||||
process HISAT2_BUILD {
|
||||
tag "$fasta"
|
||||
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:'') }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::hisat2=2.2.0" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/hisat2:2.2.0--py37hfa133b6_4"
|
||||
} else {
|
||||
container "quay.io/biocontainers/hisat2:2.2.0--py37hfa133b6_4"
|
||||
//container "https://depot.galaxyproject.org/singularity/hisat2:2.2.0--py37hfa133b6_4"
|
||||
|
||||
conda (params.conda ? "bioconda::hisat2=2.2.0" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
path fasta
|
||||
path gtf
|
||||
path splicesites
|
||||
val options
|
||||
|
||||
output:
|
||||
path "hisat2", emit: index
|
||||
|
@ -47,7 +51,6 @@ process HISAT2_BUILD {
|
|||
}
|
||||
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
"""
|
||||
mkdir hisat2
|
||||
$extract_exons
|
||||
|
@ -55,7 +58,7 @@ process HISAT2_BUILD {
|
|||
-p $task.cpus \\
|
||||
$ss \\
|
||||
$exon \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
$fasta \\
|
||||
hisat2/${fasta.baseName}
|
||||
|
||||
|
|
|
@ -1,22 +1,25 @@
|
|||
// Import generic module functions
|
||||
include { saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
|
||||
def VERSION = '2.2.0'
|
||||
|
||||
process HISAT2_EXTRACTSPLICESITES {
|
||||
tag "$gtf"
|
||||
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:'') }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::hisat2=2.2.0" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/hisat2:2.2.0--py37hfa133b6_4"
|
||||
} else {
|
||||
container "quay.io/biocontainers/hisat2:2.2.0--py37hfa133b6_4"
|
||||
//container "https://depot.galaxyproject.org/singularity/hisat2:2.2.0--py37hfa133b6_4"
|
||||
|
||||
conda (params.conda ? "bioconda::hisat2=2.2.0" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
path gtf
|
||||
val options
|
||||
|
||||
output:
|
||||
path "*.splice_sites.txt", emit: txt
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
/*
|
||||
* -----------------------------------------------------
|
||||
* Utility functions used in nf-core DSL2 module files
|
||||
* -----------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
* Extract name of software tool from process name using $task.process
|
||||
*/
|
||||
def getSoftwareName(task_process) {
|
||||
return task_process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()
|
||||
}
|
||||
|
||||
/*
|
||||
* Function to initialise default values and to generate a Groovy Map of available options for nf-core modules
|
||||
*/
|
||||
def initOptions(Map args) {
|
||||
def Map options = [:]
|
||||
options.args = args.args ?: ''
|
||||
options.args2 = args.args2 ?: ''
|
||||
options.publish_by_id = args.publish_by_id ?: false
|
||||
options.publish_dir = args.publish_dir ?: ''
|
||||
options.publish_files = args.publish_files
|
||||
options.suffix = args.suffix ?: ''
|
||||
return options
|
||||
}
|
||||
|
||||
/*
|
||||
* Tidy up and join elements of a list to return a path string
|
||||
*/
|
||||
def getPathFromList(path_list) {
|
||||
def paths = path_list.findAll { item -> !item?.trim().isEmpty() } // Remove empty entries
|
||||
paths = paths.collect { it.trim().replaceAll("^[/]+|[/]+\$", "") } // Trim whitespace and trailing slashes
|
||||
return paths.join('/')
|
||||
}
|
||||
|
||||
/*
|
||||
* Function to save/publish module results
|
||||
*/
|
||||
def saveFiles(Map args) {
|
||||
if (!args.filename.endsWith('.version.txt')) {
|
||||
def ioptions = initOptions(args.options)
|
||||
def path_list = [ ioptions.publish_dir ?: args.publish_dir ]
|
||||
if (ioptions.publish_by_id) {
|
||||
path_list.add(args.publish_id)
|
||||
}
|
||||
if (ioptions.publish_files instanceof Map) {
|
||||
for (ext in ioptions.publish_files) {
|
||||
if (args.filename.endsWith(ext.key)) {
|
||||
def ext_list = path_list.collect()
|
||||
ext_list.add(ext.value)
|
||||
return "${getPathFromList(ext_list)}/$args.filename"
|
||||
}
|
||||
}
|
||||
} else if (ioptions.publish_files == null) {
|
||||
return "${getPathFromList(path_list)}/$args.filename"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,22 +1,26 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process PRESEQ_LCEXTRAP {
|
||||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
label 'error_ignore'
|
||||
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) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::preseq=2.0.3" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/preseq:2.0.3--hf53bd2b_3"
|
||||
} else {
|
||||
container "quay.io/biocontainers/preseq:2.0.3--hf53bd2b_3"
|
||||
//container "https://depot.galaxyproject.org/singularity/preseq:2.0.3--hf53bd2b_3"
|
||||
|
||||
conda (params.conda ? "bioconda::preseq=2.0.3" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.ccurve.txt"), emit: ccurve
|
||||
|
@ -25,13 +29,12 @@ process PRESEQ_LCEXTRAP {
|
|||
|
||||
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 paired_end = meta.single_end ? '' : '-pe'
|
||||
"""
|
||||
preseq \\
|
||||
lc_extrap \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
$paired_end \\
|
||||
-output ${prefix}.ccurve.txt \\
|
||||
$bam
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process QUALIMAP_RNASEQ {
|
||||
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) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::qualimap=2.2.2d" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/qualimap:2.2.2d--1"
|
||||
} else {
|
||||
container "quay.io/biocontainers/qualimap:2.2.2d--1"
|
||||
//container "https://depot.galaxyproject.org/singularity/qualimap:2.2.2d--1"
|
||||
|
||||
conda (params.conda ? "bioconda::qualimap=2.2.2d" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
path gtf
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("${prefix}"), emit: results
|
||||
|
@ -24,8 +28,7 @@ process QUALIMAP_RNASEQ {
|
|||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def paired_end = meta.single_end ? '' : '-pe'
|
||||
def memory = task.memory.toGiga() + "G"
|
||||
|
||||
|
@ -42,7 +45,7 @@ process QUALIMAP_RNASEQ {
|
|||
qualimap \\
|
||||
--java-mem-size=$memory \\
|
||||
rnaseq \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
-bam $bam \\
|
||||
-gtf $gtf \\
|
||||
-p $strandedness \\
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process RSEM_CALCULATEEXPRESSION {
|
||||
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) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::rsem=1.3.3 bioconda::star=2.7.6a" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0"
|
||||
//container "https://depot.galaxyproject.org/singularity/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0"
|
||||
|
||||
conda (params.conda ? "bioconda::rsem=1.3.3 bioconda::star=2.7.6a" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(reads)
|
||||
path index
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.genes.results") , emit: counts_gene
|
||||
|
@ -31,8 +35,7 @@ process RSEM_CALCULATEEXPRESSION {
|
|||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
|
||||
def strandedness = ''
|
||||
if (meta.strandedness == 'forward') {
|
||||
|
@ -48,7 +51,7 @@ process RSEM_CALCULATEEXPRESSION {
|
|||
--temporary-folder ./tmp/ \\
|
||||
$strandedness \\
|
||||
$paired_end \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
$reads \\
|
||||
\$INDEX \\
|
||||
$prefix
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process RSEM_PREPAREREFERENCE {
|
||||
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:'') }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::rsem=1.3.3 bioconda::star=2.7.6a" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0"
|
||||
//container "https://depot.galaxyproject.org/singularity/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0"
|
||||
|
||||
conda (params.conda ? "bioconda::rsem=1.3.3 bioconda::star=2.7.6a" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
path fasta
|
||||
path gtf
|
||||
val options
|
||||
|
||||
output:
|
||||
path "rsem" , emit: index
|
||||
|
@ -24,13 +28,12 @@ process RSEM_PREPAREREFERENCE {
|
|||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
"""
|
||||
mkdir rsem
|
||||
rsem-prepare-reference \\
|
||||
--gtf $gtf \\
|
||||
--num-threads $task.cpus \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
$fasta \\
|
||||
rsem/genome
|
||||
|
||||
|
|
|
@ -1,21 +1,25 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process RSEQC_BAMSTAT {
|
||||
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) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::rseqc=3.0.1" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1"
|
||||
} else {
|
||||
container "quay.io/biocontainers/rseqc:3.0.1--py37h516909a_1"
|
||||
//container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1"
|
||||
|
||||
conda (params.conda ? "bioconda::rseqc=3.0.1" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.bam_stat.txt"), emit: txt
|
||||
|
@ -23,12 +27,11 @@ process RSEQC_BAMSTAT {
|
|||
|
||||
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}"
|
||||
"""
|
||||
bam_stat.py \\
|
||||
-i $bam \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
> ${prefix}.bam_stat.txt
|
||||
|
||||
bam_stat.py --version | sed -e "s/bam_stat.py //g" > ${software}.version.txt
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process RSEQC_INFEREXPERIMENT {
|
||||
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) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::rseqc=3.0.1" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1"
|
||||
} else {
|
||||
container "quay.io/biocontainers/rseqc:3.0.1--py37h516909a_1"
|
||||
//container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1"
|
||||
|
||||
conda (params.conda ? "bioconda::rseqc=3.0.1" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
path bed
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.infer_experiment.txt"), emit: txt
|
||||
|
@ -24,13 +28,12 @@ process RSEQC_INFEREXPERIMENT {
|
|||
|
||||
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}"
|
||||
"""
|
||||
infer_experiment.py \\
|
||||
-i $bam \\
|
||||
-r $bed \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
> ${prefix}.infer_experiment.txt
|
||||
|
||||
infer_experiment.py --version | sed -e "s/infer_experiment.py //g" > ${software}.version.txt
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process RSEQC_INNERDISTANCE {
|
||||
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) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::rseqc=3.0.1" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1"
|
||||
} else {
|
||||
container "quay.io/biocontainers/rseqc:3.0.1--py37h516909a_1"
|
||||
//container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1"
|
||||
|
||||
conda (params.conda ? "bioconda::rseqc=3.0.1" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
path bed
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*distance.txt"), optional:true, emit: distance
|
||||
|
@ -28,15 +32,14 @@ process RSEQC_INNERDISTANCE {
|
|||
|
||||
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}"
|
||||
if (!meta.single_end) {
|
||||
"""
|
||||
inner_distance.py \\
|
||||
-i $bam \\
|
||||
-r $bed \\
|
||||
-o $prefix \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
> stdout.txt
|
||||
head -n 2 stdout.txt > ${prefix}.inner_distance_mean.txt
|
||||
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process RSEQC_JUNCTIONANNOTATION {
|
||||
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) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::rseqc=3.0.1" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1"
|
||||
} else {
|
||||
container "quay.io/biocontainers/rseqc:3.0.1--py37h516909a_1"
|
||||
//container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1"
|
||||
|
||||
conda (params.conda ? "bioconda::rseqc=3.0.1" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
path bed
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.junction.bed"), emit: bed
|
||||
|
@ -30,14 +34,13 @@ process RSEQC_JUNCTIONANNOTATION {
|
|||
|
||||
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}"
|
||||
"""
|
||||
junction_annotation.py \\
|
||||
-i $bam \\
|
||||
-r $bed \\
|
||||
-o $prefix \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
2> ${prefix}.junction_annotation.log
|
||||
|
||||
junction_annotation.py --version | sed -e "s/junction_annotation.py //g" > ${software}.version.txt
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process RSEQC_JUNCTIONSATURATION {
|
||||
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) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::rseqc=3.0.1" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1"
|
||||
} else {
|
||||
container "quay.io/biocontainers/rseqc:3.0.1--py37h516909a_1"
|
||||
//container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1"
|
||||
|
||||
conda (params.conda ? "bioconda::rseqc=3.0.1" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
path bed
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.pdf"), emit: pdf
|
||||
|
@ -25,14 +29,13 @@ process RSEQC_JUNCTIONSATURATION {
|
|||
|
||||
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}"
|
||||
"""
|
||||
junction_saturation.py \\
|
||||
-i $bam \\
|
||||
-r $bed \\
|
||||
-o $prefix \\
|
||||
$ioptions.args
|
||||
$options.args
|
||||
|
||||
junction_saturation.py --version | sed -e "s/junction_saturation.py //g" > ${software}.version.txt
|
||||
"""
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process RSEQC_READDISTRIBUTION {
|
||||
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) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::rseqc=3.0.1" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1"
|
||||
} else {
|
||||
container "quay.io/biocontainers/rseqc:3.0.1--py37h516909a_1"
|
||||
//container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1"
|
||||
|
||||
conda (params.conda ? "bioconda::rseqc=3.0.1" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
path bed
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.read_distribution.txt"), emit: txt
|
||||
|
@ -24,8 +28,7 @@ process RSEQC_READDISTRIBUTION {
|
|||
|
||||
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}"
|
||||
"""
|
||||
read_distribution.py \\
|
||||
-i $bam \\
|
||||
|
|
|
@ -1,21 +1,25 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process RSEQC_READDUPLICATION {
|
||||
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) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::rseqc=3.0.1" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1"
|
||||
} else {
|
||||
container "quay.io/biocontainers/rseqc:3.0.1--py37h516909a_1"
|
||||
//container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1"
|
||||
|
||||
conda (params.conda ? "bioconda::rseqc=3.0.1" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*seq.DupRate.xls"), emit: seq_xls
|
||||
|
@ -26,13 +30,12 @@ process RSEQC_READDUPLICATION {
|
|||
|
||||
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}"
|
||||
"""
|
||||
read_duplication.py \\
|
||||
-i $bam \\
|
||||
-o $prefix \\
|
||||
$ioptions.args
|
||||
$options.args
|
||||
|
||||
read_duplication.py --version | sed -e "s/read_duplication.py //g" > ${software}.version.txt
|
||||
"""
|
||||
|
|
|
@ -1,21 +1,25 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process SALMON_INDEX {
|
||||
tag "$fasta"
|
||||
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:'') }
|
||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:'') }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::salmon=1.3.0" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/salmon:1.3.0--hf69c8f4_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/salmon:1.3.0--hf69c8f4_0"
|
||||
//container "https://depot.galaxyproject.org/singularity/salmon:1.3.0--hf69c8f4_0"
|
||||
|
||||
conda (params.conda ? "bioconda::salmon=1.3.0" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
path fasta
|
||||
val options
|
||||
|
||||
output:
|
||||
path "salmon" , emit: index
|
||||
|
@ -23,13 +27,12 @@ process SALMON_INDEX {
|
|||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
"""
|
||||
salmon \\
|
||||
index \\
|
||||
--threads $task.cpus \\
|
||||
-t $fasta \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
-i salmon
|
||||
salmon --version | sed -e "s/salmon //g" > ${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 SALMON_QUANT {
|
||||
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) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::salmon=1.3.0" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/salmon:1.3.0--hf69c8f4_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/salmon:1.3.0--hf69c8f4_0"
|
||||
//container "https://depot.galaxyproject.org/singularity/salmon:1.3.0--hf69c8f4_0"
|
||||
|
||||
conda (params.conda ? "bioconda::salmon=1.3.0" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(reads)
|
||||
path index
|
||||
path gtf
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("${prefix}"), emit: results
|
||||
|
@ -25,8 +29,7 @@ process SALMON_QUANT {
|
|||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def endedness = meta.single_end ? "-r $reads" : "-1 ${reads[0]} -2 ${reads[1]}"
|
||||
|
||||
def strandedness = meta.single_end ? 'U' : 'IU'
|
||||
|
@ -42,7 +45,7 @@ process SALMON_QUANT {
|
|||
--libType=$strandedness \\
|
||||
--index $index \\
|
||||
$endedness \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
-o $prefix
|
||||
|
||||
salmon --version | sed -e "s/salmon //g" > ${software}.version.txt
|
||||
|
|
|
@ -1,20 +1,23 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
include { saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
|
||||
process SAMTOOLS_FLAGSTAT {
|
||||
tag "$meta.id"
|
||||
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) }
|
||||
|
||||
conda (params.enable_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"
|
||||
//container " https://depot.galaxyproject.org/singularity/samtools:1.10--h9402c20_2"
|
||||
|
||||
conda (params.conda ? "bioconda::samtools=1.10" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam), path(bai)
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.flagstat"), emit: flagstat
|
||||
|
|
|
@ -1,20 +1,23 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
include { saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
|
||||
process SAMTOOLS_IDXSTATS {
|
||||
tag "$meta.id"
|
||||
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) }
|
||||
|
||||
conda (params.enable_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"
|
||||
//container " https://depot.galaxyproject.org/singularity/samtools:1.10--h9402c20_2"
|
||||
|
||||
conda (params.conda ? "bioconda::samtools=1.10" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam), path(bai)
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.idxstats"), emit: idxstats
|
||||
|
|
|
@ -1,20 +1,23 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
include { saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
|
||||
process SAMTOOLS_INDEX {
|
||||
tag "$meta.id"
|
||||
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) }
|
||||
|
||||
conda (params.enable_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"
|
||||
//container " https://depot.galaxyproject.org/singularity/samtools:1.10--h9402c20_2"
|
||||
|
||||
conda (params.conda ? "bioconda::samtools=1.10" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.bai"), emit: bai
|
||||
|
|
|
@ -1,21 +1,25 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process SAMTOOLS_SORT {
|
||||
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) }
|
||||
|
||||
conda (params.enable_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"
|
||||
//container " https://depot.galaxyproject.org/singularity/samtools:1.10--h9402c20_2"
|
||||
|
||||
conda (params.conda ? "bioconda::samtools=1.10" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.bam"), emit: bam
|
||||
|
@ -23,10 +27,9 @@ process SAMTOOLS_SORT {
|
|||
|
||||
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}"
|
||||
"""
|
||||
samtools sort $ioptions.args -@ $task.cpus -o ${prefix}.bam -T $prefix $bam
|
||||
samtools sort $options.args -@ $task.cpus -o ${prefix}.bam -T $prefix $bam
|
||||
echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//' > ${software}.version.txt
|
||||
"""
|
||||
}
|
||||
|
|
|
@ -1,20 +1,23 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
include { saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
|
||||
process SAMTOOLS_STATS {
|
||||
tag "$meta.id"
|
||||
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) }
|
||||
|
||||
conda (params.enable_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"
|
||||
//container " https://depot.galaxyproject.org/singularity/samtools:1.10--h9402c20_2"
|
||||
|
||||
conda (params.conda ? "bioconda::samtools=1.10" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam), path(bai)
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.stats"), emit: stats
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process SORTMERNA {
|
||||
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) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::sortmerna=4.2.0" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/sortmerna:4.2.0--0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/sortmerna:4.2.0--0"
|
||||
//container "https://depot.galaxyproject.org/singularity/sortmerna:4.2.0--0"
|
||||
|
||||
conda (params.conda ? "bioconda::sortmerna=4.2.0" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(reads)
|
||||
path fasta
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.fastq.gz"), emit: reads
|
||||
|
@ -25,8 +29,7 @@ process SORTMERNA {
|
|||
|
||||
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 Refs = ""
|
||||
for (i=0; i<fasta.size(); i++) { Refs+= " --ref ${fasta[i]}" }
|
||||
|
@ -39,7 +42,7 @@ process SORTMERNA {
|
|||
--workdir . \\
|
||||
--aligned rRNA_reads \\
|
||||
--other non_rRNA_reads \\
|
||||
$ioptions.args
|
||||
$options.args
|
||||
|
||||
gzip -f < non_rRNA_reads.fq > ${prefix}.fastq.gz
|
||||
mv rRNA_reads.log ${prefix}.sortmerna.log
|
||||
|
@ -58,7 +61,7 @@ process SORTMERNA {
|
|||
--other non_rRNA_reads \\
|
||||
--paired_in \\
|
||||
--out2 \\
|
||||
$ioptions.args
|
||||
$options.args
|
||||
|
||||
gzip -f < non_rRNA_reads_fwd.fq > ${prefix}_1.fastq.gz
|
||||
gzip -f < non_rRNA_reads_rev.fq > ${prefix}_2.fastq.gz
|
||||
|
|
|
@ -1,24 +1,28 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process STAR_ALIGN {
|
||||
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) }
|
||||
|
||||
// Don't upgrade me - 2.7X indices incompatible with iGenomes.
|
||||
// Note: 2.7X indices incompatible with AWS iGenomes.
|
||||
conda (params.enable_conda ? "bioconda::star=2.6.1d" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/star:2.6.1d--0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/star:2.6.1d--0"
|
||||
//container "https://depot.galaxyproject.org/singularity/star:2.6.1d--0"
|
||||
|
||||
conda (params.conda ? "bioconda::star=2.6.1d" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(reads)
|
||||
path index
|
||||
path gtf
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*Aligned.out.bam") , emit: bam
|
||||
|
@ -34,8 +38,7 @@ process STAR_ALIGN {
|
|||
|
||||
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 ignore_gtf = params.star_ignore_sjdbgtf ? '' : "--sjdbGTFfile $gtf"
|
||||
def seq_center = params.seq_center ? "--outSAMattrRGline ID:$prefix 'CN:$params.seq_center' 'SM:$prefix'" : "--outSAMattrRGline ID:$prefix 'SM:$prefix'"
|
||||
"""
|
||||
|
@ -46,7 +49,7 @@ process STAR_ALIGN {
|
|||
--outFileNamePrefix $prefix. \\
|
||||
$ignore_gtf \\
|
||||
$seq_center \\
|
||||
$ioptions.args
|
||||
$options.args
|
||||
|
||||
if [ -f ${prefix}.Unmapped.out.mate1 ]; then
|
||||
mv ${prefix}.Unmapped.out.mate1 ${prefix}.unmapped_1.fastq
|
||||
|
|
|
@ -1,23 +1,27 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process STAR_GENOMEGENERATE {
|
||||
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:'') }
|
||||
|
||||
// Don't upgrade me - 2.7X indices incompatible with iGenomes.
|
||||
// Note: 2.7X indices incompatible with AWS iGenomes.
|
||||
conda (params.enable_conda ? "bioconda::star=2.6.1d" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/star:2.6.1d--0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/star:2.6.1d--0"
|
||||
//container "https://depot.galaxyproject.org/singularity/star:2.6.1d--0"
|
||||
|
||||
conda (params.conda ? "bioconda::star=2.6.1d" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
path fasta
|
||||
path gtf
|
||||
val options
|
||||
|
||||
output:
|
||||
path "star" , emit: index
|
||||
|
@ -25,7 +29,6 @@ process STAR_GENOMEGENERATE {
|
|||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
def memory = task.memory ? "--limitGenomeGenerateRAM ${task.memory.toBytes() - 100000000}" : ''
|
||||
"""
|
||||
mkdir star
|
||||
|
@ -36,7 +39,7 @@ process STAR_GENOMEGENERATE {
|
|||
--sjdbGTFfile $gtf \\
|
||||
--runThreadN $task.cpus \\
|
||||
$memory \\
|
||||
$ioptions.args
|
||||
$options.args
|
||||
|
||||
STAR --version | sed -e "s/STAR_//g" > ${software}.version.txt
|
||||
"""
|
||||
|
|
|
@ -1,22 +1,27 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process STRINGTIE {
|
||||
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) }
|
||||
|
||||
// Note: 2.7X indices incompatible with AWS iGenomes.
|
||||
conda (params.enable_conda ? "bioconda::stringtie=2.1.4" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/stringtie:2.1.4--h7e0af3c_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/stringtie:2.1.4--h7e0af3c_0"
|
||||
//container "https://depot.galaxyproject.org/singularity/stringtie:2.1.4--h7e0af3c_0"
|
||||
|
||||
conda (params.conda ? "bioconda::stringtie=2.1.4" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
path gtf
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.coverage.gtf") , emit: coverage_gtf
|
||||
|
@ -27,8 +32,7 @@ process STRINGTIE {
|
|||
|
||||
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 strandedness = ''
|
||||
if (meta.strandedness == 'forward') {
|
||||
|
@ -45,7 +49,7 @@ process STRINGTIE {
|
|||
-A ${prefix}.gene_abundance.txt \\
|
||||
-C ${prefix}.coverage.gtf \\
|
||||
-b ${prefix}.ballgown \\
|
||||
$ioptions.args
|
||||
$options.args
|
||||
|
||||
stringtie --version > ${software}.version.txt
|
||||
"""
|
||||
|
|
|
@ -1,21 +1,26 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process SUBREAD_FEATURECOUNTS {
|
||||
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) }
|
||||
|
||||
// Note: 2.7X indices incompatible with AWS iGenomes.
|
||||
conda (params.enable_conda ? "bioconda::subread=2.0.1" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/subread:2.0.1--hed695b0_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/subread:2.0.1--hed695b0_0"
|
||||
//container "https://depot.galaxyproject.org/singularity/subread:2.0.1--hed695b0_0"
|
||||
|
||||
conda (params.conda ? "bioconda::subread=2.0.1" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bams), path(annotation)
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*featureCounts.txt") , emit: counts
|
||||
|
@ -24,8 +29,7 @@ process SUBREAD_FEATURECOUNTS {
|
|||
|
||||
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 paired_end = meta.single_end ? '' : '-p'
|
||||
|
||||
def strandedness = 0
|
||||
|
@ -36,7 +40,7 @@ process SUBREAD_FEATURECOUNTS {
|
|||
}
|
||||
"""
|
||||
featureCounts \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
$paired_end \\
|
||||
-T $task.cpus \\
|
||||
-a $annotation \\
|
||||
|
|
|
@ -1,21 +1,25 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process TRIMGALORE {
|
||||
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) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::trim-galore=0.6.6" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/trim-galore:0.6.6--0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/trim-galore:0.6.6--0"
|
||||
//container "https://depot.galaxyproject.org/singularity/trim-galore:0.6.6--0"
|
||||
|
||||
conda (params.conda ? "bioconda::trim-galore=0.6.6" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(reads)
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.fq.gz") , emit: reads
|
||||
|
@ -45,13 +49,12 @@ process TRIMGALORE {
|
|||
|
||||
// Added soft-links to original fastqs for consistent naming in MultiQC
|
||||
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}"
|
||||
if (meta.single_end) {
|
||||
"""
|
||||
[ ! -f ${prefix}.fastq.gz ] && ln -s $reads ${prefix}.fastq.gz
|
||||
trim_galore \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
--cores $cores \\
|
||||
--gzip \\
|
||||
$c_r1 \\
|
||||
|
@ -64,7 +67,7 @@ process TRIMGALORE {
|
|||
[ ! -f ${prefix}_1.fastq.gz ] && ln -s ${reads[0]} ${prefix}_1.fastq.gz
|
||||
[ ! -f ${prefix}_2.fastq.gz ] && ln -s ${reads[1]} ${prefix}_2.fastq.gz
|
||||
trim_galore \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
--cores $cores \\
|
||||
--paired \\
|
||||
--gzip \\
|
||||
|
|
|
@ -1,21 +1,25 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process UMITOOLS_DEDUP {
|
||||
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) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::umi_tools=1.0.1" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/umi_tools:1.0.1--py37h516909a_1"
|
||||
} else {
|
||||
container "quay.io/biocontainers/umi_tools:1.0.1--py37h516909a_1"
|
||||
//container "https://depot.galaxyproject.org/singularity/umi_tools:1.0.1--py37h516909a_1"
|
||||
|
||||
conda (params.conda ? "bioconda::umi_tools=1.0.1" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam), path(bai)
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.bam"), emit: bam
|
||||
|
@ -24,14 +28,13 @@ process UMITOOLS_DEDUP {
|
|||
|
||||
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}"
|
||||
"""
|
||||
umi_tools dedup \\
|
||||
-I $bam \\
|
||||
-S ${prefix}.bam \\
|
||||
--output-stats=$prefix \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
|
||||
umi_tools --version | sed -e "s/UMI-tools version: //g" > ${software}.version.txt
|
||||
"""
|
||||
|
|
|
@ -1,21 +1,25 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
def options = initOptions(params.options)
|
||||
|
||||
process UMITOOLS_EXTRACT {
|
||||
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) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::umi_tools=1.0.1" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/umi_tools:1.0.1--py37h516909a_1"
|
||||
} else {
|
||||
container "quay.io/biocontainers/umi_tools:1.0.1--py37h516909a_1"
|
||||
//container "https://depot.galaxyproject.org/singularity/umi_tools:1.0.1--py37h516909a_1"
|
||||
|
||||
conda (params.conda ? "bioconda::umi_tools=1.0.1" : null)
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(reads)
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.fastq.gz"), emit: reads
|
||||
|
@ -24,15 +28,14 @@ process UMITOOLS_EXTRACT {
|
|||
|
||||
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}"
|
||||
if (meta.single_end) {
|
||||
"""
|
||||
umi_tools \\
|
||||
extract \\
|
||||
-I $reads \\
|
||||
-S ${prefix}.umi_extract.fastq.gz \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
> ${prefix}.umi_extract.log
|
||||
|
||||
umi_tools --version | sed -e "s/UMI-tools version: //g" > ${software}.version.txt
|
||||
|
@ -45,7 +48,7 @@ process UMITOOLS_EXTRACT {
|
|||
--read2-in=${reads[1]} \\
|
||||
-S ${prefix}.umi_extract_1.fastq.gz \\
|
||||
--read2-out=${prefix}.umi_extract_2.fastq.gz \\
|
||||
$ioptions.args \\
|
||||
$options.args \\
|
||||
> ${prefix}.umi_extract.log
|
||||
|
||||
umi_tools --version | sed -e "s/UMI-tools version: //g" > ${software}.version.txt
|
||||
|
|
Loading…
Reference in a new issue