Hello everyone, I am trying to run this tool Genom...
# help
n
Hello everyone, I am trying to run this tool Genomad Using this script:
#!/usr/bin/env nextflow
nextflow.enable.dsl=2 params.input = "./data/*.fna" process GENOMAD { container 'antoniopcamargo/genomad:latest' publishDir params.outdir, mode: 'genomad' input: path fasta output: path "genomad_out" script: """ mkdir -p genomad_out genomad end-to-end \ "${fasta}" \ genomad_out \ ./genomad_db ls -R genomad_out """ } workflow { fasta_ch=Channel.fromPath(params.input) GENOMAD(fasta_ch) } Please help me promt says that can not found genomad_out folder
a
Looking at your inputs, are you sure that the genomad_db is included in the container? Based on the documentation, I don't think this is the case. Anyways, even if it is included in the container, it isn't located in the task's working directory, so you need to provide the proper location. Most likely, you should download it first and provide it as a process input.
n
Thanks! How I can provide as a process input?
a
You just provide it either in the same input channel
tuple path(fasta), path(db)
or as a second input channel:
Copy code
input
path fasta
path db
But why don't you use the nf-core module instead of reinventing the wheel? github.com/nf-core/modules/blob/…/main.nf
n
Hi Thanks! I already chenge the main with the modules of sequera but still not working , code looks like this: process GENOMAD_DOWNLOAD { label 'process_single' conda "${moduleDir}/environment.yml" container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'community-cr-prod.seqera.io/docker/…/data' : 'community.wave.seqera.io/library/genomad:1.12.0--17634a7f0b465d30'}" output: path "genomad_db/" , emit: genomad_db tuple val("${task.process}"), val('genomad'), eval("genomad --version 2>&1 | sed 's/^.*geNomad, version //; s/ .*//'"), topic: versions, emit: versions_genomad when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' """ genomad \\ download-database \\ ${args} \\ . """ stub: """ mkdir genomad_db touch genomad_db/genomad_db touch genomad_db/genomad_db.dbtype touch genomad_db/genomad_db.index touch genomad_db/genomad_db.lookup touch genomad_db/genomad_db.source touch genomad_db/genomad_db_h touch genomad_db/genomad_db_h.dbtype touch genomad_db/genomad_db_h.index touch genomad_db/genomad_db_mapping touch genomad_db/genomad_db_taxonomy touch genomad_db/genomad_integrase_db touch genomad_db/genomad_integrase_db.dbtype touch genomad_db/genomad_integrase_db.index touch genomad_db/genomad_integrase_db.lookup touch genomad_db/genomad_integrase_db.source touch genomad_db/genomad_integrase_db_h touch genomad_db/genomad_integrase_db_h.dbtype touch genomad_db/genomad_integrase_db_h.index touch genomad_db/genomad_marker_metadata.tsv touch genomad_db/genomad_mini_db touch genomad_db/genomad_mini_db.dbtype touch genomad_db/genomad_mini_db.index touch genomad_db/genomad_mini_db.lookup touch genomad_db/genomad_mini_db.source touch genomad_db/genomad_mini_db_h touch genomad_db/genomad_mini_db_h.dbtype touch genomad_db/genomad_mini_db_h.index touch genomad_db/genomad_mini_db_mapping touch genomad_db/genomad_mini_db_taxonomy touch genomad_db/mini_set_ids touch genomad_db/names.dmp touch genomad_db/nodes.dmp touch genomad_db/plasmid_hallmark_annotation.txt touch genomad_db/version.txt touch genomad_db/virus_hallmark_annotation.txt """ } process GENOMAD_ENDTOEND { tag "${meta.id}" label 'process_high' conda "${moduleDir}/environment.yml" container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'community-cr-prod.seqera.io/docker/…/data' : 'community.wave.seqera.io/library/genomad:1.12.0--17634a7f0b465d30'}" input: tuple val(meta), path(fasta) path genomad_db output: tuple val(meta), path("*_aggregated_classification/*_aggregated_classification.tsv") , emit: aggregated_classification, optional: true tuple val(meta), path("*_marker_classification/*_marker_classification.tsv") , emit: marker_classification, optional: true tuple val(meta), path("*_annotate/*_taxonomy.tsv") , emit: taxonomy tuple val(meta), path("*_find_proviruses/*_provirus.tsv") , emit: provirus tuple val(meta), path("*_score_calibration/*_compositions.tsv") , emit: compositions, optional: true tuple val(meta), path("*_score_calibration/*_calibrated_aggregated_classification.tsv"), emit: calibrated_classification, optional: true tuple val(meta), path("*_summary/*_plasmid.fna.gz") , emit: plasmid_fasta tuple val(meta), path("*_summary/*_plasmid_genes.tsv") , emit: plasmid_genes tuple val(meta), path("*_summary/*_plasmid_proteins.faa.gz") , emit: plasmid_proteins tuple val(meta), path("*_summary/*_plasmid_summary.tsv") , emit: plasmid_summary tuple val(meta), path("*_summary/*_virus.fna.gz") , emit: virus_fasta tuple val(meta), path("*_summary/*_virus_genes.tsv") , emit: virus_genes tuple val(meta), path("*_summary/*_virus_proteins.faa.gz") , emit: virus_proteins tuple val(meta), path("*_summary/*_virus_summary.tsv") , emit: virus_summary tuple val("${task.process}"), val('genomad'), eval("genomad --version 2>&1 | sed 's/^.*geNomad, version //; s/ .*//'"), topic: versions, emit: versions_genomad when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' """ genomad \\ end-to-end \\ ${fasta} \\ ./ \\ ${genomad_db} \\ --threads ${task.cpus} \\ ${args} gzip ./**/*.fna gzip ./**/*.faa """ stub: def args = task.ext.args ?: '' def filename = "${fasta}"[0..<"${fasta}".lastIndexOf('.')] """ echo ${args} mkdir ${filename}_aggregated_classification touch ${filename}_aggregated_classification/${filename}_aggregated_classification.tsv mkdir ${filename}_annotate touch ${filename}_annotate/${filename}_taxonomy.tsv mkdir ${filename}_find_proviruses touch ${filename}_find_proviruses/${filename}_provirus.tsv mkdir ${filename}_marker_classification touch ${filename}_marker_classification/${filename}_marker_classification.tsv mkdir ${filename}_nn_classification mkdir ${filename}_score_calibration touch ${filename}_score_calibration/${filename}_calibrated_aggregated_classification.tsv touch ${filename}_score_calibration/${filename}_compositions.tsv mkdir ${filename}_summary echo "" | gzip > ${filename}_summary/${filename}_plasmid.fna.gz touch ${filename}_summary/${filename}_plasmid_genes.tsv echo "" | gzip > ${filename}_summary/${filename}_plasmid_proteins.faa.gz touch ${filename}_summary/${filename}_plasmid_summary.tsv echo "" | gzip > ${filename}_summary/${filename}_virus.fna.gz touch ${filename}_summary/${filename}_virus_genes.tsv echo "" | gzip > ${filename}_summary/${filename}_virus_proteins.faa.gz touch ${filename}_summary/${filename}_virus_summary.tsv """ } thr db is not geneting and any of the fastas process.
i
nf-core modules will not work if you just copy-paste the script into your
<http://main.nf|main.nf>
. You have to put them in separate directories under
modules/
. If you want to write code using nf-core components, I suggest going through the nf-core training first.
✅ 1