2021-03-24 16:14:52 +00:00
|
|
|
// Import generic module functions
|
2021-09-27 08:41:24 +00:00
|
|
|
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
2021-03-24 16:14:52 +00:00
|
|
|
|
|
|
|
params.options = [:]
|
|
|
|
options = initOptions(params.options)
|
|
|
|
|
|
|
|
process YARA_INDEX {
|
|
|
|
tag "$fasta"
|
|
|
|
label 'process_medium'
|
|
|
|
publishDir "${params.outdir}",
|
|
|
|
mode: params.publish_dir_mode,
|
2021-04-10 19:49:09 +00:00
|
|
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:'index', meta:[:], publish_by_meta:[]) }
|
2021-03-24 16:14:52 +00:00
|
|
|
|
|
|
|
conda (params.enable_conda ? "bioconda::yara=1.0.2" : null)
|
|
|
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
|
|
|
container "https://depot.galaxyproject.org/singularity/yara:1.0.2--2"
|
|
|
|
} else {
|
|
|
|
container "quay.io/biocontainers/yara:1.0.2--2"
|
|
|
|
}
|
|
|
|
|
|
|
|
input:
|
|
|
|
path fasta
|
|
|
|
|
|
|
|
output:
|
2021-09-28 13:37:47 +00:00
|
|
|
path "yara" , emit: index
|
2021-10-01 13:04:56 +00:00
|
|
|
path "versions.yml", emit: versions
|
2021-03-24 16:14:52 +00:00
|
|
|
|
|
|
|
script:
|
|
|
|
|
|
|
|
"""
|
|
|
|
mkdir yara
|
2021-09-28 13:37:47 +00:00
|
|
|
|
|
|
|
yara_indexer \\
|
|
|
|
$fasta \\
|
|
|
|
-o "yara"
|
|
|
|
|
2021-03-24 16:14:52 +00:00
|
|
|
mv *.{lf,rid,sa,txt}.* yara
|
|
|
|
cp $fasta yara/yara.fasta
|
|
|
|
|
2021-09-27 08:41:24 +00:00
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
|
|
${getProcessName(task.process)}:
|
2021-09-28 13:37:47 +00:00
|
|
|
${getSoftwareName(task.process)}: \$(echo \$(yara_indexer --version 2>&1) | sed 's/^.*yara_indexer version: //; s/ .*\$//')
|
2021-09-27 08:41:24 +00:00
|
|
|
END_VERSIONS
|
2021-03-24 16:14:52 +00:00
|
|
|
"""
|
|
|
|
}
|