mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
Update last module (#533)
* Update LAST to version 1238. * Update functions.nf to the latest devel version. * Update test MD5sums after updating software version. * Make portable on MacOS * Allow input alignments to be uncompressed. While the strategy in this family of modules is to make all inputs and outputs compressed, this change might be useful to some users. As of LAST 2138, `last/split` does not allow its input to be compressed. * Search for .des file, that is guaranteed to be unique. Some LAST indexes have more than one .bck file and it makes the name detection crash. In this commit, I also standardise how the names are detected. * Use value input channel and optional output channels to handle formats. As discussed on Slack, it is preferred to use a value input channel instead of sneaking options through `params.args2` or `params.format` as we did. Likewise, optional output channels with clearly labeled format are preferred to 'catch-all' wildcards.
This commit is contained in:
parent
894349b9b5
commit
c8168bc351
22 changed files with 184 additions and 162 deletions
|
@ -11,23 +11,24 @@ process LAST_DOTPLOT {
|
|||
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::last=1219" : null)
|
||||
conda (params.enable_conda ? "bioconda::last=1238" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/last:1219--h2e03b76_0"
|
||||
container "https://depot.galaxyproject.org/singularity/last:1238--h2e03b76_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/last:1219--h2e03b76_0"
|
||||
container "quay.io/biocontainers/last:1238--h2e03b76_0"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(maf)
|
||||
val(format)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.{png,gif}"), emit: plot
|
||||
path "*.version.txt" , emit: version
|
||||
tuple val(meta), path("*.gif"), optional:true, emit: gif
|
||||
tuple val(meta), path("*.png"), optional:true, emit: png
|
||||
path "*.version.txt" , emit: version
|
||||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def format = options.args2 ? options.args2 : "png"
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
"""
|
||||
last-dotplot \\
|
||||
|
|
|
@ -25,12 +25,19 @@ input:
|
|||
type: file
|
||||
description: Multiple Aligment Format (MAF) file, compressed with gzip
|
||||
pattern: "*.{maf.gz}"
|
||||
- format:
|
||||
type: value
|
||||
description: Output format (PNG or GIF).
|
||||
|
||||
output:
|
||||
- plot:
|
||||
- png:
|
||||
type: file
|
||||
description: Pairwise alignment dot plot image, in PNG or other format.
|
||||
pattern: "*.{gif,png}"
|
||||
description: Pairwise alignment dot plot image, in PNG format.
|
||||
pattern: "*.png"
|
||||
- gif:
|
||||
type: file
|
||||
description: Pairwise alignment dot plot image, in GIF format.
|
||||
pattern: "*.gif"
|
||||
- version:
|
||||
type: file
|
||||
description: File containing software version
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
/*
|
||||
* -----------------------------------------------------
|
||||
* Utility functions used in nf-core DSL2 module files
|
||||
* -----------------------------------------------------
|
||||
*/
|
||||
//
|
||||
// Utility functions used in nf-core DSL2 module files
|
||||
//
|
||||
|
||||
/*
|
||||
* Extract name of software tool from process name using $task.process
|
||||
*/
|
||||
//
|
||||
// Extract name of software tool from process name using $task.process
|
||||
//
|
||||
def getSoftwareName(task_process) {
|
||||
return task_process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()
|
||||
}
|
||||
|
||||
/*
|
||||
* Function to initialise default values and to generate a Groovy Map of available options for nf-core modules
|
||||
*/
|
||||
//
|
||||
// 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 ?: ''
|
||||
|
@ -26,18 +24,18 @@ def initOptions(Map args) {
|
|||
return options
|
||||
}
|
||||
|
||||
/*
|
||||
* Tidy up and join elements of a list to return a path string
|
||||
*/
|
||||
//
|
||||
// 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
|
||||
*/
|
||||
//
|
||||
// Function to save/publish module results
|
||||
//
|
||||
def saveFiles(Map args) {
|
||||
if (!args.filename.endsWith('.version.txt')) {
|
||||
def ioptions = initOptions(args.options)
|
||||
|
|
|
@ -11,11 +11,11 @@ process LAST_LASTAL {
|
|||
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::last=1219" : null)
|
||||
conda (params.enable_conda ? "bioconda::last=1238" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/last:1219--h2e03b76_0"
|
||||
container "https://depot.galaxyproject.org/singularity/last:1238--h2e03b76_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/last:1219--h2e03b76_0"
|
||||
container "quay.io/biocontainers/last:1238--h2e03b76_0"
|
||||
}
|
||||
|
||||
input:
|
||||
|
@ -32,7 +32,7 @@ process LAST_LASTAL {
|
|||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def trained_params = param_file ? "-p ${param_file}" : ''
|
||||
"""
|
||||
INDEX_NAME=\$(basename \$(ls $index/*.bck) .bck)
|
||||
INDEX_NAME=\$(basename \$(ls $index/*.des) .des)
|
||||
lastal \\
|
||||
$trained_params \\
|
||||
$options.args \\
|
||||
|
|
|
@ -11,11 +11,11 @@ process LAST_LASTDB {
|
|||
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::last=1219" : null)
|
||||
conda (params.enable_conda ? "bioconda::last=1238" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/last:1219--h2e03b76_0"
|
||||
container "https://depot.galaxyproject.org/singularity/last:1238--h2e03b76_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/last:1219--h2e03b76_0"
|
||||
container "quay.io/biocontainers/last:1238--h2e03b76_0"
|
||||
}
|
||||
|
||||
input:
|
||||
|
|
|
@ -11,26 +11,34 @@ process LAST_MAFCONVERT {
|
|||
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::last=1219" : null)
|
||||
conda (params.enable_conda ? "bioconda::last=1238" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/last:1219--h2e03b76_0"
|
||||
container "https://depot.galaxyproject.org/singularity/last:1238--h2e03b76_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/last:1219--h2e03b76_0"
|
||||
container "quay.io/biocontainers/last:1238--h2e03b76_0"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(maf)
|
||||
val(format)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.{axt,blast,blasttab,chain,gff,html,psl,sam,tab}.gz"), emit: alm
|
||||
path "*.version.txt" , emit: version
|
||||
tuple val(meta), path("*.axt.gz"), optional:true, emit: axt_gz
|
||||
tuple val(meta), path("*.blast.gz"), optional:true, emit: blast_gz
|
||||
tuple val(meta), path("*.blasttab.gz"), optional:true, emit: blasttab_gz
|
||||
tuple val(meta), path("*.chain.gz"), optional:true, emit: chain_gz
|
||||
tuple val(meta), path("*.gff.gz"), optional:true, emit: gff_gz
|
||||
tuple val(meta), path("*.html.gz"), optional:true, emit: html_gz
|
||||
tuple val(meta), path("*.psl.gz"), optional:true, emit: psl_gz
|
||||
tuple val(meta), path("*.sam.gz"), optional:true, emit: sam_gz
|
||||
tuple val(meta), path("*.tab.gz"), optional:true, emit: tab_gz
|
||||
path "*.version.txt" , emit: version
|
||||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def format = params.options.format ? params.options.format : "tab"
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
"""
|
||||
zcat $maf | maf-convert $options.args $format | gzip --no-name \\
|
||||
maf-convert $options.args $format $maf | gzip --no-name \\
|
||||
> ${prefix}.${format}.gz
|
||||
|
||||
# maf-convert has no --version option but lastdb (part of the same package) has.
|
||||
|
|
|
@ -22,8 +22,11 @@ input:
|
|||
e.g. [ id:'test', single_end:false ]
|
||||
- maf:
|
||||
type: file
|
||||
description: Multiple Aligment Format (MAF) file, compressed with gzip
|
||||
pattern: "*.{maf.gz}"
|
||||
description: Multiple Aligment Format (MAF) file, optionally compressed with gzip
|
||||
pattern: "*.{maf.gz,maf}"
|
||||
- format:
|
||||
type: value
|
||||
description: Output format (one of axt, blast, blasttab, chain, gff, html, psl, sam, or tab)
|
||||
|
||||
output:
|
||||
- meta:
|
||||
|
@ -35,10 +38,42 @@ output:
|
|||
type: file
|
||||
description: File containing software version
|
||||
pattern: "*.{version.txt}"
|
||||
- alm:
|
||||
- axt_gz:
|
||||
type: file
|
||||
description: Gzipped pairwise alignmnet in TAB or other formats
|
||||
pattern: "*.{axt,blast,blasttab,chain,gff,html,psl,sam,tab}.gz"
|
||||
description: Gzipped pairwise alignment in Axt (Blastz) format (optional)
|
||||
pattern: "*.axt.gz"
|
||||
- blast_gz:
|
||||
type: file
|
||||
description: Gzipped pairwise alignment in blast format (optional)
|
||||
pattern: "*.blast.gz"
|
||||
- blasttab_gz:
|
||||
type: file
|
||||
description: Gzipped pairwise alignment in blasttab format (optional)
|
||||
pattern: "*.blasttab.gz"
|
||||
- chain_gz:
|
||||
type: file
|
||||
description: Gzipped pairwise alignment in UCSC chain format (optional)
|
||||
pattern: "*.chain.gz"
|
||||
- gff_gz:
|
||||
type: file
|
||||
description: Gzipped pairwise alignment in GFF format (optional)
|
||||
pattern: "*.gff.gz"
|
||||
- html_gz:
|
||||
type: file
|
||||
description: Gzipped pairwise alignment in HTML format (optional)
|
||||
pattern: "*.html.gz"
|
||||
- psl_gz:
|
||||
type: file
|
||||
description: Gzipped pairwise alignment in PSL (BLAT) format (optional)
|
||||
pattern: "*.psl.gz"
|
||||
- SAM:
|
||||
type: file
|
||||
description: Gzipped pairwise alignment in SAM format (optional)
|
||||
pattern: "*.sam.gz"
|
||||
- tab:
|
||||
type: file
|
||||
description: Gzipped pairwise alignment in TAB format (optional)
|
||||
pattern: "*.tab.gz"
|
||||
|
||||
authors:
|
||||
- "@aleksandrabliznina"
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
/*
|
||||
* -----------------------------------------------------
|
||||
* Utility functions used in nf-core DSL2 module files
|
||||
* -----------------------------------------------------
|
||||
*/
|
||||
//
|
||||
// Utility functions used in nf-core DSL2 module files
|
||||
//
|
||||
|
||||
/*
|
||||
* Extract name of software tool from process name using $task.process
|
||||
*/
|
||||
//
|
||||
// Extract name of software tool from process name using $task.process
|
||||
//
|
||||
def getSoftwareName(task_process) {
|
||||
return task_process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()
|
||||
}
|
||||
|
||||
/*
|
||||
* Function to initialise default values and to generate a Groovy Map of available options for nf-core modules
|
||||
*/
|
||||
//
|
||||
// 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 ?: ''
|
||||
|
@ -26,18 +24,18 @@ def initOptions(Map args) {
|
|||
return options
|
||||
}
|
||||
|
||||
/*
|
||||
* Tidy up and join elements of a list to return a path string
|
||||
*/
|
||||
//
|
||||
// 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
|
||||
*/
|
||||
//
|
||||
// Function to save/publish module results
|
||||
//
|
||||
def saveFiles(Map args) {
|
||||
if (!args.filename.endsWith('.version.txt')) {
|
||||
def ioptions = initOptions(args.options)
|
||||
|
|
|
@ -11,11 +11,11 @@ process LAST_MAFSWAP {
|
|||
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::last=1219" : null)
|
||||
conda (params.enable_conda ? "bioconda::last=1238" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/last:1219--h2e03b76_0"
|
||||
container "https://depot.galaxyproject.org/singularity/last:1238--h2e03b76_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/last:1219--h2e03b76_0"
|
||||
container "quay.io/biocontainers/last:1238--h2e03b76_0"
|
||||
}
|
||||
|
||||
input:
|
||||
|
@ -29,7 +29,7 @@ process LAST_MAFSWAP {
|
|||
def software = getSoftwareName(task.process)
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
"""
|
||||
zcat $maf | maf-swap $options.args | gzip --no-name > ${prefix}.swapped.maf.gz
|
||||
maf-swap $options.args $maf | gzip --no-name > ${prefix}.swapped.maf.gz
|
||||
|
||||
# maf-swap has no --version option but lastdb, part of the same package, has.
|
||||
echo \$(lastdb --version 2>&1) | sed 's/lastdb //' > ${software}.version.txt
|
||||
|
|
|
@ -22,8 +22,8 @@ input:
|
|||
e.g. [ id:'test', single_end:false ]
|
||||
- maf:
|
||||
type: file
|
||||
description: Multiple Aligment Format (MAF) file, compressed with gzip
|
||||
pattern: "*.{maf.gz}"
|
||||
description: Multiple Aligment Format (MAF) file, optionally compressed with gzip
|
||||
pattern: "*.{maf.gz,maf}"
|
||||
|
||||
output:
|
||||
- maf:
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
/*
|
||||
* -----------------------------------------------------
|
||||
* Utility functions used in nf-core DSL2 module files
|
||||
* -----------------------------------------------------
|
||||
*/
|
||||
//
|
||||
// Utility functions used in nf-core DSL2 module files
|
||||
//
|
||||
|
||||
/*
|
||||
* Extract name of software tool from process name using $task.process
|
||||
*/
|
||||
//
|
||||
// Extract name of software tool from process name using $task.process
|
||||
//
|
||||
def getSoftwareName(task_process) {
|
||||
return task_process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()
|
||||
}
|
||||
|
||||
/*
|
||||
* Function to initialise default values and to generate a Groovy Map of available options for nf-core modules
|
||||
*/
|
||||
//
|
||||
// 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 ?: ''
|
||||
|
@ -26,18 +24,18 @@ def initOptions(Map args) {
|
|||
return options
|
||||
}
|
||||
|
||||
/*
|
||||
* Tidy up and join elements of a list to return a path string
|
||||
*/
|
||||
//
|
||||
// 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
|
||||
*/
|
||||
//
|
||||
// Function to save/publish module results
|
||||
//
|
||||
def saveFiles(Map args) {
|
||||
if (!args.filename.endsWith('.version.txt')) {
|
||||
def ioptions = initOptions(args.options)
|
||||
|
|
|
@ -11,11 +11,11 @@ process LAST_POSTMASK {
|
|||
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::last=1219" : null)
|
||||
conda (params.enable_conda ? "bioconda::last=1238" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/last:1219--h2e03b76_0"
|
||||
container "https://depot.galaxyproject.org/singularity/last:1238--h2e03b76_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/last:1219--h2e03b76_0"
|
||||
container "quay.io/biocontainers/last:1238--h2e03b76_0"
|
||||
}
|
||||
|
||||
input:
|
||||
|
@ -30,7 +30,7 @@ process LAST_POSTMASK {
|
|||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
if( "$maf" == "${prefix}.maf.gz" ) error "Input and output names are the same, use the suffix option to disambiguate"
|
||||
"""
|
||||
zcat $maf | last-postmask $options.args | gzip --no-name > ${prefix}.maf.gz
|
||||
last-postmask $options.args $maf | gzip --no-name > ${prefix}.maf.gz
|
||||
|
||||
# last-postmask does not have a --version option
|
||||
echo \$(lastal --version 2>&1) | sed 's/lastal //' > ${software}.version.txt
|
||||
|
|
|
@ -22,8 +22,8 @@ input:
|
|||
e.g. [ id:'test', single_end:false ]
|
||||
- maf:
|
||||
type: file
|
||||
description: Multiple Aligment Format (MAF) file, compressed with gzip
|
||||
pattern: "*.{maf.gz}"
|
||||
description: Multiple Aligment Format (MAF) file, optionally compressed with gzip
|
||||
pattern: "*.{maf.gz,maf}"
|
||||
|
||||
output:
|
||||
- maf:
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
/*
|
||||
* -----------------------------------------------------
|
||||
* Utility functions used in nf-core DSL2 module files
|
||||
* -----------------------------------------------------
|
||||
*/
|
||||
//
|
||||
// Utility functions used in nf-core DSL2 module files
|
||||
//
|
||||
|
||||
/*
|
||||
* Extract name of software tool from process name using $task.process
|
||||
*/
|
||||
//
|
||||
// Extract name of software tool from process name using $task.process
|
||||
//
|
||||
def getSoftwareName(task_process) {
|
||||
return task_process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()
|
||||
}
|
||||
|
||||
/*
|
||||
* Function to initialise default values and to generate a Groovy Map of available options for nf-core modules
|
||||
*/
|
||||
//
|
||||
// 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 ?: ''
|
||||
|
@ -26,18 +24,18 @@ def initOptions(Map args) {
|
|||
return options
|
||||
}
|
||||
|
||||
/*
|
||||
* Tidy up and join elements of a list to return a path string
|
||||
*/
|
||||
//
|
||||
// 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
|
||||
*/
|
||||
//
|
||||
// Function to save/publish module results
|
||||
//
|
||||
def saveFiles(Map args) {
|
||||
if (!args.filename.endsWith('.version.txt')) {
|
||||
def ioptions = initOptions(args.options)
|
||||
|
|
|
@ -11,11 +11,11 @@ process LAST_SPLIT {
|
|||
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::last=1219" : null)
|
||||
conda (params.enable_conda ? "bioconda::last=1238" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/last:1219--h2e03b76_0"
|
||||
container "https://depot.galaxyproject.org/singularity/last:1238--h2e03b76_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/last:1219--h2e03b76_0"
|
||||
container "quay.io/biocontainers/last:1238--h2e03b76_0"
|
||||
}
|
||||
|
||||
input:
|
||||
|
@ -29,7 +29,7 @@ process LAST_SPLIT {
|
|||
def software = getSoftwareName(task.process)
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
"""
|
||||
zcat $maf | last-split $options.args | gzip --no-name > ${prefix}.maf.gz
|
||||
zcat < $maf | last-split $options.args | gzip --no-name > ${prefix}.maf.gz
|
||||
|
||||
echo \$(last-split --version 2>&1) | sed 's/last-split //' > ${software}.version.txt
|
||||
"""
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
/*
|
||||
* -----------------------------------------------------
|
||||
* Utility functions used in nf-core DSL2 module files
|
||||
* -----------------------------------------------------
|
||||
*/
|
||||
//
|
||||
// Utility functions used in nf-core DSL2 module files
|
||||
//
|
||||
|
||||
/*
|
||||
* Extract name of software tool from process name using $task.process
|
||||
*/
|
||||
//
|
||||
// Extract name of software tool from process name using $task.process
|
||||
//
|
||||
def getSoftwareName(task_process) {
|
||||
return task_process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()
|
||||
}
|
||||
|
||||
/*
|
||||
* Function to initialise default values and to generate a Groovy Map of available options for nf-core modules
|
||||
*/
|
||||
//
|
||||
// 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 ?: ''
|
||||
|
@ -26,18 +24,18 @@ def initOptions(Map args) {
|
|||
return options
|
||||
}
|
||||
|
||||
/*
|
||||
* Tidy up and join elements of a list to return a path string
|
||||
*/
|
||||
//
|
||||
// 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
|
||||
*/
|
||||
//
|
||||
// Function to save/publish module results
|
||||
//
|
||||
def saveFiles(Map args) {
|
||||
if (!args.filename.endsWith('.version.txt')) {
|
||||
def ioptions = initOptions(args.options)
|
||||
|
|
|
@ -11,11 +11,11 @@ process LAST_TRAIN {
|
|||
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::last=1219" : null)
|
||||
conda (params.enable_conda ? "bioconda::last=1238" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/last:1219--h2e03b76_0"
|
||||
container "https://depot.galaxyproject.org/singularity/last:1238--h2e03b76_0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/last:1219--h2e03b76_0"
|
||||
container "quay.io/biocontainers/last:1238--h2e03b76_0"
|
||||
}
|
||||
|
||||
input:
|
||||
|
@ -30,7 +30,7 @@ process LAST_TRAIN {
|
|||
def software = getSoftwareName(task.process)
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
"""
|
||||
INDEX_NAME=`find -L lastdb/ -name "*.bck" | sed 's/.bck//' | sed 's,lastdb/,,'`
|
||||
INDEX_NAME=\$(basename \$(ls $index/*.des) .des)
|
||||
|
||||
last-train \\
|
||||
$options.args \\
|
||||
|
|
|
@ -9,15 +9,5 @@ workflow test_last_dotplot {
|
|||
input = [ [ id:'test' ], // meta map
|
||||
file(params.test_data['sarscov2']['genome']['contigs_genome_maf_gz'], checkIfExists: true) ]
|
||||
|
||||
LAST_DOTPLOT ( input )
|
||||
}
|
||||
|
||||
include { LAST_DOTPLOT as LAST_DOTPLOT_GIF } from '../../../../software/last/dotplot/main.nf' addParams( options: [args2:'gif'] )
|
||||
|
||||
workflow test_last_dotplot_gif {
|
||||
|
||||
input = [ [ id:'test' ], // meta map
|
||||
file(params.test_data['sarscov2']['genome']['contigs_genome_maf_gz'], checkIfExists: true) ]
|
||||
|
||||
LAST_DOTPLOT_GIF ( input )
|
||||
LAST_DOTPLOT ( input, "png" )
|
||||
}
|
||||
|
|
|
@ -1,17 +1,8 @@
|
|||
- name: last dotplot test_last_dotplot
|
||||
command: nextflow run tests/software/last/dotplot -entry test_last_dotplot -c tests/config/nextflow.config
|
||||
tags:
|
||||
- last
|
||||
- last/dotplot
|
||||
- last
|
||||
files:
|
||||
- path: output/last/test.png
|
||||
md5sum: 6189aaf96f522cdb664869724997bbcd
|
||||
|
||||
- name: last dotplot test_last_dotplot_gif
|
||||
command: nextflow run tests/software/last/dotplot -entry test_last_dotplot_gif -c tests/config/nextflow.config
|
||||
tags:
|
||||
- last
|
||||
- last/dotplot
|
||||
files:
|
||||
- path: output/last/test.gif
|
||||
md5sum: 1dd2c85fb5495ca0e85c4ef1dcfce220
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
- last/lastal
|
||||
files:
|
||||
- path: output/last/contigs.genome.maf.gz
|
||||
md5sum: 33e9098d8242b0aac829339c03fe94aa
|
||||
md5sum: 2fc56553282d0826310bdef16a55e587
|
||||
- path: output/untar/lastdb/genome.bck
|
||||
md5sum: 5519879b9b6c4d1fc508da7f17f88f2e
|
||||
- path: output/untar/lastdb/genome.des
|
||||
|
@ -28,7 +28,7 @@
|
|||
- last/lastal
|
||||
files:
|
||||
- path: output/last/contigs.genome.maf.gz
|
||||
md5sum: 3a0f42e76da9549748983ac4d7ff7473
|
||||
md5sum: f50557bed5430b42de7b0d5d61075cf0
|
||||
- path: output/untar/lastdb/genome.bck
|
||||
md5sum: 5519879b9b6c4d1fc508da7f17f88f2e
|
||||
- path: output/untar/lastdb/genome.des
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
- name: last lastdb test_last_lastdb
|
||||
command: nextflow run tests/software/last/lastdb -entry test_last_lastdb -c tests/config/nextflow.config
|
||||
tags:
|
||||
- last
|
||||
- last/lastdb
|
||||
- last
|
||||
files:
|
||||
- path: output/last/lastdb/test.bck
|
||||
md5sum: 5519879b9b6c4d1fc508da7f17f88f2e
|
||||
- path: output/last/lastdb/test.des
|
||||
md5sum: 3a9ea6d336e113a74d7fdca5e7b623fc
|
||||
- path: output/last/lastdb/test.prj
|
||||
md5sum: 489715f14b0fea6273822696e72357f9
|
||||
md5sum: 2c981eb9b9d2012d8413946a5b378f20
|
||||
- path: output/last/lastdb/test.sds
|
||||
md5sum: 2cd381f4f8a9c52cfcd323a2863eccb2
|
||||
- path: output/last/lastdb/test.ssp
|
||||
|
@ -22,15 +22,15 @@
|
|||
- name: last lastdb test_last_lastdb_gzipped_input
|
||||
command: nextflow run tests/software/last/lastdb -entry test_last_lastdb_gzipped_input -c tests/config/nextflow.config
|
||||
tags:
|
||||
- last
|
||||
- last/lastdb
|
||||
- last
|
||||
files:
|
||||
- path: output/last/lastdb/test.bck
|
||||
md5sum: 8692b1229b1fff1c2d39c4c610ff842b
|
||||
- path: output/last/lastdb/test.des
|
||||
md5sum: 26ab49015cc572172b9efa50fc5190bc
|
||||
- path: output/last/lastdb/test.prj
|
||||
md5sum: a302beb8b8b884d8450055ede61e973b
|
||||
md5sum: aec51a18da1c2361aaca70dd16eb7b7b
|
||||
- path: output/last/lastdb/test.sds
|
||||
md5sum: cad9927d4bd161257e98165ad755d8e4
|
||||
- path: output/last/lastdb/test.ssp
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { LAST_MAFCONVERT } from '../../../../software/last/mafconvert/main.nf' addParams( options: ['format':'psl'] )
|
||||
include { LAST_MAFCONVERT } from '../../../../software/last/mafconvert/main.nf' addParams( options: [:] )
|
||||
|
||||
workflow test_last_mafconvert {
|
||||
|
||||
input = [ [ id:'contigs.genome' ], // meta map
|
||||
file(params.test_data['sarscov2']['genome']['contigs_genome_maf_gz'], checkIfExists: true) ]
|
||||
|
||||
LAST_MAFCONVERT ( input )
|
||||
LAST_MAFCONVERT ( input, "psl" )
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue