mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 19:18:17 +00:00
031fbd37aa
* add instrain profile * module instrain/profile * add instrain profile * module instrain/profile * instrain profile * Update modules/instrain/profile/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/instrain/profile/meta.yml Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/instrain/profile/meta.yml Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/instrain/profile/meta.yml Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/instrain/profile/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/instrain/profile/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/instrain/profile/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * update * linting * Apply suggestions from code review * Update modules/instrain/profile/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>
44 lines
1.2 KiB
Text
44 lines
1.2 KiB
Text
process INSTRAIN_PROFILE {
|
|
tag "$meta.id"
|
|
label 'process_high'
|
|
|
|
conda (params.enable_conda ? "bioconda::instrain=1.6.1" : null)
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
'https://depot.galaxyproject.org/singularity/instrain:1.6.1--pyhdfd78af_0':
|
|
'quay.io/biocontainers/instrain:1.6.1--pyhdfd78af_0' }"
|
|
|
|
input:
|
|
tuple val(meta), path(bam)
|
|
path genome_fasta
|
|
path genes_fasta
|
|
path stb_file
|
|
|
|
output:
|
|
tuple val(meta), path("*.IS") , emit: profile
|
|
path "versions.yml" , emit: versions
|
|
|
|
when:
|
|
task.ext.when == null || task.ext.when
|
|
|
|
script:
|
|
def args = task.ext.args ?: ''
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
|
def genes_args = genes_fasta ? "-g ${genes_fasta}": ''
|
|
def stb_args = stb_file ? "-s ${stb_file}": ''
|
|
"""
|
|
inStrain \\
|
|
profile \\
|
|
$bam \\
|
|
$genome_fasta \\
|
|
-o ${prefix}.IS \\
|
|
-p $task.cpus \\
|
|
$genes_args \\
|
|
$stb_args \\
|
|
$args
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
instrain: \$(echo \$(inStrain profile --version 2>&1) | awk 'NF{ print \$NF }')
|
|
END_VERSIONS
|
|
"""
|
|
}
|