mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-23 19:48:16 +00:00
Merge remote-tracking branch 'nf-core/master'
This commit is contained in:
commit
e687c4b97f
67 changed files with 2404 additions and 126 deletions
|
@ -19,8 +19,9 @@ process ALLELECOUNTER {
|
|||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam), path(bai)
|
||||
tuple val(meta), path(input), path(input_index)
|
||||
path loci
|
||||
path fasta
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.alleleCount"), emit: allelecount
|
||||
|
@ -28,11 +29,14 @@ process ALLELECOUNTER {
|
|||
|
||||
script:
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def reference_options = fasta ? "-r $fasta": ""
|
||||
|
||||
"""
|
||||
alleleCounter \\
|
||||
$options.args \\
|
||||
-l $loci \\
|
||||
-b $bam \\
|
||||
-b $input \\
|
||||
$reference_options \\
|
||||
-o ${prefix}.alleleCount
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
|
|
|
@ -19,11 +19,11 @@ input:
|
|||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- bam:
|
||||
- input:
|
||||
type: file
|
||||
description: BAM/CRAM/SAM file
|
||||
pattern: "*.{bam,cram,sam}"
|
||||
- bai:
|
||||
- input_index:
|
||||
type: file
|
||||
description: BAM/CRAM/SAM index file
|
||||
pattern: "*.{bai,crai,sai}"
|
||||
|
@ -31,7 +31,9 @@ input:
|
|||
type: file
|
||||
description: loci file <CHR><tab><POS1>
|
||||
pattern: "*.{tsv}"
|
||||
|
||||
- fasta:
|
||||
type: file
|
||||
description: Input genome fasta file. Required when passing CRAM files.
|
||||
|
||||
output:
|
||||
- meta:
|
||||
|
@ -50,3 +52,4 @@ output:
|
|||
|
||||
authors:
|
||||
- "@fullama"
|
||||
- "@fbdtemme"
|
||||
|
|
|
@ -19,24 +19,26 @@ process FREEBAYES {
|
|||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam), path(bai)
|
||||
tuple path(fasta), path(fai)
|
||||
path(targets)
|
||||
path(samples)
|
||||
path(populations)
|
||||
path(cnv)
|
||||
|
||||
tuple val(meta), path(input_1), path(input_1_index), path(input_2), path(input_2_index)
|
||||
path fasta
|
||||
path fai
|
||||
path targets
|
||||
path samples
|
||||
path populations
|
||||
path cnv
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.vcf.gz") , emit: vcf
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def targets_file = targets ? "--target ${targets}" : ""
|
||||
def samples_file = samples ? "--samples ${samples}" : ""
|
||||
def populations_file = populations ? "--populations ${populations}" : ""
|
||||
def cnv_file = cnv ? "--cnv-map ${cnv}" : ""
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def input = input_2 ? "${input_1} ${input_2}" : "${input_1}"
|
||||
def targets_file = targets ? "--target ${targets}" : ""
|
||||
def samples_file = samples ? "--samples ${samples}" : ""
|
||||
def populations_file = populations ? "--populations ${populations}" : ""
|
||||
def cnv_file = cnv ? "--cnv-map ${cnv}" : ""
|
||||
|
||||
if (task.cpus > 1) {
|
||||
"""
|
||||
freebayes-parallel \\
|
||||
|
@ -47,7 +49,7 @@ process FREEBAYES {
|
|||
$populations_file \\
|
||||
$cnv_file \\
|
||||
$options.args \\
|
||||
$bam > ${prefix}.vcf
|
||||
$input > ${prefix}.vcf
|
||||
|
||||
gzip --no-name ${prefix}.vcf
|
||||
|
||||
|
@ -66,7 +68,7 @@ process FREEBAYES {
|
|||
$populations_file \\
|
||||
$cnv_file \\
|
||||
$options.args \\
|
||||
$bam > ${prefix}.vcf
|
||||
$input > ${prefix}.vcf
|
||||
|
||||
gzip --no-name ${prefix}.vcf
|
||||
|
||||
|
|
|
@ -4,15 +4,18 @@ keywords:
|
|||
- variant caller
|
||||
- SNP
|
||||
- genotyping
|
||||
- variant calling
|
||||
- somatic variant calling
|
||||
- germline variant calling
|
||||
- bacterial variant calling
|
||||
- bayesian
|
||||
|
||||
tools:
|
||||
- freebayes:
|
||||
description: Bayesian haplotype-based polymorphism discovery and genotyping
|
||||
homepage: https://github.com/freebayes/freebayes
|
||||
documentation: https://github.com/freebayes/freebayes
|
||||
tool_dev_url: https://github.com/freebayes/freebayes
|
||||
doi: ""
|
||||
doi: "arXiv:1207.3907"
|
||||
licence: ['MIT']
|
||||
|
||||
input:
|
||||
|
@ -21,11 +24,11 @@ input:
|
|||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- bam:
|
||||
- input:
|
||||
type: file
|
||||
description: BAM/CRAM/SAM file
|
||||
pattern: "*.{bam,cram,sam}"
|
||||
- bai:
|
||||
- input_index:
|
||||
type: file
|
||||
description: BAM/CRAM/SAM index file
|
||||
pattern: "*.bam.bai"
|
||||
|
@ -59,7 +62,6 @@ input:
|
|||
seq_name start end sample_name copy_number
|
||||
pattern: "*.bed"
|
||||
|
||||
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
|
@ -74,5 +76,8 @@ output:
|
|||
type: file
|
||||
description: Compressed VCF file
|
||||
pattern: "*.vcf.gz"
|
||||
|
||||
authors:
|
||||
- "@maxibor"
|
||||
- "@FriederikeHanssen"
|
||||
- "@maxulysse"
|
||||
|
|
|
@ -61,3 +61,4 @@ output:
|
|||
|
||||
authors:
|
||||
- "@yocra3"
|
||||
- "@FriederikeHanssen"
|
||||
|
|
78
modules/gatk4/genomicsdbimport/functions.nf
Normal file
78
modules/gatk4/genomicsdbimport/functions.nf
Normal file
|
@ -0,0 +1,78 @@
|
|||
//
|
||||
// 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()
|
||||
}
|
||||
|
||||
//
|
||||
// Extract name of module from process name using $task.process
|
||||
//
|
||||
def getProcessName(task_process) {
|
||||
return task_process.tokenize(':')[-1]
|
||||
}
|
||||
|
||||
//
|
||||
// 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.args3 = args.args3 ?: ''
|
||||
options.publish_by_meta = args.publish_by_meta ?: []
|
||||
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) {
|
||||
def ioptions = initOptions(args.options)
|
||||
def path_list = [ ioptions.publish_dir ?: args.publish_dir ]
|
||||
|
||||
// Do not publish versions.yml unless running from pytest workflow
|
||||
if (args.filename.equals('versions.yml') && !System.getenv("NF_CORE_MODULES_TEST")) {
|
||||
return null
|
||||
}
|
||||
if (ioptions.publish_by_meta) {
|
||||
def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta
|
||||
for (key in key_list) {
|
||||
if (args.meta && key instanceof String) {
|
||||
def path = key
|
||||
if (args.meta.containsKey(key)) {
|
||||
path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key]
|
||||
}
|
||||
path = path instanceof String ? path : ''
|
||||
path_list.add(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
67
modules/gatk4/genomicsdbimport/main.nf
Normal file
67
modules/gatk4/genomicsdbimport/main.nf
Normal file
|
@ -0,0 +1,67 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
options = initOptions(params.options)
|
||||
|
||||
process GATK4_GENOMICSDBIMPORT {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
publishDir "${params.outdir}",
|
||||
mode: params.publish_dir_mode,
|
||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.0.0" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/gatk4:4.2.0.0--0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/gatk4:4.2.0.0--0"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf), path(tbi), path(intervalfile), val(intervalval), path(wspace)
|
||||
val run_intlist
|
||||
val run_updatewspace
|
||||
val input_map
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*_genomicsdb") , optional:true, emit: genomicsdb
|
||||
tuple val(meta), path("$updated_db") , optional:true, emit: updatedb
|
||||
tuple val(meta), path("*.interval_list"), optional:true, emit: intervallist
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
|
||||
// settings for running default create gendb mode
|
||||
def inputs_command = input_map ? "--sample-name-map ${vcf[0]}" : "${'-V ' + vcf.join(' -V')}"
|
||||
def dir_command = "--genomicsdb-workspace-path ${prefix}"
|
||||
def intervals_command = intervalfile ? " -L ${intervalfile} " : " -L ${intervalval} "
|
||||
|
||||
// settings changed for running get intervals list mode if run_intlist is true
|
||||
if (run_intlist) {
|
||||
inputs_command = ''
|
||||
dir_command = "--genomicsdb-update-workspace-path ${wspace}"
|
||||
intervals_command = "--output-interval-list-to-file ${prefix}.interval_list"
|
||||
}
|
||||
|
||||
// settings changed for running update gendb mode. inputs_command same as default, update_db forces module to emit the updated gendb
|
||||
if (run_updatewspace) {
|
||||
dir_command = "--genomicsdb-update-workspace-path ${wspace}"
|
||||
intervals_command = ''
|
||||
updated_db = wspace.toString()
|
||||
}
|
||||
|
||||
"""
|
||||
gatk GenomicsDBImport \\
|
||||
$inputs_command \\
|
||||
$dir_command \\
|
||||
$intervals_command \\
|
||||
$options.args
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
${getProcessName(task.process)}:
|
||||
${getSoftwareName(task.process)}: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
80
modules/gatk4/genomicsdbimport/meta.yml
Normal file
80
modules/gatk4/genomicsdbimport/meta.yml
Normal file
|
@ -0,0 +1,80 @@
|
|||
name: gatk4_genomicsdbimport
|
||||
description: merge GVCFs from multiple samples. For use in joint genotyping or somatic panel of normal creation.
|
||||
keywords:
|
||||
- gatk4
|
||||
- genomicsdbimport
|
||||
- genomicsdb
|
||||
- panelofnormalscreation
|
||||
- jointgenotyping
|
||||
tools:
|
||||
- gatk4:
|
||||
description: |
|
||||
Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools
|
||||
with a primary focus on variant discovery and genotyping. Its powerful processing engine
|
||||
and high-performance computing features make it capable of taking on projects of any size.
|
||||
homepage: https://gatk.broadinstitute.org/hc/en-us
|
||||
documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s
|
||||
doi: 10.1158/1538-7445.AM2017-3590
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test']
|
||||
- vcf:
|
||||
type: list
|
||||
description: either a list of vcf files to be used to create or update a genomicsdb, or a file that contains a map to vcf files to be used.
|
||||
pattern: "*.vcf.gz"
|
||||
|
||||
- tbi:
|
||||
type: list
|
||||
description: list of tbi files that match with the input vcf files
|
||||
pattern: "*.vcf.gz_tbi"
|
||||
|
||||
- wspace:
|
||||
type: path
|
||||
description: path to an existing genomicsdb to be used in update db mode or get intervals mode. This WILL NOT specify name of a new genomicsdb in create db mode.
|
||||
pattern: "/path/to/existing/gendb"
|
||||
|
||||
- intervalfile:
|
||||
type: file
|
||||
description: file containing the intervals to be used when creating the genomicsdb
|
||||
pattern: "*.interval_list"
|
||||
|
||||
- intervalval:
|
||||
type: string
|
||||
description: if an intervals file has not been spcified, the value enetered here will be used as an interval via the "-L" argument
|
||||
pattern: "example: chr1:1000-10000"
|
||||
|
||||
- run_intlist:
|
||||
type: boolean
|
||||
description: Specify whether to run get interval list mode, this option cannot be specified at the same time as run_updatewspace.
|
||||
pattern: "true/false"
|
||||
|
||||
- run_updatewspace:
|
||||
type: boolean
|
||||
description: Specify whether to run update genomicsdb mode, this option takes priority over run_intlist.
|
||||
pattern: "true/false"
|
||||
|
||||
- input_map:
|
||||
type: boolean
|
||||
description: Specify whether the vcf input is providing a list of vcf file(s) or a single file containing a map of paths to vcf files to be used to create or update a genomicsdb.
|
||||
pattern: "*.sample_map"
|
||||
|
||||
output:
|
||||
- genomicsdb:
|
||||
type: directory
|
||||
description: Directory containing the files that compose the genomicsdb workspace, this is only output for create mode, as update changes an existing db
|
||||
pattern: "*_genomicsdb"
|
||||
- intervallist:
|
||||
type: file
|
||||
description: File containing the intervals used to generate the genomicsdb, only created by get intervals mode.
|
||||
pattern: "*.interval_list"
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
|
||||
authors:
|
||||
- "@GCJMackenzie"
|
|
@ -22,6 +22,10 @@ process GENRICH {
|
|||
tuple val(meta), path(treatment_bam)
|
||||
path control_bam
|
||||
path blacklist_bed
|
||||
val save_pvalues
|
||||
val save_pileup
|
||||
val save_bed
|
||||
val save_duplicates
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*narrowPeak") , emit: peaks
|
||||
|
@ -32,14 +36,14 @@ process GENRICH {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def control = params.control_bam ? "-c $control_bam" : ''
|
||||
def pvalues = params.pvalues ? "-f ${prefix}.pvalues.bedGraph" : ""
|
||||
def pileup = params.pileup ? "-k ${prefix}.pileup.bedGraph" : ""
|
||||
def bed = params.bed ? "-b ${prefix}.intervals.bed" : ""
|
||||
def blacklist = params.blacklist_bed ? "-E $blacklist_bed" : ""
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def control = control_bam ? "-c $control_bam" : ''
|
||||
def blacklist = blacklist_bed ? "-E $blacklist_bed" : ""
|
||||
def pvalues = save_pvalues ? "-f ${prefix}.pvalues.bedGraph" : ""
|
||||
def pileup = save_pileup ? "-k ${prefix}.pileup.bedGraph" : ""
|
||||
def bed = save_bed ? "-b ${prefix}.intervals.bed" : ""
|
||||
def duplicates = ""
|
||||
if (params.save_duplicates) {
|
||||
if (save_duplicates) {
|
||||
if (options.args.contains('-r')) {
|
||||
duplicates = "-R ${prefix}.duplicates.txt"
|
||||
} else {
|
||||
|
@ -58,7 +62,6 @@ process GENRICH {
|
|||
$pileup \\
|
||||
$bed \\
|
||||
$duplicates \\
|
||||
$blacklist \\
|
||||
$control
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
|
|
|
@ -15,7 +15,6 @@ tools:
|
|||
tool_dev_url: https://github.com/jsh58/Genrich
|
||||
doi: ""
|
||||
licence: ['MIT']
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
|
@ -34,7 +33,18 @@ input:
|
|||
type: file
|
||||
description: Bed file containing genomic intervals to exclude from the analysis
|
||||
pattern: "*.{bed}"
|
||||
|
||||
- save_pvalues:
|
||||
type: boolean
|
||||
description: Create bedgraph-ish file for p/q-values file
|
||||
- save_pileup:
|
||||
type: boolean
|
||||
description: Create bedgraph-ish file for pileups and p-values
|
||||
- save_bed:
|
||||
type: boolean
|
||||
description: Create BED file for reads/fragments/intervals
|
||||
- save_duplicates:
|
||||
type: boolean
|
||||
description: Create PCR duplicates file (only works if -r option is set)
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
|
@ -65,7 +75,6 @@ output:
|
|||
type: file
|
||||
description: File containing software version
|
||||
pattern: "*.{version.txt}"
|
||||
|
||||
authors:
|
||||
- "@JoseEspinosa"
|
||||
|
||||
|
|
78
modules/gunc/downloaddb/functions.nf
Normal file
78
modules/gunc/downloaddb/functions.nf
Normal file
|
@ -0,0 +1,78 @@
|
|||
//
|
||||
// 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()
|
||||
}
|
||||
|
||||
//
|
||||
// Extract name of module from process name using $task.process
|
||||
//
|
||||
def getProcessName(task_process) {
|
||||
return task_process.tokenize(':')[-1]
|
||||
}
|
||||
|
||||
//
|
||||
// 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.args3 = args.args3 ?: ''
|
||||
options.publish_by_meta = args.publish_by_meta ?: []
|
||||
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) {
|
||||
def ioptions = initOptions(args.options)
|
||||
def path_list = [ ioptions.publish_dir ?: args.publish_dir ]
|
||||
|
||||
// Do not publish versions.yml unless running from pytest workflow
|
||||
if (args.filename.equals('versions.yml') && !System.getenv("NF_CORE_MODULES_TEST")) {
|
||||
return null
|
||||
}
|
||||
if (ioptions.publish_by_meta) {
|
||||
def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta
|
||||
for (key in key_list) {
|
||||
if (args.meta && key instanceof String) {
|
||||
def path = key
|
||||
if (args.meta.containsKey(key)) {
|
||||
path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key]
|
||||
}
|
||||
path = path instanceof String ? path : ''
|
||||
path_list.add(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
37
modules/gunc/downloaddb/main.nf
Normal file
37
modules/gunc/downloaddb/main.nf
Normal file
|
@ -0,0 +1,37 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
options = initOptions(params.options)
|
||||
|
||||
process GUNC_DOWNLOADDB {
|
||||
tag '$db_name'
|
||||
label 'process_low'
|
||||
publishDir "${params.outdir}",
|
||||
mode: params.publish_dir_mode,
|
||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gunc=1.0.5" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/gunc:1.0.5--pyhdfd78af_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/gunc:1.0.5--pyhdfd78af_0"
|
||||
}
|
||||
|
||||
input:
|
||||
val db_name
|
||||
|
||||
output:
|
||||
path "*.dmnd" , emit: db
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
"""
|
||||
gunc download_db . -db $db_name $options.args
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
${getProcessName(task.process)}:
|
||||
${getSoftwareName(task.process)}: \$( gunc --version )
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
36
modules/gunc/downloaddb/meta.yml
Normal file
36
modules/gunc/downloaddb/meta.yml
Normal file
|
@ -0,0 +1,36 @@
|
|||
name: gunc_downloaddb
|
||||
description: Download database for GUNC detection of Chimerism and Contamination in Prokaryotic Genomes
|
||||
keywords:
|
||||
- download
|
||||
- prokaryote
|
||||
- assembly
|
||||
- genome
|
||||
- quality control
|
||||
- chimeras
|
||||
tools:
|
||||
- gunc:
|
||||
description: Python package for detection of chimerism and contamination in prokaryotic genomes.
|
||||
homepage: https://grp-bork.embl-community.io/gunc/
|
||||
documentation: https://grp-bork.embl-community.io/gunc/
|
||||
tool_dev_url: https://github.com/grp-bork/gunc
|
||||
doi: "10.1186/s13059-021-02393-0"
|
||||
licence: ['GNU General Public v3 or later (GPL v3+)']
|
||||
|
||||
input:
|
||||
- db_name:
|
||||
type: string
|
||||
description: "Which database to download. Options: progenomes or gtdb"
|
||||
pattern: "progenomes|gtdb"
|
||||
|
||||
output:
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- db:
|
||||
type: file
|
||||
description: GUNC database file
|
||||
pattern: "*.dmnd"
|
||||
|
||||
authors:
|
||||
- "@jfy133"
|
78
modules/gunc/run/functions.nf
Normal file
78
modules/gunc/run/functions.nf
Normal file
|
@ -0,0 +1,78 @@
|
|||
//
|
||||
// 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()
|
||||
}
|
||||
|
||||
//
|
||||
// Extract name of module from process name using $task.process
|
||||
//
|
||||
def getProcessName(task_process) {
|
||||
return task_process.tokenize(':')[-1]
|
||||
}
|
||||
|
||||
//
|
||||
// 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.args3 = args.args3 ?: ''
|
||||
options.publish_by_meta = args.publish_by_meta ?: []
|
||||
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) {
|
||||
def ioptions = initOptions(args.options)
|
||||
def path_list = [ ioptions.publish_dir ?: args.publish_dir ]
|
||||
|
||||
// Do not publish versions.yml unless running from pytest workflow
|
||||
if (args.filename.equals('versions.yml') && !System.getenv("NF_CORE_MODULES_TEST")) {
|
||||
return null
|
||||
}
|
||||
if (ioptions.publish_by_meta) {
|
||||
def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta
|
||||
for (key in key_list) {
|
||||
if (args.meta && key instanceof String) {
|
||||
def path = key
|
||||
if (args.meta.containsKey(key)) {
|
||||
path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key]
|
||||
}
|
||||
path = path instanceof String ? path : ''
|
||||
path_list.add(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
45
modules/gunc/run/main.nf
Normal file
45
modules/gunc/run/main.nf
Normal file
|
@ -0,0 +1,45 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
options = initOptions(params.options)
|
||||
|
||||
process GUNC_RUN {
|
||||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
publishDir "${params.outdir}",
|
||||
mode: params.publish_dir_mode,
|
||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gunc=1.0.5" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/gunc:1.0.5--pyhdfd78af_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/gunc:1.0.5--pyhdfd78af_0"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(fasta)
|
||||
path(db)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*maxCSS_level.tsv") , emit: maxcss_level_tsv
|
||||
tuple val(meta), path("*all_levels.tsv") , optional: true, emit: all_levels_tsv
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
"""
|
||||
gunc \\
|
||||
run \\
|
||||
--input_fasta $fasta \\
|
||||
--db_file $db \\
|
||||
--threads $task.cpus \\
|
||||
$options.args
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
${getProcessName(task.process)}:
|
||||
${getSoftwareName(task.process)}: \$( gunc --version )
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
53
modules/gunc/run/meta.yml
Normal file
53
modules/gunc/run/meta.yml
Normal file
|
@ -0,0 +1,53 @@
|
|||
name: gunc_run
|
||||
description: Detection of Chimerism and Contamination in Prokaryotic Genomes
|
||||
keywords:
|
||||
- prokaryote
|
||||
- assembly
|
||||
- genome
|
||||
- quality control
|
||||
- chimeras
|
||||
tools:
|
||||
- gunc:
|
||||
description: Python package for detection of chimerism and contamination in prokaryotic genomes.
|
||||
homepage: https://grp-bork.embl-community.io/gunc/
|
||||
documentation: https://grp-bork.embl-community.io/gunc/
|
||||
tool_dev_url: https://github.com/grp-bork/gunc
|
||||
doi: "10.1186/s13059-021-02393-0"
|
||||
licence: ['GNU General Public v3 or later (GPL v3+)']
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- fasta:
|
||||
type: file
|
||||
description: FASTA file containing contig (bins)
|
||||
pattern: "*.fa"
|
||||
- db:
|
||||
type: file
|
||||
description: GUNC database file
|
||||
pattern: "*.dmnd"
|
||||
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- maxcss_levels_tsv:
|
||||
type: file
|
||||
description: Output file with scores for a taxonomic level with the highest CSS score
|
||||
pattern: "*.tsv"
|
||||
- all_levels_tsv:
|
||||
type: file
|
||||
description: Optional output file with results for each taxonomic level
|
||||
pattern: "*.tsv"
|
||||
|
||||
authors:
|
||||
- "@jfy133"
|
78
modules/hmmcopy/gccounter/functions.nf
Normal file
78
modules/hmmcopy/gccounter/functions.nf
Normal file
|
@ -0,0 +1,78 @@
|
|||
//
|
||||
// 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()
|
||||
}
|
||||
|
||||
//
|
||||
// Extract name of module from process name using $task.process
|
||||
//
|
||||
def getProcessName(task_process) {
|
||||
return task_process.tokenize(':')[-1]
|
||||
}
|
||||
|
||||
//
|
||||
// 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.args3 = args.args3 ?: ''
|
||||
options.publish_by_meta = args.publish_by_meta ?: []
|
||||
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) {
|
||||
def ioptions = initOptions(args.options)
|
||||
def path_list = [ ioptions.publish_dir ?: args.publish_dir ]
|
||||
|
||||
// Do not publish versions.yml unless running from pytest workflow
|
||||
if (args.filename.equals('versions.yml') && !System.getenv("NF_CORE_MODULES_TEST")) {
|
||||
return null
|
||||
}
|
||||
if (ioptions.publish_by_meta) {
|
||||
def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta
|
||||
for (key in key_list) {
|
||||
if (args.meta && key instanceof String) {
|
||||
def path = key
|
||||
if (args.meta.containsKey(key)) {
|
||||
path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key]
|
||||
}
|
||||
path = path instanceof String ? path : ''
|
||||
path_list.add(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
40
modules/hmmcopy/gccounter/main.nf
Normal file
40
modules/hmmcopy/gccounter/main.nf
Normal file
|
@ -0,0 +1,40 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
options = initOptions(params.options)
|
||||
|
||||
def VERSION = '0.1.1'
|
||||
|
||||
process HMMCOPY_GCCOUNTER {
|
||||
label 'process_low'
|
||||
publishDir "${params.outdir}",
|
||||
mode: params.publish_dir_mode,
|
||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::hmmcopy=0.1.1" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/hmmcopy:0.1.1--h2e03b76_5"
|
||||
} else {
|
||||
container "quay.io/biocontainers/hmmcopy:0.1.1--h2e03b76_5"
|
||||
}
|
||||
|
||||
input:
|
||||
path fasta
|
||||
|
||||
output:
|
||||
path "*.gc.wig" , emit: wig
|
||||
path "versions.yml", emit: versions
|
||||
|
||||
script:
|
||||
"""
|
||||
gcCounter \\
|
||||
$options.args \\
|
||||
${fasta} > ${fasta.baseName}.gc.wig
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
${getProcessName(task.process)}:
|
||||
${getSoftwareName(task.process)}: \$(echo $VERSION)
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
33
modules/hmmcopy/gccounter/meta.yml
Normal file
33
modules/hmmcopy/gccounter/meta.yml
Normal file
|
@ -0,0 +1,33 @@
|
|||
name: hmmcopy_gccounter
|
||||
description: gcCounter function from HMMcopy utilities, used to generate GC content in non-overlapping windows from a fasta reference
|
||||
keywords:
|
||||
- hmmcopy
|
||||
- gccounter
|
||||
- cnv
|
||||
tools:
|
||||
- hmmcopy:
|
||||
description: C++ based programs for analyzing BAM files and preparing read counts -- used with bioconductor-hmmcopy
|
||||
homepage: https://github.com/shahcompbio/hmmcopy_utils
|
||||
documentation: https://github.com/shahcompbio/hmmcopy_utils
|
||||
tool_dev_url: https://github.com/shahcompbio/hmmcopy_utils
|
||||
doi: ""
|
||||
licence: ['GPL v3']
|
||||
|
||||
input:
|
||||
- fasta:
|
||||
type: file
|
||||
description: Input genome fasta file
|
||||
|
||||
|
||||
output:
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- wig:
|
||||
type: file
|
||||
description: wig file containing gc content of each window of the genome
|
||||
pattern: "*.{gc.wig}"
|
||||
|
||||
authors:
|
||||
- "@sppearce"
|
78
modules/hmmcopy/readcounter/functions.nf
Normal file
78
modules/hmmcopy/readcounter/functions.nf
Normal file
|
@ -0,0 +1,78 @@
|
|||
//
|
||||
// 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()
|
||||
}
|
||||
|
||||
//
|
||||
// Extract name of module from process name using $task.process
|
||||
//
|
||||
def getProcessName(task_process) {
|
||||
return task_process.tokenize(':')[-1]
|
||||
}
|
||||
|
||||
//
|
||||
// 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.args3 = args.args3 ?: ''
|
||||
options.publish_by_meta = args.publish_by_meta ?: []
|
||||
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) {
|
||||
def ioptions = initOptions(args.options)
|
||||
def path_list = [ ioptions.publish_dir ?: args.publish_dir ]
|
||||
|
||||
// Do not publish versions.yml unless running from pytest workflow
|
||||
if (args.filename.equals('versions.yml') && !System.getenv("NF_CORE_MODULES_TEST")) {
|
||||
return null
|
||||
}
|
||||
if (ioptions.publish_by_meta) {
|
||||
def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta
|
||||
for (key in key_list) {
|
||||
if (args.meta && key instanceof String) {
|
||||
def path = key
|
||||
if (args.meta.containsKey(key)) {
|
||||
path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key]
|
||||
}
|
||||
path = path instanceof String ? path : ''
|
||||
path_list.add(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
42
modules/hmmcopy/readcounter/main.nf
Normal file
42
modules/hmmcopy/readcounter/main.nf
Normal file
|
@ -0,0 +1,42 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
options = initOptions(params.options)
|
||||
|
||||
def VERSION = '0.1.1'
|
||||
|
||||
process HMMCOPY_READCOUNTER {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
publishDir "${params.outdir}",
|
||||
mode: params.publish_dir_mode,
|
||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::hmmcopy=0.1.1" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/hmmcopy:0.1.1--h2e03b76_5"
|
||||
} else {
|
||||
container "quay.io/biocontainers/hmmcopy:0.1.1--h2e03b76_5"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam), path(bai)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.wig"), emit: wig
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
"""
|
||||
readCounter \\
|
||||
$options.args \\
|
||||
${bam} > ${prefix}.wig
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
${getProcessName(task.process)}:
|
||||
${getSoftwareName(task.process)}: \$(echo $VERSION)
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
43
modules/hmmcopy/readcounter/meta.yml
Normal file
43
modules/hmmcopy/readcounter/meta.yml
Normal file
|
@ -0,0 +1,43 @@
|
|||
name: hmmcopy_readcounter
|
||||
description: readCounter function from HMMcopy utilities, used to generate read in windows
|
||||
keywords:
|
||||
- hmmcopy
|
||||
- readcounter
|
||||
- cnv
|
||||
tools:
|
||||
- hmmcopy:
|
||||
description: C++ based programs for analyzing BAM files and preparing read counts -- used with bioconductor-hmmcopy
|
||||
homepage: https://github.com/shahcompbio/hmmcopy_utils
|
||||
documentation: https://github.com/shahcompbio/hmmcopy_utils
|
||||
tool_dev_url: https://github.com/shahcompbio/hmmcopy_utils
|
||||
doi: ""
|
||||
licence: ['GPL v3']
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- bam:
|
||||
type: file
|
||||
description: BAM/CRAM/SAM file
|
||||
pattern: "*.{bam,cram,sam}"
|
||||
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- wig:
|
||||
type: file
|
||||
description: A wig file with the number of reads lying within each window in each chromosome
|
||||
pattern: "*.wig"
|
||||
|
||||
authors:
|
||||
- "@sppearce"
|
78
modules/idr/functions.nf
Normal file
78
modules/idr/functions.nf
Normal file
|
@ -0,0 +1,78 @@
|
|||
//
|
||||
// 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()
|
||||
}
|
||||
|
||||
//
|
||||
// Extract name of module from process name using $task.process
|
||||
//
|
||||
def getProcessName(task_process) {
|
||||
return task_process.tokenize(':')[-1]
|
||||
}
|
||||
|
||||
//
|
||||
// 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.args3 = args.args3 ?: ''
|
||||
options.publish_by_meta = args.publish_by_meta ?: []
|
||||
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) {
|
||||
def ioptions = initOptions(args.options)
|
||||
def path_list = [ ioptions.publish_dir ?: args.publish_dir ]
|
||||
|
||||
// Do not publish versions.yml unless running from pytest workflow
|
||||
if (args.filename.equals('versions.yml') && !System.getenv("NF_CORE_MODULES_TEST")) {
|
||||
return null
|
||||
}
|
||||
if (ioptions.publish_by_meta) {
|
||||
def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta
|
||||
for (key in key_list) {
|
||||
if (args.meta && key instanceof String) {
|
||||
def path = key
|
||||
if (args.meta.containsKey(key)) {
|
||||
path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key]
|
||||
}
|
||||
path = path instanceof String ? path : ''
|
||||
path_list.add(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
56
modules/idr/main.nf
Normal file
56
modules/idr/main.nf
Normal file
|
@ -0,0 +1,56 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
options = initOptions(params.options)
|
||||
|
||||
process IDR {
|
||||
tag "$prefix"
|
||||
label 'process_low'
|
||||
publishDir "${params.outdir}",
|
||||
mode: params.publish_dir_mode,
|
||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::idr=2.0.4.2" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/idr:2.0.4.2--py39hcbe4a3b_5"
|
||||
} else {
|
||||
container "quay.io/biocontainers/idr:2.0.4.2--py38h9af456f_5"
|
||||
}
|
||||
|
||||
input:
|
||||
path peaks
|
||||
val peak_type
|
||||
val prefix
|
||||
|
||||
output:
|
||||
path "*idrValues.txt", emit: idr
|
||||
path "*log.txt" , emit: log
|
||||
path "*.png" , emit: png
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
if (peaks.toList().size < 2) {
|
||||
log.error "[ERROR] idr needs at least two replicates only one provided."
|
||||
}
|
||||
def peak_types = ['narrowPeak', 'broadPeak', 'bed']
|
||||
if (!peak_types.contains(peak_type)) {
|
||||
log.error "[ERROR] Invalid option: '${peak_type}'. Valid options for 'peak_type': ${peak_types.join(', ')}."
|
||||
}
|
||||
def idr_vals = prefix ? "${prefix}.idrValues.txt" : "idrValues.txt"
|
||||
def log_file = prefix ? "${prefix}.log.txt" : "log.txt"
|
||||
"""
|
||||
idr \\
|
||||
--samples $peaks \\
|
||||
--input-file-type $peak_type \\
|
||||
--output-file $idr_vals \\
|
||||
--log-output-file $log_file \\
|
||||
--plot \\
|
||||
$options.args
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
${getProcessName(task.process)}:
|
||||
${getSoftwareName(task.process)}: \$(echo \$(idr --version 2>&1) | sed 's/^.*IDR //; s/ .*\$//')
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
53
modules/idr/meta.yml
Normal file
53
modules/idr/meta.yml
Normal file
|
@ -0,0 +1,53 @@
|
|||
name: idr
|
||||
description: |
|
||||
Measures reproducibility of ChIP-seq, ATAC-seq peaks using IDR (Irreproducible
|
||||
Discovery Rate)
|
||||
keywords:
|
||||
- IDR
|
||||
- peaks
|
||||
- ChIP-seq
|
||||
- ATAC-seq
|
||||
tools:
|
||||
- idr:
|
||||
description: |
|
||||
The IDR (Irreproducible Discovery Rate) framework is a unified approach
|
||||
to measure the reproducibility of findings identified from replicate
|
||||
experiments and provide highly stable thresholds based on reproducibility.
|
||||
homepage: None
|
||||
documentation: None
|
||||
tool_dev_url: https://github.com/kundajelab/idr
|
||||
doi: ""
|
||||
licence: ['GPL v2']
|
||||
input:
|
||||
- peaks:
|
||||
type: tuple of two files
|
||||
description: BED, narrowPeak or broadPeak files of replicates
|
||||
pattern: "*"
|
||||
- peak_type:
|
||||
type: value
|
||||
description: Type of peak file
|
||||
pattern: "{narrowPeak,broadPeak,bed}"
|
||||
- prefix:
|
||||
type: value
|
||||
description: Prefix for output files
|
||||
output:
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- idr:
|
||||
type: file
|
||||
description: Text file containing IDR values
|
||||
pattern: "*.{txt}"
|
||||
- log:
|
||||
type: file
|
||||
description: Log file
|
||||
pattern: "*.{txt}"
|
||||
- png:
|
||||
type: file
|
||||
description: Plot generated by idr
|
||||
pattern: "*{.png}"
|
||||
|
||||
authors:
|
||||
- "@drpatelh"
|
||||
- "@joseespinosa"
|
78
modules/mtnucratio/functions.nf
Normal file
78
modules/mtnucratio/functions.nf
Normal file
|
@ -0,0 +1,78 @@
|
|||
//
|
||||
// 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()
|
||||
}
|
||||
|
||||
//
|
||||
// Extract name of module from process name using $task.process
|
||||
//
|
||||
def getProcessName(task_process) {
|
||||
return task_process.tokenize(':')[-1]
|
||||
}
|
||||
|
||||
//
|
||||
// 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.args3 = args.args3 ?: ''
|
||||
options.publish_by_meta = args.publish_by_meta ?: []
|
||||
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) {
|
||||
def ioptions = initOptions(args.options)
|
||||
def path_list = [ ioptions.publish_dir ?: args.publish_dir ]
|
||||
|
||||
// Do not publish versions.yml unless running from pytest workflow
|
||||
if (args.filename.equals('versions.yml') && !System.getenv("NF_CORE_MODULES_TEST")) {
|
||||
return null
|
||||
}
|
||||
if (ioptions.publish_by_meta) {
|
||||
def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta
|
||||
for (key in key_list) {
|
||||
if (args.meta && key instanceof String) {
|
||||
def path = key
|
||||
if (args.meta.containsKey(key)) {
|
||||
path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key]
|
||||
}
|
||||
path = path instanceof String ? path : ''
|
||||
path_list.add(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
43
modules/mtnucratio/main.nf
Normal file
43
modules/mtnucratio/main.nf
Normal file
|
@ -0,0 +1,43 @@
|
|||
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
options = initOptions(params.options)
|
||||
|
||||
process MTNUCRATIO {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
publishDir "${params.outdir}",
|
||||
mode: params.publish_dir_mode,
|
||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::mtnucratio=0.7" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/mtnucratio:0.7--hdfd78af_2"
|
||||
} else {
|
||||
container "quay.io/biocontainers/mtnucratio:0.7--hdfd78af_2"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
val(mt_id)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.mtnucratio"), emit: mtnucratio
|
||||
tuple val(meta), path("*.json") , emit: json
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
|
||||
"""
|
||||
mtnucratio \\
|
||||
$options.args \\
|
||||
$bam \\
|
||||
$mt_id
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
${getProcessName(task.process)}:
|
||||
${getSoftwareName(task.process)}: \$(echo \$(mtnucratio --version 2>&1) | head -n1 | sed 's/Version: //')
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
54
modules/mtnucratio/meta.yml
Normal file
54
modules/mtnucratio/meta.yml
Normal file
|
@ -0,0 +1,54 @@
|
|||
name: mtnucratio
|
||||
description: A small Java tool to calculate ratios between MT and nuclear sequencing reads in a given BAM file.
|
||||
keywords:
|
||||
- mtnucratio
|
||||
- ratio
|
||||
- reads
|
||||
- bam
|
||||
- mitochondrial to nuclear ratio
|
||||
- mitochondria
|
||||
- statistics
|
||||
tools:
|
||||
- mtnucratio:
|
||||
description: A small tool to determine MT to Nuclear ratios for NGS data.
|
||||
homepage: https://github.com/apeltzer/MTNucRatioCalculator
|
||||
documentation: https://github.com/apeltzer/MTNucRatioCalculator
|
||||
tool_dev_url: https://github.com/apeltzer/MTNucRatioCalculator
|
||||
doi: "10.1186/s13059-016-0918-z"
|
||||
licence: ['GPL v3']
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- bam:
|
||||
type: file
|
||||
description: (coordinate) sorted BAM/SAM file
|
||||
pattern: "*.{bam,sam}"
|
||||
- mt_id:
|
||||
type: string
|
||||
description: Identifier of the contig/chromosome of interest (e.g. chromosome, contig) as in the aligned against reference FASTA file, e.g. mt or chrMT for mitochondria
|
||||
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- mtnucratio:
|
||||
type: file
|
||||
description: Text file containing metrics (mtreads, mt_cov_avg, nucreads, nuc_cov_avg, mt_nuc_ratio)
|
||||
pattern: "*.mtnucratio"
|
||||
- json:
|
||||
type: file
|
||||
description: JSON file, containing metadata map with sample name, tool name and version, and metrics as in txt file
|
||||
pattern: "*.json"
|
||||
|
||||
authors:
|
||||
- "@louperelo"
|
78
modules/racon/functions.nf
Normal file
78
modules/racon/functions.nf
Normal file
|
@ -0,0 +1,78 @@
|
|||
//
|
||||
// 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()
|
||||
}
|
||||
|
||||
//
|
||||
// Extract name of module from process name using $task.process
|
||||
//
|
||||
def getProcessName(task_process) {
|
||||
return task_process.tokenize(':')[-1]
|
||||
}
|
||||
|
||||
//
|
||||
// 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.args3 = args.args3 ?: ''
|
||||
options.publish_by_meta = args.publish_by_meta ?: []
|
||||
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) {
|
||||
def ioptions = initOptions(args.options)
|
||||
def path_list = [ ioptions.publish_dir ?: args.publish_dir ]
|
||||
|
||||
// Do not publish versions.yml unless running from pytest workflow
|
||||
if (args.filename.equals('versions.yml') && !System.getenv("NF_CORE_MODULES_TEST")) {
|
||||
return null
|
||||
}
|
||||
if (ioptions.publish_by_meta) {
|
||||
def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta
|
||||
for (key in key_list) {
|
||||
if (args.meta && key instanceof String) {
|
||||
def path = key
|
||||
if (args.meta.containsKey(key)) {
|
||||
path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key]
|
||||
}
|
||||
path = path instanceof String ? path : ''
|
||||
path_list.add(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
45
modules/racon/main.nf
Normal file
45
modules/racon/main.nf
Normal file
|
@ -0,0 +1,45 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
options = initOptions(params.options)
|
||||
|
||||
process RACON {
|
||||
tag "$meta.id"
|
||||
label 'process_high'
|
||||
publishDir "${params.outdir}",
|
||||
mode: params.publish_dir_mode,
|
||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::racon=1.4.20" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/racon:1.4.20--h9a82719_1"
|
||||
} else {
|
||||
container "quay.io/biocontainers/racon:1.4.20--h9a82719_1"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(reads), path(assembly), path(paf)
|
||||
|
||||
output:
|
||||
tuple val(meta), path('*_assembly_consensus.fasta.gz') , emit: improved_assembly
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
"""
|
||||
racon -t "${task.cpus}" \\
|
||||
"${reads}" \\
|
||||
"${paf}" \\
|
||||
$options.args \\
|
||||
"${assembly}" > \\
|
||||
${prefix}_assembly_consensus.fasta
|
||||
|
||||
gzip -n ${prefix}_assembly_consensus.fasta
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
${getProcessName(task.process)}:
|
||||
${getSoftwareName(task.process)}: \$( racon --version 2>&1 | sed 's/^.*v//' )
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
52
modules/racon/meta.yml
Normal file
52
modules/racon/meta.yml
Normal file
|
@ -0,0 +1,52 @@
|
|||
name: racon
|
||||
description: Consensus module for raw de novo DNA assembly of long uncorrected reads
|
||||
keywords:
|
||||
- assembly
|
||||
- pacbio
|
||||
- nanopore
|
||||
- polish
|
||||
tools:
|
||||
- racon:
|
||||
description: Ultrafast consensus module for raw de novo genome assembly of long uncorrected reads.
|
||||
homepage: https://github.com/lbcb-sci/racon
|
||||
documentation: https://github.com/lbcb-sci/racon
|
||||
tool_dev_url: https://github.com/lbcb-sci/racon
|
||||
doi: https://doi.org/10.1101/gr.214270.116
|
||||
licence: ['MIT']
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- reads:
|
||||
type: file
|
||||
description: List of input FastQ files. Racon expects single end reads
|
||||
pattern: "*.{fastq,fastq.gz,fq,fq.gz}"
|
||||
- assembly:
|
||||
type: file
|
||||
description: Genome assembly to be improved
|
||||
pattern: "*.{fasta,fa}"
|
||||
- paf:
|
||||
type: file
|
||||
description: Alignment in PAF format
|
||||
pattern: "*.paf"
|
||||
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- improved_assembly:
|
||||
type: file
|
||||
description: Improved genome assembly
|
||||
pattern: "*_assembly_consensus.fasta.gz"
|
||||
|
||||
authors:
|
||||
- "@avantonder"
|
78
modules/samtools/fixmate/functions.nf
Normal file
78
modules/samtools/fixmate/functions.nf
Normal file
|
@ -0,0 +1,78 @@
|
|||
//
|
||||
// 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()
|
||||
}
|
||||
|
||||
//
|
||||
// Extract name of module from process name using $task.process
|
||||
//
|
||||
def getProcessName(task_process) {
|
||||
return task_process.tokenize(':')[-1]
|
||||
}
|
||||
|
||||
//
|
||||
// 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.args3 = args.args3 ?: ''
|
||||
options.publish_by_meta = args.publish_by_meta ?: []
|
||||
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) {
|
||||
def ioptions = initOptions(args.options)
|
||||
def path_list = [ ioptions.publish_dir ?: args.publish_dir ]
|
||||
|
||||
// Do not publish versions.yml unless running from pytest workflow
|
||||
if (args.filename.equals('versions.yml') && !System.getenv("NF_CORE_MODULES_TEST")) {
|
||||
return null
|
||||
}
|
||||
if (ioptions.publish_by_meta) {
|
||||
def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta
|
||||
for (key in key_list) {
|
||||
if (args.meta && key instanceof String) {
|
||||
def path = key
|
||||
if (args.meta.containsKey(key)) {
|
||||
path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key]
|
||||
}
|
||||
path = path instanceof String ? path : ''
|
||||
path_list.add(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
45
modules/samtools/fixmate/main.nf
Normal file
45
modules/samtools/fixmate/main.nf
Normal file
|
@ -0,0 +1,45 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
options = initOptions(params.options)
|
||||
|
||||
process SAMTOOLS_FIXMATE {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
publishDir "${params.outdir}",
|
||||
mode: params.publish_dir_mode,
|
||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::samtools=1.14" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/samtools:1.14--hb421002_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/samtools:1.14--hb421002_0"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.bam"), emit: bam
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
if ("$bam" == "${prefix}.bam") error "Input and output names are the same, use the suffix option to disambiguate!"
|
||||
|
||||
"""
|
||||
samtools \\
|
||||
fixmate \\
|
||||
$options.args \\
|
||||
-@ $task.cpus \\
|
||||
$bam \\
|
||||
${prefix}.bam \\
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
${getProcessName(task.process)}:
|
||||
${getSoftwareName(task.process)}: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
49
modules/samtools/fixmate/meta.yml
Normal file
49
modules/samtools/fixmate/meta.yml
Normal file
|
@ -0,0 +1,49 @@
|
|||
name: samtools_fixmate
|
||||
description: Samtools fixmate is a tool that can fill in information (insert size, cigar, mapq) about paired end reads onto the corresponding other read. Also has options to remove secondary/unmapped alignments and recalculate whether reads are proper pairs.
|
||||
keywords:
|
||||
- fixmate
|
||||
- samtools
|
||||
- insert size
|
||||
- repair
|
||||
- bam
|
||||
- paired
|
||||
- read pairs
|
||||
tools:
|
||||
- samtools:
|
||||
description: |
|
||||
SAMtools is a set of utilities for interacting with and post-processing
|
||||
short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li.
|
||||
These files are generated as output by short read aligners like BWA.
|
||||
homepage: http://www.htslib.org/
|
||||
documentation: http://www.htslib.org/doc/samtools.html
|
||||
tool_dev_url: https://github.com/samtools/samtools
|
||||
doi: 10.1093/bioinformatics/btp352
|
||||
licence: ['MIT']
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- bam:
|
||||
type: file
|
||||
description: BAM/CRAM/SAM file, must be sorted by name, not coordinate
|
||||
pattern: "*.{bam,cram,sam}"
|
||||
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- bam:
|
||||
type: file
|
||||
description: A BAM/CRAM/SAM file with mate information added and/or proper pairs recalled
|
||||
pattern: "*.{bam,cram,sam}"
|
||||
|
||||
authors:
|
||||
- "@sppearce"
|
78
modules/seqsero2/functions.nf
Normal file
78
modules/seqsero2/functions.nf
Normal file
|
@ -0,0 +1,78 @@
|
|||
//
|
||||
// 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()
|
||||
}
|
||||
|
||||
//
|
||||
// Extract name of module from process name using $task.process
|
||||
//
|
||||
def getProcessName(task_process) {
|
||||
return task_process.tokenize(':')[-1]
|
||||
}
|
||||
|
||||
//
|
||||
// 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.args3 = args.args3 ?: ''
|
||||
options.publish_by_meta = args.publish_by_meta ?: []
|
||||
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) {
|
||||
def ioptions = initOptions(args.options)
|
||||
def path_list = [ ioptions.publish_dir ?: args.publish_dir ]
|
||||
|
||||
// Do not publish versions.yml unless running from pytest workflow
|
||||
if (args.filename.equals('versions.yml') && !System.getenv("NF_CORE_MODULES_TEST")) {
|
||||
return null
|
||||
}
|
||||
if (ioptions.publish_by_meta) {
|
||||
def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta
|
||||
for (key in key_list) {
|
||||
if (args.meta && key instanceof String) {
|
||||
def path = key
|
||||
if (args.meta.containsKey(key)) {
|
||||
path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key]
|
||||
}
|
||||
path = path instanceof String ? path : ''
|
||||
path_list.add(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
45
modules/seqsero2/main.nf
Normal file
45
modules/seqsero2/main.nf
Normal file
|
@ -0,0 +1,45 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
options = initOptions(params.options)
|
||||
|
||||
process SEQSERO2 {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
publishDir "${params.outdir}",
|
||||
mode: params.publish_dir_mode,
|
||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::seqsero2=1.2.1" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/seqsero2:1.2.1--py_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/seqsero2:1.2.1--py_0"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(seqs)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("results/*_log.txt") , emit: log
|
||||
tuple val(meta), path("results/*_result.tsv"), emit: tsv
|
||||
tuple val(meta), path("results/*_result.txt"), emit: txt
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
"""
|
||||
SeqSero2_package.py \\
|
||||
$options.args \\
|
||||
-d results/ \\
|
||||
-n $prefix \\
|
||||
-p $task.cpus \\
|
||||
-i $seqs
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
${getProcessName(task.process)}:
|
||||
${getSoftwareName(task.process)}: \$( echo \$( SeqSero2_package.py --version 2>&1) | sed 's/^.*SeqSero2_package.py //' )
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
52
modules/seqsero2/meta.yml
Normal file
52
modules/seqsero2/meta.yml
Normal file
|
@ -0,0 +1,52 @@
|
|||
name: seqsero2
|
||||
description: Salmonella serotype prediction from reads and assemblies
|
||||
keywords:
|
||||
- fasta
|
||||
- fastq
|
||||
- salmonella
|
||||
- sertotype
|
||||
tools:
|
||||
- seqsero2:
|
||||
description: Salmonella serotype prediction from genome sequencing data
|
||||
homepage: https://github.com/denglab/SeqSero2
|
||||
documentation: https://github.com/denglab/SeqSero2
|
||||
tool_dev_url: https://github.com/denglab/SeqSero2
|
||||
doi: "10.1128/AEM.01746-19"
|
||||
licence: ['GPL v2']
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- seqs:
|
||||
type: file
|
||||
description: FASTQ or FASTA formated sequences
|
||||
pattern: "*.{fq.gz,fastq.gz,fna.gz,fna,fasta.gz,fasta,fa.gz,fa}"
|
||||
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- log:
|
||||
type: file
|
||||
description: A log of serotype antigen results
|
||||
pattern: "*_log.txt"
|
||||
- tsv:
|
||||
type: file
|
||||
description: Tab-delimited summary of the SeqSero2 results
|
||||
pattern: "*_result.tsv"
|
||||
- txt:
|
||||
type: file
|
||||
description: Detailed summary of the SeqSero2 results
|
||||
pattern: "*_result.txt"
|
||||
|
||||
authors:
|
||||
- "@rpetit3"
|
|
@ -450,6 +450,10 @@ gatk4/filtermutectcalls:
|
|||
- modules/gatk4/filtermutectcalls/**
|
||||
- tests/modules/gatk4/filtermutectcalls/**
|
||||
|
||||
gatk4/genomicsdbimport:
|
||||
- modules/gatk4/genomicsdbimport/**
|
||||
- tests/modules/gatk4/genomicsdbimport/**
|
||||
|
||||
gatk4/getpileupsummaries:
|
||||
- modules/gatk4/getpileupsummaries/**
|
||||
- tests/modules/gatk4/getpileupsummaries/**
|
||||
|
@ -542,6 +546,14 @@ gubbins:
|
|||
- modules/gubbins/**
|
||||
- tests/modules/gubbins/**
|
||||
|
||||
gunc/downloaddb:
|
||||
- modules/gunc/downloaddb/**
|
||||
- tests/modules/gunc/downloaddb/**
|
||||
|
||||
gunc/run:
|
||||
- modules/gunc/run/**
|
||||
- tests/modules/gunc/run/**
|
||||
|
||||
gunzip:
|
||||
- modules/gunzip/**
|
||||
- tests/modules/gunzip/**
|
||||
|
@ -569,6 +581,14 @@ hisat2/extractsplicesites:
|
|||
- modules/hisat2/extractsplicesites/**
|
||||
- tests/modules/hisat2/extractsplicesites/**
|
||||
|
||||
hmmcopy/gccounter:
|
||||
- modules/hmmcopy/gccounter/**
|
||||
- tests/modules/hmmcopy/gccounter/**
|
||||
|
||||
hmmcopy/readcounter:
|
||||
- modules/hmmcopy/readcounter/**
|
||||
- tests/modules/hmmcopy/readcounter/**
|
||||
|
||||
hmmer/hmmalign:
|
||||
- modules/hmmer/hmmalign/**
|
||||
- tests/modules/hmmer/hmmalign/**
|
||||
|
@ -589,6 +609,10 @@ homer/makeucscfile:
|
|||
- modules/homer/makeucscfile/**
|
||||
- tests/modules/homer/makeucscfile/**
|
||||
|
||||
idr:
|
||||
- modules/idr/**
|
||||
- tests/modules/idr/**
|
||||
|
||||
iqtree:
|
||||
- modules/iqtree/**
|
||||
- tests/modules/iqtree/**
|
||||
|
@ -778,6 +802,10 @@ msisensor/scan:
|
|||
- modules/msisensor/scan/**
|
||||
- tests/modules/msisensor/scan/**
|
||||
|
||||
mtnucratio:
|
||||
- modules/mtnucratio/**
|
||||
- tests/modules/mtnucratio/**
|
||||
|
||||
multiqc:
|
||||
- modules/fastqc/**
|
||||
- modules/multiqc/**
|
||||
|
@ -923,6 +951,10 @@ quast:
|
|||
- modules/quast/**
|
||||
- tests/modules/quast/**
|
||||
|
||||
racon:
|
||||
- modules/racon/**
|
||||
- tests/modules/racon/**
|
||||
|
||||
rapidnj:
|
||||
- modules/rapidnj/**
|
||||
- tests/modules/rapidnj/**
|
||||
|
@ -1007,6 +1039,10 @@ samtools/fastq:
|
|||
- modules/samtools/fastq/**
|
||||
- tests/modules/samtools/fastq/**
|
||||
|
||||
samtools/fixmate:
|
||||
- modules/samtools/fixmate/**
|
||||
- tests/modules/samtools/fixmate/**
|
||||
|
||||
samtools/flagstat:
|
||||
- modules/samtools/flagstat/**
|
||||
- tests/modules/samtools/flagstat/**
|
||||
|
@ -1047,6 +1083,10 @@ seqkit/split2:
|
|||
- modules/seqkit/split2/**
|
||||
- tests/modules/seqkit/split2/**
|
||||
|
||||
seqsero2:
|
||||
- modules/seqsero2/**
|
||||
- tests/modules/seqsero2/**
|
||||
|
||||
seqtk/mergepe:
|
||||
- modules/seqtk/mergepe/**
|
||||
- tests/modules/seqtk/mergepe/**
|
||||
|
|
|
@ -11,6 +11,7 @@ params {
|
|||
genome_gff3 = "${test_data_dir}/genomics/sarscov2/genome/genome.gff3"
|
||||
genome_gff3_gz = "${test_data_dir}/genomics/sarscov2/genome/genome.gff3.gz"
|
||||
genome_gtf = "${test_data_dir}/genomics/sarscov2/genome/genome.gtf"
|
||||
genome_paf = "${test_data_dir}/genomics/sarscov2/genome/genome.paf"
|
||||
genome_sizes = "${test_data_dir}/genomics/sarscov2/genome/genome.sizes"
|
||||
transcriptome_fasta = "${test_data_dir}/genomics/sarscov2/genome/transcriptome.fasta"
|
||||
transcriptome_paf = "${test_data_dir}/genomics/sarscov2/genome/transcriptome.paf"
|
||||
|
@ -102,6 +103,7 @@ params {
|
|||
genome_dict = "${test_data_dir}/genomics/homo_sapiens/genome/genome.dict"
|
||||
genome_gff3 = "${test_data_dir}/genomics/homo_sapiens/genome/genome.gff3"
|
||||
genome_gtf = "${test_data_dir}/genomics/homo_sapiens/genome/genome.gtf"
|
||||
genome_interval_list = "${test_data_dir}/genomics/homo_sapiens/genome/genome.interval_list"
|
||||
genome_sizes = "${test_data_dir}/genomics/homo_sapiens/genome/genome.sizes"
|
||||
genome_bed = "${test_data_dir}/genomics/homo_sapiens/genome/genome.bed"
|
||||
genome_header = "${test_data_dir}/genomics/homo_sapiens/genome/genome.header"
|
||||
|
@ -180,6 +182,7 @@ params {
|
|||
test2_baserecalibrator_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test2.baserecalibrator.table"
|
||||
test_pileups_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test.pileups.table"
|
||||
test2_pileups_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test2.pileups.table"
|
||||
test_genomicsdb_tar_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_genomicsdb.tar.gz"
|
||||
|
||||
test_test2_paired_mutect2_calls_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz"
|
||||
test_test2_paired_mutect2_calls_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.tbi"
|
||||
|
@ -199,6 +202,12 @@ params {
|
|||
test2_genome_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf.gz.tbi"
|
||||
test2_genome_vcf_idx = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf.idx"
|
||||
|
||||
test_broadpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/broadpeak/test.broadPeak"
|
||||
test2_broadpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/broadpeak/test2.broadPeak"
|
||||
|
||||
test_narrowpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/narrowpeak/test.narrowPeak"
|
||||
test2_narrowpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/narrowpeak/test2.narrowPeak"
|
||||
|
||||
test_10x_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/10xgenomics/test.10x_1.fastq.gz"
|
||||
test_10x_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/10xgenomics/test.10x_2.fastq.gz"
|
||||
|
||||
|
@ -243,6 +252,7 @@ params {
|
|||
'bacteroides_fragilis'{
|
||||
'genome' {
|
||||
genome_fna_gz = "${test_data_dir}/genomics/bacteroides_fragilis/genome/genome.fna.gz"
|
||||
genome_paf = "${test_data_dir}/genomics/bacteroides_fragilis/genome/genome.paf"
|
||||
}
|
||||
'illumina' {
|
||||
test1_contigs_fa_gz = "${test_data_dir}/genomics/bacteroides_fragilis/illumina/fasta/test1.contigs.fa.gz"
|
||||
|
@ -253,7 +263,8 @@ params {
|
|||
}
|
||||
'nanopore' {
|
||||
test_fastq_gz = "${test_data_dir}/genomics/bacteroides_fragilis/nanopore/fastq/test.fastq.gz"
|
||||
overlap_paf = "${test_data_dir}/genomics/bacteroides_fragilis/nanopore/overlap.paf"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,12 +3,24 @@ nextflow.enable.dsl = 2
|
|||
|
||||
include { ALLELECOUNTER } from '../../../modules/allelecounter/main.nf' addParams( options: [:] )
|
||||
|
||||
workflow test_allelecounter {
|
||||
workflow test_allelecounter_bam {
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true)
|
||||
]
|
||||
positions = [ file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) ]
|
||||
|
||||
ALLELECOUNTER ( input, positions )
|
||||
ALLELECOUNTER ( input, positions, [] )
|
||||
}
|
||||
|
||||
|
||||
workflow test_allelecounter_cram {
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true),
|
||||
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true)
|
||||
]
|
||||
positions = [ file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) ]
|
||||
fasta = [ file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) ]
|
||||
|
||||
ALLELECOUNTER ( input, positions, fasta )
|
||||
}
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
- name: allelecounter test_allelecounter
|
||||
command: nextflow run tests/modules/allelecounter -entry test_allelecounter -c tests/config/nextflow.config
|
||||
- name: allelecounter test_allelecounter_bam
|
||||
command: nextflow run tests/modules/allelecounter -entry test_allelecounter_bam -c tests/config/nextflow.config
|
||||
tags:
|
||||
- allelecounter
|
||||
files:
|
||||
- path: output/allelecounter/test.alleleCount
|
||||
md5sum: 2bbe9d7331b78bdac30fe30dbc5fdaf3
|
||||
|
||||
- name: allelecounter test_allelecounter_cram
|
||||
command: nextflow run tests/modules/allelecounter -entry test_allelecounter_cram -c tests/config/nextflow.config
|
||||
tags:
|
||||
- allelecounter
|
||||
files:
|
||||
- path: output/allelecounter/test.alleleCount
|
||||
md5sum: 2f83352a185168c7c98e9e42550b2856
|
||||
|
|
|
@ -8,28 +8,88 @@ workflow test_freebayes {
|
|||
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true)]
|
||||
reference = [file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true)]
|
||||
targets = []
|
||||
samples = []
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true),
|
||||
[],
|
||||
[]
|
||||
]
|
||||
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
|
||||
fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true)
|
||||
targets = []
|
||||
samples = []
|
||||
populations = []
|
||||
cnv = []
|
||||
cnv = []
|
||||
|
||||
FREEBAYES ( input, reference, targets, samples, populations, cnv)
|
||||
FREEBAYES (input, fasta, fai, targets, samples, populations, cnv)
|
||||
}
|
||||
|
||||
workflow test_freebayes_bed {
|
||||
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true)]
|
||||
reference = [file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true)]
|
||||
targets = file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)
|
||||
samples = []
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true),
|
||||
[],
|
||||
[]
|
||||
]
|
||||
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
|
||||
fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true)
|
||||
targets = file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)
|
||||
samples = []
|
||||
populations = []
|
||||
cnv = []
|
||||
cnv = []
|
||||
|
||||
FREEBAYES ( input, reference, targets, samples, populations, cnv)
|
||||
FREEBAYES (input, fasta, fai, targets, samples, populations, cnv)
|
||||
}
|
||||
|
||||
workflow test_freebayes_cram {
|
||||
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true),
|
||||
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true),
|
||||
[],
|
||||
[]
|
||||
]
|
||||
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
|
||||
fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
|
||||
targets = []
|
||||
samples = []
|
||||
populations = []
|
||||
cnv = []
|
||||
|
||||
FREEBAYES (input, fasta, fai, targets, samples, populations, cnv)
|
||||
}
|
||||
|
||||
workflow test_freebayes_somatic {
|
||||
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
|
||||
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true),
|
||||
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true),
|
||||
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam_bai'], checkIfExists: true)
|
||||
]
|
||||
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
|
||||
fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
|
||||
targets = []
|
||||
samples = []
|
||||
populations = []
|
||||
cnv = []
|
||||
|
||||
FREEBAYES (input, fasta, fai, targets, samples, populations, cnv)
|
||||
}
|
||||
|
||||
workflow test_freebayes_somatic_cram_intervals {
|
||||
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true),
|
||||
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true),
|
||||
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_cram'], checkIfExists: true),
|
||||
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_cram_crai'], checkIfExists: true)
|
||||
]
|
||||
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
|
||||
fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
|
||||
targets = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)
|
||||
samples = []
|
||||
populations = []
|
||||
cnv = []
|
||||
|
||||
FREEBAYES (input, fasta, fai, targets, samples, populations, cnv)
|
||||
}
|
||||
|
|
|
@ -12,3 +12,23 @@
|
|||
files:
|
||||
- path: output/freebayes/test.vcf.gz
|
||||
|
||||
- name: freebayes test_freebayes_cram
|
||||
command: nextflow run tests/modules/freebayes -entry test_freebayes_cram -c tests/config/nextflow.config
|
||||
tags:
|
||||
- freebayes
|
||||
files:
|
||||
- path: output/freebayes/test.vcf.gz
|
||||
|
||||
- name: freebayes test_freebayes_somatic
|
||||
command: nextflow run tests/modules/freebayes -entry test_freebayes_somatic -c tests/config/nextflow.config
|
||||
tags:
|
||||
- freebayes
|
||||
files:
|
||||
- path: output/freebayes/test.vcf.gz
|
||||
|
||||
- name: freebayes test_freebayes_somatic_cram_intervals
|
||||
command: nextflow run tests/modules/freebayes -entry test_freebayes_somatic_cram_intervals -c tests/config/nextflow.config
|
||||
tags:
|
||||
- freebayes
|
||||
files:
|
||||
- path: output/freebayes/test.vcf.gz
|
||||
|
|
|
@ -2,67 +2,16 @@
|
|||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { UNTAR } from '../../../../modules/untar/main.nf' addParams( options: [:] )
|
||||
include { GATK4_CREATESOMATICPANELOFNORMALS } from '../../../../modules/gatk4/createsomaticpanelofnormals/main.nf' addParams( options: [suffix:'.pon'] )
|
||||
|
||||
workflow test_gatk4_createsomaticpanelofnormals {
|
||||
maindir = file('test_genomicsdb')
|
||||
subdir1 = file('test_genomicsdb/chr22$1$40001')
|
||||
subdir2 = file('test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448')
|
||||
subdir3 = file('test_genomicsdb/chr22$1$40001/genomicsdb_meta_dir')
|
||||
subdir2.mkdirs()
|
||||
subdir3.mkdirs()
|
||||
db = file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true)
|
||||
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/__tiledb_workspace.tdb' , checkIfExists: true).copyTo(maindir)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/vcfheader.vcf' , checkIfExists: true).copyTo(maindir)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/vidmap.json' , checkIfExists: true).copyTo(maindir)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/callset.json' , checkIfExists: true).copyTo(maindir)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/.__consolidation_lock' , checkIfExists: true).copyTo(subdir1)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__array_schema.tdb' , checkIfExists: true).copyTo(subdir1)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/genomicsdb_meta_dir/genomicsdb_column_bounds.json' , checkIfExists: true).copyTo(subdir3)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/genomicsdb_meta_dir/genomicsdb_meta_2b25a6c2-cb94-4a4a-9005-acb7c595d322.json' , checkIfExists: true).copyTo(subdir3)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/AD.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/AD_var.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/ALT.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/ALT_var.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/BaseQRankSum.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/DB.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/DP.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/DP_FORMAT.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/END.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/ExcessHet.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/FILTER.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/FILTER_var.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/GQ.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/GT.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/GT_var.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/ID.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/ID_var.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/InbreedingCoeff.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/MIN_DP.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/MLEAC.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/MLEAC_var.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/MLEAF.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/MLEAF_var.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/MQRankSum.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/PGT.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/PGT_var.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/PID.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/PID_var.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/PL.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/PL_var.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/PS.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/QUAL.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/RAW_MQandDP.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/REF.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/REF_var.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/ReadPosRankSum.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/SB.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/__book_keeping.tdb.gz' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/__coords.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
file( 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/gatk/test_genomicsdb/chr22$1$40001/__3cf81648-433d-4464-be08-23d082445c9b139814474716928_1630588248448/__tiledb_fragment.tdb' , checkIfExists: true).copyTo(subdir2)
|
||||
UNTAR ( db )
|
||||
|
||||
input = [ [ id:'test' ], // meta map
|
||||
file( maindir , checkIfExists: true)]
|
||||
input = Channel.of([ id:'test'])
|
||||
.combine(UNTAR.out.untar)
|
||||
|
||||
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
|
||||
fastaidx = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
|
||||
|
|
61
tests/modules/gatk4/genomicsdbimport/main.nf
Normal file
61
tests/modules/gatk4/genomicsdbimport/main.nf
Normal file
|
@ -0,0 +1,61 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { UNTAR } from '../../../../modules/untar/main.nf' addParams( options: [:] )
|
||||
include { GATK4_GENOMICSDBIMPORT } from '../../../../modules/gatk4/genomicsdbimport/main.nf' addParams( options: [:] )
|
||||
|
||||
workflow test_gatk4_genomicsdbimport_create_genomicsdb {
|
||||
|
||||
input = [ [ id:'test_genomicsdb'], // meta map
|
||||
file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true) ,
|
||||
file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true) ,
|
||||
file(params.test_data['homo_sapiens']['genome']['genome_interval_list'], checkIfExists: true) ,
|
||||
[] ,
|
||||
[] ]
|
||||
|
||||
run_intlist = false
|
||||
run_updatewspace = false
|
||||
input_map = false
|
||||
|
||||
GATK4_GENOMICSDBIMPORT ( input, run_intlist, run_updatewspace, input_map )
|
||||
}
|
||||
|
||||
workflow test_gatk4_genomicsdbimport_get_intervalslist {
|
||||
db = file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true)
|
||||
|
||||
UNTAR ( db )
|
||||
|
||||
def input = Channel.of([ [ id:'test_genomicsdb'], // meta map
|
||||
[] ,
|
||||
[] ,
|
||||
[] ,
|
||||
[] ])
|
||||
.combine(UNTAR.out.untar)
|
||||
|
||||
run_intlist = true
|
||||
run_updatewspace = false
|
||||
input_map = false
|
||||
|
||||
GATK4_GENOMICSDBIMPORT ( input, run_intlist, run_updatewspace, input_map )
|
||||
}
|
||||
|
||||
workflow test_gatk4_genomicsdbimport_update_genomicsdb {
|
||||
db = file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true)
|
||||
|
||||
UNTAR ( db )
|
||||
|
||||
def input = Channel.of([ [ id:'test_genomicsdb'], // meta map
|
||||
file( params.test_data['homo_sapiens']['illumina']['test2_genome_vcf_gz'] , checkIfExists: true) ,
|
||||
file( params.test_data['homo_sapiens']['illumina']['test2_genome_vcf_gz_tbi'] , checkIfExists: true) ,
|
||||
[] ,
|
||||
[] ])
|
||||
.combine(UNTAR.out.untar)
|
||||
|
||||
run_intlist = false
|
||||
run_updatewspace = true
|
||||
input_map = false
|
||||
|
||||
GATK4_GENOMICSDBIMPORT ( input, run_intlist, run_updatewspace, input_map )
|
||||
|
||||
}
|
50
tests/modules/gatk4/genomicsdbimport/test.yml
Normal file
50
tests/modules/gatk4/genomicsdbimport/test.yml
Normal file
|
@ -0,0 +1,50 @@
|
|||
- name: gatk4 genomicsdbimport test_gatk4_genomicsdbimport_create_genomicsdb
|
||||
command: nextflow run tests/modules/gatk4/genomicsdbimport -entry test_gatk4_genomicsdbimport_create_genomicsdb -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4/genomicsdbimport
|
||||
- gatk4
|
||||
files:
|
||||
- path: output/gatk4/test_genomicsdb/__tiledb_workspace.tdb
|
||||
md5sum: d41d8cd98f00b204e9800998ecf8427e
|
||||
- path: output/gatk4/test_genomicsdb/callset.json
|
||||
md5sum: a7d07d1c86449bbb1091ff29368da07a
|
||||
- path: output/gatk4/test_genomicsdb/chr22$1$40001/.__consolidation_lock
|
||||
md5sum: d41d8cd98f00b204e9800998ecf8427e
|
||||
- path: output/gatk4/test_genomicsdb/chr22$1$40001/__array_schema.tdb
|
||||
- path: output/gatk4/test_genomicsdb/chr22$1$40001/genomicsdb_meta_dir/genomicsdb_column_bounds.json
|
||||
md5sum: 2502f79658bc000578ebcfddfc1194c0
|
||||
- path: output/gatk4/test_genomicsdb/vcfheader.vcf
|
||||
contains:
|
||||
- "FORMAT=<ID=AD,Number=R,Type=Integer,Description="
|
||||
- path: output/gatk4/test_genomicsdb/vidmap.json
|
||||
md5sum: 18d3f68bd2cb6f4474990507ff95017a
|
||||
|
||||
- name: gatk4 genomicsdbimport test_gatk4_genomicsdbimport_get_intervalslist
|
||||
command: nextflow run tests/modules/gatk4/genomicsdbimport -entry test_gatk4_genomicsdbimport_get_intervalslist -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4/genomicsdbimport
|
||||
- gatk4
|
||||
files:
|
||||
- path: output/gatk4/test_genomicsdb.interval_list
|
||||
md5sum: 4c85812ac15fc1cd29711a851d23c0bf
|
||||
|
||||
- name: gatk4 genomicsdbimport test_gatk4_genomicsdbimport_update_genomicsdb
|
||||
command: nextflow run tests/modules/gatk4/genomicsdbimport -entry test_gatk4_genomicsdbimport_update_genomicsdb -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4/genomicsdbimport
|
||||
- gatk4
|
||||
files:
|
||||
- path: output/gatk4/test_genomicsdb/__tiledb_workspace.tdb
|
||||
md5sum: d41d8cd98f00b204e9800998ecf8427e
|
||||
- path: output/gatk4/test_genomicsdb/callset.json
|
||||
md5sum: 1ea31b59b9a218dd5681164aff4a5e07
|
||||
- path: output/gatk4/test_genomicsdb/chr22$1$40001/.__consolidation_lock
|
||||
md5sum: d41d8cd98f00b204e9800998ecf8427e
|
||||
- path: output/gatk4/test_genomicsdb/chr22$1$40001/__array_schema.tdb
|
||||
md5sum: 35e7fdd18149be80c0c3f56fa1f23971
|
||||
- path: output/gatk4/test_genomicsdb/chr22$1$40001/genomicsdb_meta_dir/genomicsdb_column_bounds.json
|
||||
md5sum: 2502f79658bc000578ebcfddfc1194c0
|
||||
- path: output/gatk4/test_genomicsdb/vcfheader.vcf
|
||||
md5sum: 47a615385a49f9261e088104b903bb9b
|
||||
- path: output/gatk4/test_genomicsdb/vidmap.json
|
||||
md5sum: 18d3f68bd2cb6f4474990507ff95017a
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { GENRICH } from '../../../modules/genrich/main.nf' addParams( control_bam: false, pvalues: false, pileup:false, bed:false, blacklist_bed:false, save_duplicates:false, options: ["args": "-p 0.1"] )
|
||||
include { GENRICH as GENRICH_BLACKLIST } from '../../../modules/genrich/main.nf' addParams( control_bam: false, pvalues: false, pileup:false, bed:false, blacklist_bed:true, save_duplicates:false, options: ["args": "-p 0.1"] )
|
||||
include { GENRICH as GENRICH_ALL_OUTPUTS } from '../../../modules/genrich/main.nf' addParams( control_bam: false, pvalues: true, pileup:true, bed:true, blacklist_bed:false, save_duplicates:true, options: ["args": "-r -p 0.1"] )
|
||||
include { GENRICH as GENRICH_ATACSEQ } from '../../../modules/genrich/main.nf' addParams( control_bam: false, pvalues: false, pileup:false, bed:false, blacklist_bed:false, save_duplicates:false, options: ["args": "-j -p 0.1"] )
|
||||
include { GENRICH } from '../../../modules/genrich/main.nf' addParams( options: ["args": "-p 0.1"] )
|
||||
include { GENRICH as GENRICH_CTRL } from '../../../modules/genrich/main.nf' addParams( options: ["args": "-p 0.9"] )
|
||||
include { GENRICH as GENRICH_ALL } from '../../../modules/genrich/main.nf' addParams( options: ["args": "-r -p 0.1"] )
|
||||
include { GENRICH as GENRICH_ATACSEQ } from '../../../modules/genrich/main.nf' addParams( options: ["args": "-j -p 0.1"] )
|
||||
|
||||
workflow test_genrich {
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
|
@ -13,7 +13,12 @@ workflow test_genrich {
|
|||
control = [ ]
|
||||
blacklist = [ ]
|
||||
|
||||
GENRICH ( input, control, blacklist )
|
||||
save_pvalues = false
|
||||
save_pileup = false
|
||||
save_bed = false
|
||||
save_duplicates = false
|
||||
|
||||
GENRICH ( input, control, blacklist, save_pvalues, save_pileup, save_bed, save_duplicates )
|
||||
}
|
||||
|
||||
workflow test_genrich_ctrl {
|
||||
|
@ -22,7 +27,12 @@ workflow test_genrich_ctrl {
|
|||
control = [ file( params.test_data['homo_sapiens']['illumina']['test2_paired_end_name_sorted_bam'], checkIfExists: true) ]
|
||||
blacklist = [ ]
|
||||
|
||||
GENRICH ( input, control, blacklist )
|
||||
save_pvalues = false
|
||||
save_pileup = false
|
||||
save_bed = false
|
||||
save_duplicates = false
|
||||
|
||||
GENRICH_CTRL ( input, control, blacklist, save_pvalues, save_pileup, save_bed, save_duplicates )
|
||||
}
|
||||
|
||||
workflow test_genrich_all_outputs {
|
||||
|
@ -31,14 +41,39 @@ workflow test_genrich_all_outputs {
|
|||
control = [ file( params.test_data['homo_sapiens']['illumina']['test2_paired_end_name_sorted_bam'], checkIfExists: true) ]
|
||||
blacklist = [ ]
|
||||
|
||||
GENRICH_ALL_OUTPUTS ( input, control, blacklist )
|
||||
save_pvalues = true
|
||||
save_pileup = true
|
||||
save_bed = true
|
||||
save_duplicates = true
|
||||
|
||||
GENRICH_ALL ( input, control, blacklist, save_pvalues, save_pileup, save_bed, save_duplicates )
|
||||
}
|
||||
|
||||
workflow test_genrich_blacklist {
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
[ file( params.test_data['homo_sapiens']['illumina']['test_paired_end_name_sorted_bam'], checkIfExists: true) ]]
|
||||
control = [ ]
|
||||
blacklist = [ file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)]
|
||||
|
||||
save_pvalues = false
|
||||
save_pileup = false
|
||||
save_bed = false
|
||||
save_duplicates = false
|
||||
|
||||
GENRICH ( input, control, blacklist, save_pvalues, save_pileup, save_bed, save_duplicates )
|
||||
}
|
||||
|
||||
workflow test_genrich_atacseq {
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
[ file( params.test_data['homo_sapiens']['illumina']['test_paired_end_name_sorted_bam'], checkIfExists: true) ]]
|
||||
control = [ file( params.test_data['homo_sapiens']['illumina']['test2_paired_end_name_sorted_bam'], checkIfExists: true) ]
|
||||
control = [ ]
|
||||
blacklist = [ ]
|
||||
|
||||
GENRICH_ATACSEQ ( input, control, blacklist )
|
||||
save_pvalues = false
|
||||
save_pileup = false
|
||||
save_bed = false
|
||||
save_duplicates = false
|
||||
|
||||
GENRICH_ATACSEQ ( input, control, blacklist, save_pvalues, save_pileup, save_bed, save_duplicates )
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
- genrich
|
||||
files:
|
||||
- path: output/genrich/test.narrowPeak
|
||||
md5sum: 6afabdd3f691c7c84c66ff8a23984681
|
||||
md5sum: 2fcc392360b317f5ebee88cdbc149e05
|
||||
|
||||
- name: genrich test_genrich_all_outputs
|
||||
command: nextflow run tests/modules/genrich -entry test_genrich_all_outputs -c tests/config/nextflow.config
|
||||
|
@ -20,15 +20,23 @@
|
|||
- genrich
|
||||
files:
|
||||
- path: output/genrich/test.duplicates.txt
|
||||
md5sum: a92893f905fd8b3751bc6a960fbfe7ba
|
||||
md5sum: 159d557af7c23bc3cfb802d87fa96c34
|
||||
- path: output/genrich/test.intervals.bed
|
||||
md5sum: 52edf47e6641c0cc03f9cca7324f7eaa
|
||||
md5sum: 4bea65caa3f4043d703af4b57161112e
|
||||
- path: output/genrich/test.narrowPeak
|
||||
md5sum: e45eb7d000387975050c2e85c164e5be
|
||||
md5sum: d41d8cd98f00b204e9800998ecf8427e
|
||||
- path: output/genrich/test.pileup.bedGraph
|
||||
md5sum: e4f7fa664cd4ed2cf3a1a3a9eb415e71
|
||||
md5sum: 03e53848de695b5794f32f15b2709203
|
||||
- path: output/genrich/test.pvalues.bedGraph
|
||||
md5sum: 564859953704983393d4b7d6317060cd
|
||||
md5sum: b14feef34b6d2379a173a734ca963cde
|
||||
|
||||
- name: genrich test_genrich_blacklist
|
||||
command: nextflow run tests/modules/genrich -entry test_genrich_blacklist -c tests/config/nextflow.config
|
||||
tags:
|
||||
- genrich
|
||||
files:
|
||||
- path: output/genrich/test.narrowPeak
|
||||
md5sum: 6afabdd3f691c7c84c66ff8a23984681
|
||||
|
||||
- name: genrich test_genrich_atacseq
|
||||
command: nextflow run tests/modules/genrich -entry test_genrich_atacseq -c tests/config/nextflow.config
|
||||
|
|
12
tests/modules/gunc/downloaddb/main.nf
Normal file
12
tests/modules/gunc/downloaddb/main.nf
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { GUNC_DOWNLOADDB } from '../../../../modules/gunc/downloaddb/main.nf' addParams( options: [:] )
|
||||
|
||||
workflow test_gunc_downloaddb {
|
||||
|
||||
input = 'progenomes'
|
||||
|
||||
GUNC_DOWNLOADDB ( input )
|
||||
}
|
8
tests/modules/gunc/downloaddb/test.yml
Normal file
8
tests/modules/gunc/downloaddb/test.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
- name: gunc downloaddb
|
||||
command: nextflow run ./tests/modules/gunc/downloaddb -entry test_gunc_downloaddb -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gunc
|
||||
- gunc/downloaddb
|
||||
files:
|
||||
- path: output/gunc/gunc_db_progenomes2.1.dmnd
|
||||
md5sum: 447c9330056b02f29f30fe81fe4af4eb
|
17
tests/modules/gunc/run/main.nf
Normal file
17
tests/modules/gunc/run/main.nf
Normal file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { GUNC_RUN } from '../../../../modules/gunc/run/main.nf' addParams( options: [:] )
|
||||
include { GUNC_DOWNLOADDB } from '../../../../modules/gunc/downloaddb/main.nf' addParams( options: [:] )
|
||||
|
||||
|
||||
workflow test_gunc_run {
|
||||
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true) ]
|
||||
|
||||
GUNC_DOWNLOADDB('progenomes')
|
||||
|
||||
GUNC_RUN ( input, GUNC_DOWNLOADDB.out.db )
|
||||
}
|
8
tests/modules/gunc/run/test.yml
Normal file
8
tests/modules/gunc/run/test.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
- name: gunc run
|
||||
command: nextflow run ./tests/modules/gunc/run -entry test_gunc_run -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gunc
|
||||
- gunc/run
|
||||
files:
|
||||
- path: output/gunc/GUNC.progenomes_2.1.maxCSS_level.tsv
|
||||
md5sum: 0420c1a9f2c50fefaee9fab5d80a551a
|
11
tests/modules/hmmcopy/gccounter/main.nf
Normal file
11
tests/modules/hmmcopy/gccounter/main.nf
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { HMMCOPY_GCCOUNTER } from '../../../../modules/hmmcopy/gccounter/main.nf' addParams( options: [:] )
|
||||
|
||||
workflow test_hmmcopy_gccounter {
|
||||
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
|
||||
|
||||
HMMCOPY_GCCOUNTER (fasta)
|
||||
}
|
8
tests/modules/hmmcopy/gccounter/test.yml
Normal file
8
tests/modules/hmmcopy/gccounter/test.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
- name: hmmcopy gccounter test_hmmcopy_gccounter
|
||||
command: nextflow run tests/modules/hmmcopy/gccounter -entry test_hmmcopy_gccounter -c tests/config/nextflow.config
|
||||
tags:
|
||||
- hmmcopy
|
||||
- hmmcopy/gccounter
|
||||
files:
|
||||
- path: output/hmmcopy/genome.gc.wig
|
||||
md5sum: 59ad14bc5aaa903187d7b248c9490deb
|
14
tests/modules/hmmcopy/readcounter/main.nf
Normal file
14
tests/modules/hmmcopy/readcounter/main.nf
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { HMMCOPY_READCOUNTER } from '../../../../modules/hmmcopy/readcounter/main.nf' addParams( options: [:] )
|
||||
|
||||
workflow test_hmmcopy_readcounter {
|
||||
|
||||
input = [ [ id:'test'], // meta map
|
||||
[ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true)],
|
||||
[ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)]
|
||||
]
|
||||
HMMCOPY_READCOUNTER ( input )
|
||||
}
|
8
tests/modules/hmmcopy/readcounter/test.yml
Normal file
8
tests/modules/hmmcopy/readcounter/test.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
- name: hmmcopy readcounter test_hmmcopy_readcounter
|
||||
command: nextflow run tests/modules/hmmcopy/readcounter -entry test_hmmcopy_readcounter -c tests/config/nextflow.config
|
||||
tags:
|
||||
- hmmcopy
|
||||
- hmmcopy/readcounter
|
||||
files:
|
||||
- path: output/hmmcopy/test.wig
|
||||
md5sum: 3655d8325baea81b3b690791262c6b57
|
35
tests/modules/idr/main.nf
Normal file
35
tests/modules/idr/main.nf
Normal file
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { IDR } from '../../../modules/idr/main.nf' addParams( options: [:] )
|
||||
|
||||
workflow test_idr_narrowpeak {
|
||||
|
||||
input = [
|
||||
file(params.test_data['homo_sapiens']['illumina']['test_narrowpeak'], checkIfExists: true),
|
||||
file(params.test_data['homo_sapiens']['illumina']['test2_narrowpeak'], checkIfExists: true)
|
||||
]
|
||||
|
||||
IDR ( input, 'narrowPeak', 'test' )
|
||||
}
|
||||
|
||||
workflow test_idr_broadpeak {
|
||||
|
||||
input = [
|
||||
file(params.test_data['homo_sapiens']['illumina']['test_broadpeak'], checkIfExists: true),
|
||||
file(params.test_data['homo_sapiens']['illumina']['test2_broadpeak'], checkIfExists: true)
|
||||
]
|
||||
|
||||
IDR ( input, 'broadPeak', 'test' )
|
||||
}
|
||||
|
||||
workflow test_idr_noprefix {
|
||||
|
||||
input = [
|
||||
file(params.test_data['homo_sapiens']['illumina']['test_narrowpeak'], checkIfExists: true),
|
||||
file(params.test_data['homo_sapiens']['illumina']['test2_narrowpeak'], checkIfExists: true)
|
||||
]
|
||||
|
||||
IDR ( input, 'narrowPeak', '' )
|
||||
}
|
35
tests/modules/idr/test.yml
Normal file
35
tests/modules/idr/test.yml
Normal file
|
@ -0,0 +1,35 @@
|
|||
- name: idr test_idr_narrowpeak
|
||||
command: nextflow run tests/modules/idr -entry test_idr_narrowpeak -c tests/config/nextflow.config
|
||||
tags:
|
||||
- idr
|
||||
files:
|
||||
- path: output/idr/test.idrValues.txt
|
||||
md5sum: 09be837cc6abbc3eb5958b74802eea55
|
||||
- path: output/idr/test.idrValues.txt.png
|
||||
md5sum: 4a7143ccc0ccadb37c2317bf626e6d96
|
||||
- path: output/idr/test.log.txt
|
||||
md5sum: 6443507ac66b9d3b64bc56b78328083e
|
||||
|
||||
- name: idr test_idr_broadpeak
|
||||
command: nextflow run tests/modules/idr -entry test_idr_broadpeak -c tests/config/nextflow.config
|
||||
tags:
|
||||
- idr
|
||||
files:
|
||||
- path: output/idr/test.idrValues.txt
|
||||
md5sum: 387441c716815e4caec3e70a2cc11a4a
|
||||
- path: output/idr/test.idrValues.txt.png
|
||||
md5sum: 7204083ca5b920b4215a5991c12cb4e7
|
||||
- path: output/idr/test.log.txt
|
||||
md5sum: e6917133112b5cec135c182ffac19237
|
||||
|
||||
- name: idr test_idr_noprefix
|
||||
command: nextflow run tests/modules/idr -entry test_idr_noprefix -c tests/config/nextflow.config
|
||||
tags:
|
||||
- idr
|
||||
files:
|
||||
- path: output/idr/idrValues.txt
|
||||
md5sum: 09be837cc6abbc3eb5958b74802eea55
|
||||
- path: output/idr/idrValues.txt.png
|
||||
md5sum: 4a7143ccc0ccadb37c2317bf626e6d96
|
||||
- path: output/idr/log.txt
|
||||
md5sum: 6443507ac66b9d3b64bc56b78328083e
|
|
@ -14,4 +14,4 @@
|
|||
- minimap2/align
|
||||
files:
|
||||
- path: ./output/minimap2/test.paf
|
||||
md5sum: 5e7b55a26bf0ea3a2843423d3e0b9a28
|
||||
md5sum: 5e7b55a26bf0ea3a2843423d3e0b9a28
|
14
tests/modules/mtnucratio/main.nf
Normal file
14
tests/modules/mtnucratio/main.nf
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { MTNUCRATIO } from '../../../modules/mtnucratio/main.nf' addParams( options: [:] )
|
||||
|
||||
workflow test_mtnucratio {
|
||||
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam'], checkIfExists: true)]
|
||||
mt_id = 'mt_id'
|
||||
|
||||
MTNUCRATIO ( input, mt_id )
|
||||
}
|
9
tests/modules/mtnucratio/test.yml
Normal file
9
tests/modules/mtnucratio/test.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
- name: mtnucratio
|
||||
command: nextflow run tests/modules/mtnucratio -entry test_mtnucratio -c tests/config/nextflow.config
|
||||
tags:
|
||||
- mtnucratio
|
||||
files:
|
||||
- path: output/mtnucratio/test.single_end.sorted.bam.mtnucratio
|
||||
md5sum: 19e96849802c70aa0694785f716274b7
|
||||
- path: output/mtnucratio/test.single_end.sorted.bam.mtnucratiomtnuc.json
|
||||
md5sum: 14d24be6272854d6762f0dfad5918ef6
|
15
tests/modules/racon/main.nf
Normal file
15
tests/modules/racon/main.nf
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { RACON } from '../../../modules/racon/main.nf' addParams( options: [:] )
|
||||
|
||||
workflow test_racon {
|
||||
input = [ [ id:'test', single_end:true ], // meta map
|
||||
file(params.test_data['bacteroides_fragilis']['nanopore']['test_fastq_gz'], checkIfExists: true),
|
||||
file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true),
|
||||
file(params.test_data['bacteroides_fragilis']['genome']['genome_paf'], checkIfExists: true)
|
||||
]
|
||||
|
||||
RACON ( input )
|
||||
}
|
7
tests/modules/racon/test.yml
Normal file
7
tests/modules/racon/test.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
- name: racon test_racon
|
||||
command: nextflow run tests/modules/racon -entry test_racon -c tests/config/nextflow.config
|
||||
tags:
|
||||
- racon
|
||||
files:
|
||||
- path: output/racon/test_assembly_consensus.fasta.gz
|
||||
md5sum: 96a0ba94c6154f6f37b5a76a0207eb6f
|
14
tests/modules/samtools/fixmate/main.nf
Normal file
14
tests/modules/samtools/fixmate/main.nf
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { SAMTOOLS_FIXMATE } from '../../../../modules/samtools/fixmate/main.nf' addParams( options: [args:'-r -c -m'] )
|
||||
|
||||
workflow test_samtools_fixmate {
|
||||
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ]
|
||||
|
||||
SAMTOOLS_FIXMATE ( input )
|
||||
|
||||
}
|
8
tests/modules/samtools/fixmate/test.yml
Normal file
8
tests/modules/samtools/fixmate/test.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
- name: samtools fixmate test_samtools_fixmate
|
||||
command: nextflow run tests/modules/samtools/fixmate -entry test_samtools_fixmate -c tests/config/nextflow.config
|
||||
tags:
|
||||
- samtools/fixmate
|
||||
- samtools
|
||||
files:
|
||||
- path: output/samtools/test.bam
|
||||
md5sum: 92c8463710cdcaef2010aa02ed9e01fd
|
13
tests/modules/seqsero2/main.nf
Normal file
13
tests/modules/seqsero2/main.nf
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { SEQSERO2 } from '../../../modules/seqsero2/main.nf' addParams( options: [args: '-m k -t 4'] )
|
||||
|
||||
workflow test_seqsero2 {
|
||||
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ]
|
||||
|
||||
SEQSERO2 ( input )
|
||||
}
|
11
tests/modules/seqsero2/test.yml
Normal file
11
tests/modules/seqsero2/test.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
- name: seqsero2 test_seqsero2
|
||||
command: nextflow run tests/modules/seqsero2 -entry test_seqsero2 -c tests/config/nextflow.config
|
||||
tags:
|
||||
- seqsero2
|
||||
files:
|
||||
- path: output/seqsero2/results/SeqSero_log.txt
|
||||
md5sum: d00242dfa734b5abb3622a6048f0b4fb
|
||||
- path: output/seqsero2/results/SeqSero_result.tsv
|
||||
contains: ['Sample', 'Predicted', 'Note']
|
||||
- path: output/seqsero2/results/SeqSero_result.txt
|
||||
contains: ['Sample', 'Predicted', 'Note']
|
Loading…
Reference in a new issue