2021-11-15 18:32:53 +00:00
|
|
|
process NCBIGENOMEDOWNLOAD {
|
|
|
|
tag "$meta.id"
|
|
|
|
label 'process_low'
|
|
|
|
|
2022-08-22 10:18:09 +00:00
|
|
|
conda (params.enable_conda ? "bioconda::ncbi-genome-download=0.3.1" : null)
|
2021-11-26 07:58:40 +00:00
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
2022-08-22 10:18:09 +00:00
|
|
|
'https://depot.galaxyproject.org/singularity/ncbi-genome-download:0.3.1--pyh5e36f6f_0' :
|
|
|
|
'quay.io/biocontainers/ncbi-genome-download:0.3.1--pyh5e36f6f_0' }"
|
2021-11-15 18:32:53 +00:00
|
|
|
|
|
|
|
input:
|
|
|
|
val meta
|
|
|
|
path accessions
|
|
|
|
|
|
|
|
output:
|
|
|
|
tuple val(meta), path("*_genomic.gbff.gz") , emit: gbk , optional: true
|
|
|
|
tuple val(meta), path("*_genomic.fna.gz") , emit: fna , optional: true
|
|
|
|
tuple val(meta), path("*_rm.out.gz") , emit: rm , optional: true
|
|
|
|
tuple val(meta), path("*_feature_table.txt.gz") , emit: features, optional: true
|
|
|
|
tuple val(meta), path("*_genomic.gff.gz") , emit: gff , optional: true
|
|
|
|
tuple val(meta), path("*_protein.faa.gz") , emit: faa , optional: true
|
|
|
|
tuple val(meta), path("*_protein.gpff.gz") , emit: gpff , optional: true
|
|
|
|
tuple val(meta), path("*_wgsmaster.gbff.gz") , emit: wgs_gbk , optional: true
|
|
|
|
tuple val(meta), path("*_cds_from_genomic.fna.gz"), emit: cds , optional: true
|
|
|
|
tuple val(meta), path("*_rna.fna.gz") , emit: rna , optional: true
|
|
|
|
tuple val(meta), path("*_rna_from_genomic.fna.gz"), emit: rna_fna , optional: true
|
|
|
|
tuple val(meta), path("*_assembly_report.txt") , emit: report , optional: true
|
|
|
|
tuple val(meta), path("*_assembly_stats.txt") , emit: stats , optional: true
|
|
|
|
path "versions.yml" , emit: versions
|
|
|
|
|
2022-02-04 08:53:32 +00:00
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
2021-11-15 18:32:53 +00:00
|
|
|
script:
|
2021-11-26 07:58:40 +00:00
|
|
|
def args = task.ext.args ?: ''
|
2021-12-02 12:39:55 +00:00
|
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
2021-11-15 18:32:53 +00:00
|
|
|
def accessions_opt = accessions ? "-A ${accessions}" : ""
|
|
|
|
"""
|
|
|
|
ncbi-genome-download \\
|
2021-11-26 07:58:40 +00:00
|
|
|
$args \\
|
2021-11-15 18:32:53 +00:00
|
|
|
$accessions_opt \\
|
|
|
|
--output-folder ./ \\
|
|
|
|
--flat-output
|
|
|
|
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
2021-11-26 07:58:40 +00:00
|
|
|
"${task.process}":
|
|
|
|
ncbigenomedownload: \$( ncbi-genome-download --version )
|
2021-11-15 18:32:53 +00:00
|
|
|
END_VERSIONS
|
|
|
|
"""
|
|
|
|
}
|