From fe619780915858f190d4b6a4c82a00c68ee19ab4 Mon Sep 17 00:00:00 2001 From: Ekaterina Sakharova Date: Thu, 9 Jul 2026 14:16:06 +0100 Subject: [PATCH 1/4] start changing --- README.md | 2 +- assets/multiqc_config.yml | 2 +- assets/schema_input_genome.json | 3 +- conf/test_mag_no_quality.conf | 1 + {assets => docs/images}/seqsubmit_schema.png | Bin docs/methods.md | 2 +- docs/usage.md | 64 +++++++++--------- .../local/generate_assembly_manifest/main.nf | 12 +--- modules/local/genome_upload/main.nf | 2 +- nextflow.config | 2 +- subworkflows/local/fasta_validation/main.nf | 4 +- .../utils_nfcore_seqsubmit_pipeline/main.nf | 4 +- workflows/assemblysubmit.nf | 1 - 13 files changed, 45 insertions(+), 54 deletions(-) rename {assets => docs/images}/seqsubmit_schema.png (100%) diff --git a/README.md b/README.md index 40f2f6e..63a854a 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Currently, the pipeline supports four submission modes, each routed to a dedicat - `metagenomic_assemblies` for assembly submission with `ASSEMBLYSUBMIT` workflow - `reads` for raw sequencing reads submission with `READSUBMIT` workflow -![seqsubmit workflow diagram](assets/seqsubmit_schema.png) +![seqsubmit workflow diagram](docs/images/seqsubmit_schema.png) ## Requirements diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 5df001f..eb16eaf 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -28,7 +28,7 @@ sp: genome_metadata: fn_re: ".*genomes_metadata.tsv$" sample_registration: - fn_re: '.*registered.*\.tsv$' + fn_re: '.*registered\.*\.tsv$' submission_results_genomes: fn_re: 'genomes_accessions\.tsv$' submission_results_assemblies: diff --git a/assets/schema_input_genome.json b/assets/schema_input_genome.json index f851f85..e0aef2b 100644 --- a/assets/schema_input_genome.json +++ b/assets/schema_input_genome.json @@ -91,7 +91,8 @@ }, "co-assembly": { "type": "string", - "description": "Yes if data was co-assembled, No otherwise" + "description": "'Yes' if data was co-assembled, 'No' otherwise", + "pattern": ['Yes'|'No'] }, "broad_environment": { "type": "string", diff --git a/conf/test_mag_no_quality.conf b/conf/test_mag_no_quality.conf index 9d3724a..656bffe 100644 --- a/conf/test_mag_no_quality.conf +++ b/conf/test_mag_no_quality.conf @@ -34,6 +34,7 @@ params { cat_db = null // CheckM2 doesn't allow usage of small test database, so real database will be downloaded during the test run, // which is not ideal but necessary to test the pipeline's behaviour with missing quality values + // Track upstream issue here: https://github.com/chklovski/CheckM2/issues/140 checkm2_db = null } diff --git a/assets/seqsubmit_schema.png b/docs/images/seqsubmit_schema.png similarity index 100% rename from assets/seqsubmit_schema.png rename to docs/images/seqsubmit_schema.png diff --git a/docs/methods.md b/docs/methods.md index 0f15a33..80123ab 100644 --- a/docs/methods.md +++ b/docs/methods.md @@ -98,7 +98,7 @@ Genome coverage values from `coverm genome` output TSV are parsed and merged int ### Taxonomy assignment -If `NCBI_lineage` is already present in the input samlesheet, the value is retained. If it is missing, the workflow runs taxonomy classification using the `CAT_pack` tool. +If `NCBI_lineage` is already present in the input samplesheet, the value is retained. If it is missing, the workflow runs taxonomy classification using the `CAT_pack` tool. Before classification, input FASTA files are normalized to a `.fasta` suffix by `RENAME_FASTA_FOR_CATPACK`. Classification is then run in bin mode (`CAT_pack bins`, followed by `CAT_pack add_names`). diff --git a/docs/usage.md b/docs/usage.md index 7d3b5ef..00274a4 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -51,27 +51,27 @@ mag_001,data/mag_001.fasta.gz,SRR24458089,,,SPAdes 3.15.5,MetaBAT2 2.15,default, > [!IMPORTANT] > **Samplesheet column requirements**: All columns shown in the example above must be present in your samplesheet, even if some values are empty. Columns must be in exactly the same order as shown. -| Column | Description | -| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sample` | A unique identifier for this data entry. Must be globally unique within the input dataset (used as `meta.id` throughout the pipeline). | -| `fasta` | Path to MAG/bin contigs in FASTA format compressed with `gzip`. All names of the FASTA files must be unique to prevent pipeline errors. | -| `accession` | ENA accession of the run or metagenomic assembly used to generate the MAG/bin. | -| `fastq_1` | Path to the read file in FASTQ format used to generate the source metagenomic assembly. Required if `genome_coverage` is not provided. | -| `fastq_2` | Path to the second read file in FASTQ format for paired-end data used to generate the source metagenomic assembly. Leave empty for single-end reads. | -| `assembly_software` | Tool name and version that were used to generate the source metagenomic assembly. | -| `binning_software` | Binning tool, including version, that was used to generate the bins. | -| `binning_parameters` | Arguments that were used during binning. | -| `stats_generation_software` | Tool, including version, that was used to calculate completeness and contamination. | -| `completeness` | Genome completeness value. | -| `contamination` | Genome contamination value. | -| `genome_coverage` | Estimated average sequencing depth across the genome. If the value is missing, it is computed automatically during pipeline execution when reads are provided. | -| `metagenome` | Registered metagenome taxonomic identifier or name that matches an existing ENA taxonomy entry. For more details see https://ena-docs.readthedocs.io/en/latest/faq/taxonomy.html | -| `co-assembly` | Whether a co-assembly strategy was used for the initial metagenomic assembly generation. Options: Yes or No. | -| `broad_environment` | Broad ecological context of the sample, for example 'marine biome', 'desert biome'. It is recommended to use subclasses of EnvO 'biome' class (http://purl.obolibrary.org/obo/ENVO_00000428) | -| `local_environment` | Local environmental context of the sample, for example 'tropical dry broadleaf forest biome', 'marine abyssal zone biome'. It is recommended to use EnvO terms which are of smaller spatial grain than your entry for "broad-scale environmental context". | +| Column | Description | +| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `sample` | A unique identifier for this data entry. Must be globally unique within the input dataset. | +| `fasta` | Path to MAG/bin contigs in FASTA format compressed with `gzip`. All names of the FASTA files must be unique to prevent pipeline errors. | +| `accession` | ENA accession of the run or metagenomic assembly used to generate the MAG/bin. | +| `fastq_1` | Path to the read file in FASTQ format used to generate the source metagenomic assembly. Required if `genome_coverage` is not provided. | +| `fastq_2` | Path to the second read file in FASTQ format for paired-end data used to generate the source metagenomic assembly. Leave empty for single-end reads. | +| `assembly_software` | Tool name and version that were used to generate the source metagenomic assembly. | +| `binning_software` | Binning tool, including version, that was used to generate the bins. | +| `binning_parameters` | Arguments that were used during binning. | +| `stats_generation_software` | Tool, including version, that was used to calculate completeness and contamination. | +| `completeness` | Genome completeness value. | +| `contamination` | Genome contamination value. | +| `genome_coverage` | Estimated average sequencing depth across the genome. If the value is missing, it is computed automatically during pipeline execution when reads are provided. | +| `metagenome` | Registered metagenome taxonomic identifier or name that matches an existing ENA taxonomy entry. For more details see https://ena-docs.readthedocs.io/en/latest/faq/taxonomy.html | +| `co-assembly` | Whether a co-assembly strategy was used for the initial metagenomic assembly generation. Options: Yes or No. | +| `broad_environment` | Broad ecological context of the sample, for example 'marine biome', 'desert biome'. It is recommended to use subclasses of EnvO 'biome' class (http://purl.obolibrary.org/obo/ENVO_00000428) | +| `local_environment` | Local environmental context of the sample, for example 'tropical dry broadleaf forest biome', 'marine abyssal zone biome'. It is recommended to use EnvO terms which are of smaller spatial grain than your entry for "broad-scale environmental context". | | `environmental_medium` | Material displaced by the sample, or the material in which the sample was embedded before sampling, for example 'mucus', 'lake water'. It is recommended to use subclasses of EnvO 'environmental material' class (http://purl.obolibrary.org/obo/ENVO_00010483). | -| `RNA_presence` | Presence or absence of the 23S, 16S, and 5S rRNA genes and at least 18 tRNAs. This is used for MISAG/MIMAG assembly quality classification. Options: Yes or No. | -| `NCBI_lineage` | NCBI taxonomy lineage of the genome. Can be composted of either numerical IDs or taxon names separated by ";". | +| `RNA_presence` | Presence or absence of the 23S, 16S, and 5S rRNA genes and at least 18 tRNAs. This is used for MISAG/MIMAG assembly quality classification. Options: Yes or No. | +| `NCBI_lineage` | NCBI taxonomy lineage of the genome. Can be composted of either numerical IDs or taxon names separated by ";". | > [!NOTE] > More information about envioronment tags can be found at checklists [ERC000050](https://www.ebi.ac.uk/ena/browser/view/ERC000050) for bins and [ERC000047](https://www.ebi.ac.uk/ena/browser/view/ERC000047) for MAGs under the field names "broad-scale environmental context", "local environmental context", and "environmental medium". @@ -93,16 +93,16 @@ assembly_002,data/assembly_002.fasta.gz,,,42.7,ERR011323,MEGAHIT,1.2.9 > [!IMPORTANT] > **Samplesheet column requirements**: All columns shown in the example above must be present in your samplesheet, even if some values are empty. Columns must be in exactly the same order as shown. -| Column | Description | -| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sample` | A unique identifier for this data entry. Must be globally unique within the input dataset (used as `meta.id` throughout the pipeline). | -| `fasta` | Path to assembly contigs in FASTA format compressed with `gzip`. | -| `fastq_1` | Path to the read file in FASTQ format used to generate the metagenomic assembly. Required if `coverage` is not provided. | -| `fastq_2` | Path to the second read file in FASTQ format for paired-end data used to generate the source metagenomic assembly. Leave empty for single-end reads. | +| Column | Description | +| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| `sample` | A unique identifier for this data entry. Must be globally unique within the input dataset. | +| `fasta` | Path to assembly contigs in FASTA format compressed with `gzip`. | +| `fastq_1` | Path to the read file in FASTQ format used to generate the metagenomic assembly. Required if `coverage` is not provided. | +| `fastq_2` | Path to the second read file in FASTQ format for paired-end data used to generate the source metagenomic assembly. Leave empty for single-end reads. | | `coverage` | Estimated sequencing depth of the assembly. If this value is missing, it is computed automatically during pipeline execution when reads are provided. | -| `run_accession` | ENA run accession for the reads used to generate the metagenomic assembly. Reads must already be submitted to ENA. | -| `assembler` | Name of the assembler software used to generate the assembly. | -| `assembler_version` | Version of the assembler software used to generate the assembly. | +| `run_accession` | ENA run accession for the reads used to generate the metagenomic assembly. Reads must already be submitted to ENA. | +| `assembler` | Name of the assembler software used to generate the assembly. | +| `assembler_version` | Version of the assembler software used to generate the assembly. | An example file is available at [assets/samplesheet_assembly.csv](../assets/samplesheet_assembly.csv). @@ -246,7 +246,7 @@ Key parameters: | `--webincli_mode` | Webin-CLI mode for ENA interaction: `submit` uploads data, `validate` performs validation only. | | `--upload_tpa` | Mark assemblies as third party assemblies when required. | -Test example for `mags` run with docker: +Example `mags` mode upload to TEST server, run command with docker: ```bash nextflow run nf-core/seqsubmit \ @@ -260,7 +260,7 @@ nextflow run nf-core/seqsubmit \ --outdir results/validate_mags ``` -Test example for `metagenomic_assemblies` run with docker: +Example `metagenomic_assemblies` mode upload to TEST server, run command with docker: ```bash nextflow run nf-core/seqsubmit \ @@ -274,7 +274,7 @@ nextflow run nf-core/seqsubmit \ --outdir results/validate_assemblies ``` -Test example for `reads` run with docker: +Example `reads` mode upload to TEST server, run command with docker: ```bash nextflow run nf-core/seqsubmit \ diff --git a/modules/local/generate_assembly_manifest/main.nf b/modules/local/generate_assembly_manifest/main.nf index 4cc0121..90553c0 100644 --- a/modules/local/generate_assembly_manifest/main.nf +++ b/modules/local/generate_assembly_manifest/main.nf @@ -16,7 +16,7 @@ process GENERATE_ASSEMBLY_MANIFEST { output: tuple val(meta), path("${assembly_study}_upload/*.manifest") , emit: manifest - path "versions.yml", emit: versions + tuple val("${task.process}"), val('assembly_uploader'), eval("assembly_manifest --version | sed 's/assembly_uploader //'"), topic: versions when: task.ext.when == null || task.ext.when @@ -37,11 +37,6 @@ process GENERATE_ASSEMBLY_MANIFEST { ${test_flag} \\ ${is_private_flag} \\ ${args} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - assembly_uploader: \$(assembly_manifest --version | sed 's/assembly_uploader //') - END_VERSIONS """ stub: @@ -50,10 +45,5 @@ process GENERATE_ASSEMBLY_MANIFEST { """ mkdir ${assembly_study}_upload/ touch ${assembly_study}_upload/test.manifest - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - assembly_uploader: \$(assembly_manifest --version | sed 's/assembly_uploader //') - END_VERSIONS """ } diff --git a/modules/local/genome_upload/main.nf b/modules/local/genome_upload/main.nf index 651b281..095d9ca 100644 --- a/modules/local/genome_upload/main.nf +++ b/modules/local/genome_upload/main.nf @@ -22,7 +22,7 @@ process GENOME_UPLOAD { path "results/{MAG,bin}_upload/ENA_backup.json" , emit: ena_upload_backup_json path "results/{MAG,bin}_upload/genome_samples.xml" , emit: upload_genome_samples path "results/{MAG,bin}_upload/registered_{MAGs,bins}*.tsv", emit: upload_registered_mags - tuple val("${task.process}"), val('genome_uploader'), eval("genome_upload --version 2>&1 | sed 's/genome_uploader //g'"), topic: versions, emit: versions_genome_uploader + tuple val("${task.process}"), val('genome_uploader'), eval("genome_upload --version 2>&1 | sed 's/genome_uploader //g'"), topic: versions when: task.ext.when == null || task.ext.when diff --git a/nextflow.config b/nextflow.config index eaad0b8..2cef81c 100644 --- a/nextflow.config +++ b/nextflow.config @@ -243,7 +243,7 @@ profiles { test { includeConfig 'conf/test.config' } test_full { includeConfig 'conf/test_full.config' } test_mag_complete_metadata { includeConfig 'conf/test_mag_complete_metadata.conf' } - test_mag_no_study_complete_metadata { includeConfig 'conf/test_mag_no_study_complete_metadata.config' } + test_mag_no_study_complete_metadata { includeConfig 'conf/test_mag_no_study_complete_metadata.config' } test_mag_no_coverage_single_reads { includeConfig 'conf/test_mag_no_coverage_single_reads.conf' } test_mag_no_coverage_paired_reads { includeConfig 'conf/test_mag_no_coverage_paired_reads.conf' } test_mag_no_quality { includeConfig 'conf/test_mag_no_quality.conf' } diff --git a/subworkflows/local/fasta_validation/main.nf b/subworkflows/local/fasta_validation/main.nf index 4d2d559..c59df83 100644 --- a/subworkflows/local/fasta_validation/main.nf +++ b/subworkflows/local/fasta_validation/main.nf @@ -8,7 +8,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -include { FALINT } from '../../../modules/nf-core/falint/main' +include { FALINT } from '../../../modules/nf-core/falint/main' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -63,5 +63,5 @@ workflow FASTA_VALIDATION { ) emit: - valid_fastas = valid_fastas + valid_fastas = valid_fastas // [meta, fasta_file] } diff --git a/subworkflows/local/utils_nfcore_seqsubmit_pipeline/main.nf b/subworkflows/local/utils_nfcore_seqsubmit_pipeline/main.nf index 1ac05e9..53fd0dc 100644 --- a/subworkflows/local/utils_nfcore_seqsubmit_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_seqsubmit_pipeline/main.nf @@ -237,12 +237,12 @@ def toolBibliographyText() { def reference_text = [ '
  • Richardson, L., Allen, B., Baldi, G., Beracochea, M., Bileschi, M. L., Burdett, T., ... & Finn, R. D. (2023). MGnify: the microbiome sequence data analysis resource in 2023. Nucleic acids research, 51(D1), D753-D759. doi: 10.1093/nar/gkac1080
  • ', '
  • Gurbich, T. A., Almeida, A., Beracochea, M., Burdett, T., Burgin, J., Cochrane, G., ... & Finn, R. D. (2023). MGnify genomes: a resource for biome-specific microbial genome catalogues. Journal of molecular biology, 435(14), 168016. doi: 10.1016/j.jmb.2023.168016
  • ', - '
  • webin-cli: David, Y., Alisha, A., Awais, A., Rajkumar, D., Dipayan, G., Muhammad, H., ... & Ugis, S. (2026). The European Nucleotide Archive in 2025. Nucleic Acids Research, 54(D1), D120-D127. doi: 10.1093/nar/gkaf1295
  • ', + '
  • David, Y., Alisha, A., Awais, A., Rajkumar, D., Dipayan, G., Muhammad, H., ... & Ugis, S. (2026). The European Nucleotide Archive in 2025. Nucleic Acids Research, 54(D1), D120-D127. doi: 10.1093/nar/gkaf1295
  • ', '
  • Edwards, R. (2023). linsalrob/py_fasta_validator: Compressy. doi: 10.5281/zenodo.5002710
  • ', '
  • Chklovski, A., Parks, D. H., Woodcroft, B. J., & Tyson, G. W. (2023). CheckM2: a rapid, scalable and accurate tool for assessing microbial genome quality using machine learning. Nature Methods, 20(8), 1203-1212. doi: 10.1038/s41592-023-01940-w
  • ', '
  • Aroney, S. T., Newell, R. J., Nissen, J. N., Camargo, A. P., Tyson, G. W., & Woodcroft, B. J. (2025). CoverM: read alignment statistics for metagenomics. Bioinformatics, 41(4), btaf147. doi: 10.1093/bioinformatics/btaf147
  • ', '
  • Von Meijenfeldt, F. B., Arkhipova, K., Cambuy, D. D., Coutinho, F. H., & Dutilh, B. E. (2019). Robust taxonomic classification of uncharted microbial sequences and bins with CAT and BAT. Genome biology, 20(1), 217. doi: 10.1038/s41467-024-47155-1
  • ', - '
  • barrnap: Seemann, T. (2014). barrnap: Bacterial ribosomal RNA predictor. barrnap: Bacterial ribosomal RNA predictor. vicbioinformatics.com
  • ', + '
  • Seemann, T. (2014). barrnap: Bacterial ribosomal RNA predictor. barrnap: Bacterial ribosomal RNA predictor. vicbioinformatics.com
  • ', '
  • Chan, P. P., Lin, B. Y., Mak, A. J., & Lowe, T. M. (2021). tRNAscan-SE 2.0: improved detection and functional classification of transfer RNA genes. Nucleic acids research, 49(16), 9077-9096. doi: 10.1093/nar/gkab688
  • ', '
  • Ewels, P., Magnusson, M., Lundin, S., & Käller, M. (2016). MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics , 32(19), 3047–3048. doi: 10.1093/bioinformatics/btw354
  • ' ].join(' ').trim() diff --git a/workflows/assemblysubmit.nf b/workflows/assemblysubmit.nf index 84a9dc8..f712b72 100644 --- a/workflows/assemblysubmit.nf +++ b/workflows/assemblysubmit.nf @@ -176,7 +176,6 @@ workflow ASSEMBLYSUBMIT { test_upload, is_private ) - ch_versions = ch_versions.mix(GENERATE_ASSEMBLY_MANIFEST.out.versions.first()) SUBMIT ( assemblies_with_coverage.join(GENERATE_ASSEMBLY_MANIFEST.out.manifest), From 3e9998f4f20f2fd36dd2b6215202071d1e1fba3d Mon Sep 17 00:00:00 2001 From: Ekaterina Sakharova Date: Thu, 9 Jul 2026 14:30:41 +0100 Subject: [PATCH 2/4] fix --- assets/schema_input_genome.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/schema_input_genome.json b/assets/schema_input_genome.json index e0aef2b..26b64ac 100644 --- a/assets/schema_input_genome.json +++ b/assets/schema_input_genome.json @@ -92,7 +92,7 @@ "co-assembly": { "type": "string", "description": "'Yes' if data was co-assembled, 'No' otherwise", - "pattern": ['Yes'|'No'] + "enum": ["Yes", "No"] }, "broad_environment": { "type": "string", From 67d436af06f56a0af45c15fa7ac1885bbc2628a1 Mon Sep 17 00:00:00 2001 From: Ekaterina Sakharova Date: Thu, 9 Jul 2026 15:02:32 +0100 Subject: [PATCH 3/4] add some links --- assets/schema_input_genome.json | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/assets/schema_input_genome.json b/assets/schema_input_genome.json index 26b64ac..65472dc 100644 --- a/assets/schema_input_genome.json +++ b/assets/schema_input_genome.json @@ -75,11 +75,15 @@ }, "completeness": { "type": "number", - "description": "MAG/bin completeness value" + "description": "MAG/bin completeness score: the ratio of observed single-copy marker genes to total single-copy marker genes in chosen marker gene set (%). ENA docs: https://ena-docs.readthedocs.io/en/latest/faq/metagenomes.html#how-is-the-quality-of-a-metagenomic-assembly-defined", + "exclusiveMinimum": 0, + "exclusiveMaximum": 100 }, "contamination": { "type": "number", - "description": "MAG/bin contamination value" + "description": "MAG/bin contamination score: the ratio of observed single-copy marker genes in ≥2 copies to total single-copy marker genes in chosen marker gene set (%). ENA docs: https://ena-docs.readthedocs.io/en/latest/faq/metagenomes.html#how-is-the-quality-of-a-metagenomic-assembly-defined", + "exclusiveMinimum": 0, + "exclusiveMaximum": 100 }, "genome_coverage": { "type": "number", @@ -87,32 +91,33 @@ }, "metagenome": { "type": "string", - "description": "ENA accepted metagenome name" + "description": "ENA accepted metagenome name. It needs to be listed in the taxonomy tree https://www.ebi.ac.uk/ena/browser/view/408169?show=tax-tree (you might need to press \"Tax tree - Show\" in the right most section of the page). Full list can also be found https://github.com/EBI-Metagenomics/genome_uploader/blob/main/genomeuploader/constants.py#L22" }, "co-assembly": { "type": "string", - "description": "'Yes' if data was co-assembled, 'No' otherwise", + "description": "'Yes' if data was co-assembled, 'No' otherwise. Options: 'Yes' or 'No'", "enum": ["Yes", "No"] }, "broad_environment": { "type": "string", - "description": "broad ecological context of a sample" + "description": "Broad ecological context of the sample, for example 'marine biome', 'desert biome'. It is recommended to use subclasses of EnvO 'biome' class (http://purl.obolibrary.org/obo/ENVO_00000428). Documentation: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS" }, "local_environment": { "type": "string", - "description": "local ecological context" + "description": "Local environmental context of the sample, for example 'tropical dry broadleaf forest biome', 'marine abyssal zone biome'. It is recommended to use EnvO terms which are of smaller spatial grain than your entry for \"broad-scale environmental context\". Documentation: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS" }, "environmental_medium": { "type": "string", - "description": "material displaced by the sample" + "description": "Material displaced by the sample, or the material in which the sample was embedded before sampling, for example 'mucus', 'lake water'. It is recommended to use subclasses of EnvO 'environmental material' class (http://purl.obolibrary.org/obo/ENVO_00010483). Documentation: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS" }, "RNA_presence": { "type": "string", - "description": "Yes/No if at least 18 tRNAs and 5S, 16S, 23S rRNA genes detected" + "description": "Presence or absence of the 23S, 16S, and 5S rRNA genes and at least 18 tRNAs. This is used for MISAG/MIMAG assembly quality classification. Options: 'Yes' or 'No'.", + "enum": ["Yes", "No"] }, "NCBI_lineage": { "type": "string", - "description": "full NCBI lineage - format: x;y;z" + "description": "full NCBI lineage - format: x;y;z. For example, the lineage for E. coli can be: 'Bacteria;Pseudomonadati;Pseudomonadota;Gammaproteobacteria;Enterobacterales;Enterobacteriaceae;Escherichia' or '2;1224;1236;91347;543;561;562'" } }, "required": [ From c11bab24fa76bdc982905fc41da18f94fd0ba875 Mon Sep 17 00:00:00 2001 From: Ekaterina Sakharova Date: Fri, 10 Jul 2026 12:13:14 +0100 Subject: [PATCH 4/4] more fixes --- conf/test_assembly_complete_metadata.config | 2 +- conf/test_mag_complete_metadata.conf | 2 +- docs/usage.md | 58 +++++++++---------- modules/local/count_rna/main.nf | 8 ++- modules/local/count_rna/meta.yml | 4 -- .../create_assembly_metadata_csv/meta.yml | 5 -- .../local/create_genome_metadata_tsv/meta.yml | 5 -- modules/local/ena_webin_cli_wrapper/main.nf | 12 ++++ modules/local/ena_webin_cli_wrapper/meta.yml | 5 -- .../local/generate_assembly_manifest/meta.yml | 4 -- modules/local/genome_upload/meta.yml | 4 -- modules/local/registerstudy/meta.yml | 5 -- .../local/rename_fasta_for_catpack/main.nf | 42 ++++++++------ nextflow_schema.json | 16 ++--- subworkflows/local/genome_evaluation/main.nf | 1 - subworkflows/local/rna_detection/main.nf | 2 - subworkflows/local/rna_detection/meta.yml | 5 -- .../utils_nfcore_seqsubmit_pipeline/main.nf | 5 +- workflows/assemblysubmit.nf | 4 +- workflows/genomesubmit.nf | 19 +++--- 20 files changed, 94 insertions(+), 114 deletions(-) diff --git a/conf/test_assembly_complete_metadata.config b/conf/test_assembly_complete_metadata.config index 16e4ccf..aa8c4d9 100644 --- a/conf/test_assembly_complete_metadata.config +++ b/conf/test_assembly_complete_metadata.config @@ -20,7 +20,7 @@ process { params { config_profile_name = 'Test --mode metagenomic_assemblies complete_metadata profile' - config_profile_description = 'Single-case assembly test with complete metadata values provided' + config_profile_description = 'Single-case assembly test with complete metadata in samplesheet. No statistics calculations will be performed; the pipeline will only upload the data. Study for submission was already registered and provided via --submission_study.' // Input data input = params.pipelines_testdata_base_path + 'seqsubmit/samplesheets/assembly_complete_metadata.csv' diff --git a/conf/test_mag_complete_metadata.conf b/conf/test_mag_complete_metadata.conf index a25e31b..e2d2489 100644 --- a/conf/test_mag_complete_metadata.conf +++ b/conf/test_mag_complete_metadata.conf @@ -20,7 +20,7 @@ process { params { config_profile_name = 'Test --mode mags complete_metadata profile' - config_profile_description = 'Single-case MAG test with complete metadata values provided' + config_profile_description = 'Single-case MAG test with complete metadata in samplesheet. No statistics or taxonomy calculations will be performed; the pipeline will only upload the data. Study for submission was already registered and provided via --submission_study.' // Input data input = params.pipelines_testdata_base_path + 'seqsubmit/samplesheets/mag_complete_metadata.csv' diff --git a/docs/usage.md b/docs/usage.md index 00274a4..756daa1 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -51,27 +51,27 @@ mag_001,data/mag_001.fasta.gz,SRR24458089,,,SPAdes 3.15.5,MetaBAT2 2.15,default, > [!IMPORTANT] > **Samplesheet column requirements**: All columns shown in the example above must be present in your samplesheet, even if some values are empty. Columns must be in exactly the same order as shown. -| Column | Description | -| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sample` | A unique identifier for this data entry. Must be globally unique within the input dataset. | -| `fasta` | Path to MAG/bin contigs in FASTA format compressed with `gzip`. All names of the FASTA files must be unique to prevent pipeline errors. | -| `accession` | ENA accession of the run or metagenomic assembly used to generate the MAG/bin. | -| `fastq_1` | Path to the read file in FASTQ format used to generate the source metagenomic assembly. Required if `genome_coverage` is not provided. | -| `fastq_2` | Path to the second read file in FASTQ format for paired-end data used to generate the source metagenomic assembly. Leave empty for single-end reads. | -| `assembly_software` | Tool name and version that were used to generate the source metagenomic assembly. | -| `binning_software` | Binning tool, including version, that was used to generate the bins. | -| `binning_parameters` | Arguments that were used during binning. | -| `stats_generation_software` | Tool, including version, that was used to calculate completeness and contamination. | -| `completeness` | Genome completeness value. | -| `contamination` | Genome contamination value. | -| `genome_coverage` | Estimated average sequencing depth across the genome. If the value is missing, it is computed automatically during pipeline execution when reads are provided. | -| `metagenome` | Registered metagenome taxonomic identifier or name that matches an existing ENA taxonomy entry. For more details see https://ena-docs.readthedocs.io/en/latest/faq/taxonomy.html | -| `co-assembly` | Whether a co-assembly strategy was used for the initial metagenomic assembly generation. Options: Yes or No. | -| `broad_environment` | Broad ecological context of the sample, for example 'marine biome', 'desert biome'. It is recommended to use subclasses of EnvO 'biome' class (http://purl.obolibrary.org/obo/ENVO_00000428) | -| `local_environment` | Local environmental context of the sample, for example 'tropical dry broadleaf forest biome', 'marine abyssal zone biome'. It is recommended to use EnvO terms which are of smaller spatial grain than your entry for "broad-scale environmental context". | +| Column | Description | +| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `sample` | A unique identifier for this data entry. Must be globally unique within the input dataset. | +| `fasta` | Path to MAG/bin contigs in FASTA format compressed with `gzip`. All names of the FASTA files must be unique to prevent pipeline errors. | +| `accession` | ENA accession of the run or metagenomic assembly used to generate the MAG/bin. | +| `fastq_1` | Path to the read file in FASTQ format used to generate the source metagenomic assembly. Required if `genome_coverage` is not provided. | +| `fastq_2` | Path to the second read file in FASTQ format for paired-end data used to generate the source metagenomic assembly. Leave empty for single-end reads. | +| `assembly_software` | Tool name and version that were used to generate the source metagenomic assembly. | +| `binning_software` | Binning tool, including version, that was used to generate the bins. | +| `binning_parameters` | Arguments that were used during binning. | +| `stats_generation_software` | Tool, including version, that was used to calculate completeness and contamination. | +| `completeness` | Genome completeness value. | +| `contamination` | Genome contamination value. | +| `genome_coverage` | Estimated average sequencing depth across the genome. If the value is missing, it is computed automatically during pipeline execution when reads are provided. | +| `metagenome` | Registered metagenome taxonomic identifier or name that matches an existing ENA taxonomy entry. For more details see https://ena-docs.readthedocs.io/en/latest/faq/taxonomy.html | +| `co-assembly` | Whether a co-assembly strategy was used for the initial metagenomic assembly generation. Options: Yes or No. | +| `broad_environment` | Broad ecological context of the sample, for example 'marine biome', 'desert biome'. It is recommended to use subclasses of EnvO 'biome' class (http://purl.obolibrary.org/obo/ENVO_00000428) | +| `local_environment` | Local environmental context of the sample, for example 'tropical dry broadleaf forest biome', 'marine abyssal zone biome'. It is recommended to use EnvO terms which are of smaller spatial grain than your entry for "broad-scale environmental context". | | `environmental_medium` | Material displaced by the sample, or the material in which the sample was embedded before sampling, for example 'mucus', 'lake water'. It is recommended to use subclasses of EnvO 'environmental material' class (http://purl.obolibrary.org/obo/ENVO_00010483). | -| `RNA_presence` | Presence or absence of the 23S, 16S, and 5S rRNA genes and at least 18 tRNAs. This is used for MISAG/MIMAG assembly quality classification. Options: Yes or No. | -| `NCBI_lineage` | NCBI taxonomy lineage of the genome. Can be composted of either numerical IDs or taxon names separated by ";". | +| `RNA_presence` | Presence or absence of the 23S, 16S, and 5S rRNA genes and at least 18 tRNAs. This is used for MISAG/MIMAG assembly quality classification. Options: Yes or No. | +| `NCBI_lineage` | NCBI taxonomy lineage of the genome. Can be composted of either numerical IDs or taxon names separated by ";". | > [!NOTE] > More information about envioronment tags can be found at checklists [ERC000050](https://www.ebi.ac.uk/ena/browser/view/ERC000050) for bins and [ERC000047](https://www.ebi.ac.uk/ena/browser/view/ERC000047) for MAGs under the field names "broad-scale environmental context", "local environmental context", and "environmental medium". @@ -93,16 +93,16 @@ assembly_002,data/assembly_002.fasta.gz,,,42.7,ERR011323,MEGAHIT,1.2.9 > [!IMPORTANT] > **Samplesheet column requirements**: All columns shown in the example above must be present in your samplesheet, even if some values are empty. Columns must be in exactly the same order as shown. -| Column | Description | -| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sample` | A unique identifier for this data entry. Must be globally unique within the input dataset. | -| `fasta` | Path to assembly contigs in FASTA format compressed with `gzip`. | -| `fastq_1` | Path to the read file in FASTQ format used to generate the metagenomic assembly. Required if `coverage` is not provided. | -| `fastq_2` | Path to the second read file in FASTQ format for paired-end data used to generate the source metagenomic assembly. Leave empty for single-end reads. | +| Column | Description | +| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `sample` | A unique identifier for this data entry. Must be globally unique within the input dataset. | +| `fasta` | Path to assembly contigs in FASTA format compressed with `gzip`. | +| `fastq_1` | Path to the read file in FASTQ format used to generate the metagenomic assembly. Required if `coverage` is not provided. | +| `fastq_2` | Path to the second read file in FASTQ format for paired-end data used to generate the source metagenomic assembly. Leave empty for single-end reads. | | `coverage` | Estimated sequencing depth of the assembly. If this value is missing, it is computed automatically during pipeline execution when reads are provided. | -| `run_accession` | ENA run accession for the reads used to generate the metagenomic assembly. Reads must already be submitted to ENA. | -| `assembler` | Name of the assembler software used to generate the assembly. | -| `assembler_version` | Version of the assembler software used to generate the assembly. | +| `run_accession` | ENA run accession for the reads used to generate the metagenomic assembly. Reads must already be submitted to ENA. | +| `assembler` | Name of the assembler software used to generate the assembly. | +| `assembler_version` | Version of the assembler software used to generate the assembly. | An example file is available at [assets/samplesheet_assembly.csv](../assets/samplesheet_assembly.csv). diff --git a/modules/local/count_rna/main.nf b/modules/local/count_rna/main.nf index b2594b7..2bf5758 100644 --- a/modules/local/count_rna/main.nf +++ b/modules/local/count_rna/main.nf @@ -20,15 +20,19 @@ process COUNT_RNA { tuple val(meta), path("*rna_decision.tsv"), emit: rna_decision tuple val("${task.process}"), val('python'), eval('python --version 2>&1 | sed "s/Python //g"'), topic: versions + when: + task.ext.when == null || task.ext.when + script: + def prefix = task.ext.prefix ?: "${meta.id}" """ count_rna.py \\ --trna ${trnas_stats} \\ --rrna ${rrna_gff} \\ - --name ${meta.id} \\ + --name ${prefix} \\ --trna-limit ${min_trna_count} \\ --rrna-limit ${min_rrna_percentage} \\ - --output ${meta.id}_rna_decision.tsv + --output ${prefix}_rna_decision.tsv """ stub: diff --git a/modules/local/count_rna/meta.yml b/modules/local/count_rna/meta.yml index d7e92f9..4b505cf 100644 --- a/modules/local/count_rna/meta.yml +++ b/modules/local/count_rna/meta.yml @@ -49,10 +49,6 @@ output: Tab-separated file containing genome ID and decision (Yes/No) on whether sufficient RNA genes are present pattern: "*_rna_decision.tsv" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" authors: - "@KateSakharova" diff --git a/modules/local/create_assembly_metadata_csv/meta.yml b/modules/local/create_assembly_metadata_csv/meta.yml index b1301c7..ffe7be4 100644 --- a/modules/local/create_assembly_metadata_csv/meta.yml +++ b/modules/local/create_assembly_metadata_csv/meta.yml @@ -36,11 +36,6 @@ output: type: file description: CSV file containing assembly metadata to be used as input for the assembly_uploader pattern: "*_assembly_metadata.csv" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" authors: - "@ochkalova" diff --git a/modules/local/create_genome_metadata_tsv/meta.yml b/modules/local/create_genome_metadata_tsv/meta.yml index 74752ad..83f79d3 100644 --- a/modules/local/create_genome_metadata_tsv/meta.yml +++ b/modules/local/create_genome_metadata_tsv/meta.yml @@ -48,11 +48,6 @@ output: type: file description: Tab-separated TSV file with genome metadata pattern: "*.tsv" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" authors: - "@ochkalova" diff --git a/modules/local/ena_webin_cli_wrapper/main.nf b/modules/local/ena_webin_cli_wrapper/main.nf index 6d62fda..7a68961 100644 --- a/modules/local/ena_webin_cli_wrapper/main.nf +++ b/modules/local/ena_webin_cli_wrapper/main.nf @@ -26,6 +26,9 @@ process ENA_WEBIN_CLI_WRAPPER { tuple val("${task.process}"), val('ena-webin-cli'), eval('ena-webin-cli -version'), topic: versions tuple val("${task.process}"), val('mgnify-pipelines-toolkit'), eval('python -c "import importlib.metadata; print(importlib.metadata.version(\'mgnify-pipelines-toolkit\'))"'), topic: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: "" def prefix = task.ext.prefix ?: "${meta.id}" @@ -40,4 +43,13 @@ process ENA_WEBIN_CLI_WRAPPER { ${test_flag} \\ ${args} """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + if (webincli_mode == "submit") { + """ + touch ${prefix}_accessions.tsv + """ + } + // there is no file for mode=validate } diff --git a/modules/local/ena_webin_cli_wrapper/meta.yml b/modules/local/ena_webin_cli_wrapper/meta.yml index e31a110..62deb91 100644 --- a/modules/local/ena_webin_cli_wrapper/meta.yml +++ b/modules/local/ena_webin_cli_wrapper/meta.yml @@ -47,11 +47,6 @@ output: TSV file containing the accession assigned by ENA for the submitted item. File has two columns: "alias" and "accession". pattern: "*_accessions.tsv" - - versions: - - "versions.yml": - type: file - description: File containing software versions. - pattern: "versions.yml" authors: - "@KateSakharova" diff --git a/modules/local/generate_assembly_manifest/meta.yml b/modules/local/generate_assembly_manifest/meta.yml index 6bd102b..1f9e1de 100644 --- a/modules/local/generate_assembly_manifest/meta.yml +++ b/modules/local/generate_assembly_manifest/meta.yml @@ -50,10 +50,6 @@ output: - manifest: type: file description: Manifest file required for submission with webin-cli. - - versions: - type: file - description: File containing software versions. - pattern: "versions.yml" authors: - "@fxquah" diff --git a/modules/local/genome_upload/meta.yml b/modules/local/genome_upload/meta.yml index 14b5412..4364cf2 100644 --- a/modules/local/genome_upload/meta.yml +++ b/modules/local/genome_upload/meta.yml @@ -61,10 +61,6 @@ output: type: file description: XML file required for ENA submission pattern: "*submission.xml" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" authors: - "@KateSakharova" diff --git a/modules/local/registerstudy/meta.yml b/modules/local/registerstudy/meta.yml index 803fc62..f4ca931 100644 --- a/modules/local/registerstudy/meta.yml +++ b/modules/local/registerstudy/meta.yml @@ -59,11 +59,6 @@ output: JSON file containing the submission results with keys: submitted (newly created accessions) and failed. pattern: "*_accessions.json" - - versions: - - "versions.yml": - type: file - description: File containing software versions - pattern: "versions.yml" authors: - "@timrozday" diff --git a/modules/local/rename_fasta_for_catpack/main.nf b/modules/local/rename_fasta_for_catpack/main.nf index 38ac856..e70cd15 100644 --- a/modules/local/rename_fasta_for_catpack/main.nf +++ b/modules/local/rename_fasta_for_catpack/main.nf @@ -13,24 +13,32 @@ process RENAME_FASTA_FOR_CATPACK { tuple val(meta), path("output/*.fasta"), emit: renamed_fasta tuple val("${task.process}"), val('bash'), eval('bash --version | head -n1 | sed "s/.*version //; s/ .*//"'), topic: versions + when: + task.ext.when == null || task.ext.when script: - def is_compressed = fasta.name.endsWith('.gz') - extension = '.fasta' - def base = fasta.name - .replaceAll(/\.gz$/, '') - .replaceAll(/\.(fa|fasta|fna)$/, '') - def output_name = base + extension + def is_compressed = fasta.name.endsWith('.gz') + extension = '.fasta' + def base = fasta.name + .replaceAll(/\.gz$/, '') + .replaceAll(/\.(fa|fasta|fna)$/, '') + def output_name = base + extension - if (is_compressed) { - """ - mkdir -p output - gunzip -c ${fasta} > output/${output_name} - """ - } else { - """ - mkdir -p output - ln -s ../${fasta} output/${output_name} - """ - } + if (is_compressed) { + """ + mkdir -p output + gunzip -c ${fasta} > output/${output_name} + """ + } else { + """ + mkdir -p output + ln -s ../${fasta} output/${output_name} + """ + } + + stub: + """ + mkdir -p output + touch output/${meta.id}.fasta + """ } diff --git a/nextflow_schema.json b/nextflow_schema.json index 59c6dc0..1548095 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -57,7 +57,7 @@ }, "trna_limit": { "type": "number", - "description": "Minimum number of tRNA.", + "description": "Minimum number of tRNA required to pass.", "default": 18, "fa_icon": "fas fa-users-cog" } @@ -71,9 +71,9 @@ "help_text": "Provide a path to pre-downloaded DB or DB id for automatic download", "properties": { "cat_db": { - "type": "string", + "type": "file-path", "description": "Path to local CAT_pack DB", - "help": "Database should be pre-downloaded using CATpack commands. The folder with database should contain sub-folders 'db' with files .dmnd, .fastaid2LCAtaxid, .taxids_with_multiple_offspring, etc. And subfolder 'tax' that should contain taxonomy files like .dmp, .taxdump.tar.gz, .prot.accession2taxid.FULL.gz, etc", + "help": "Database should be pre-downloaded using CATpack commands. The folder with database should contain sub-folders 'db' with files .dmnd, .fastaid2LCAtaxid, .taxids_with_multiple_offspring, etc, as well as subfolder 'tax' that should contain taxonomy files like .dmp, .taxdump.tar.gz, .prot.accession2taxid.FULL.gz, etc", "fa_icon": "fas fa-users-cog" }, "cat_db_download_id": { @@ -93,7 +93,7 @@ "help_text": "These options are used to run Checkm2 that will calculate completeness and contamination of genome if those were not provided as input", "properties": { "checkm2_db": { - "type": "string", + "type": "file-path", "description": "Path to pre-downloaded checkm2 database", "fa_icon": "fas fa-users-cog" }, @@ -268,7 +268,7 @@ }, "upload_tpa": { "type": "boolean", - "description": "Flag to control the type of assembly study (third party assembly or not)", + "description": "Flag to control the type of assembly study (third party assembly (TPA) or not). TPA description: https://www.ncbi.nlm.nih.gov/genbank/tpa/.", "default": false, "help": "Use this flag if the study is a third party assembly (TPA). Default: false" }, @@ -289,13 +289,13 @@ "type": "boolean", "description": "Use that flag if you are referring to private data in ENA", "default": false, - "help": "This flag is used during metadata fetch steps. If you are referring to private data (project/reads/assembly) set to True. That flag does NOT regulate privacy of your submission data (check --release_date)" + "help": "This flag is used during metadata fetch steps. Specify if you are referring to private data (project/reads/assembly). That flag does NOT regulate privacy of your submission data (check --release_date)" }, "release_date": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Use that flag if you want to keep your data private after submission", - "help": "This flag regulates privacy of created study for submission. If you want to keep your data private you need to specify a DATE when it can become public (YYYY-MM-DD, max 2 years from now)" + "help": "This flag regulates when the created study for submission will become publically available and indexed on the ENA. If you want to keep your data private until a later date, you need to specify a DATE when it can become public (YYYY-MM-DD, max 2 years from now)" }, "submission_study": { "type": "string", @@ -307,7 +307,7 @@ "format": "file-path", "exists": true, "description": "Path to study metadata file (JSON, CSV, or TSV) for registering a new ENA study. Required when submission_study is not provided.", - "help_text": "File containing study metadata fields (required: study_title and alias, optional: study_abstract, existing_study_type, etc.). Used by REGISTERSTUDY to create a new study in ENA when no existing submission_study accession is given.", + "help_text": "File containing study metadata fields (required: study_title and alias, optional: study_abstract, existing_study_type, etc.). Used by REGISTERSTUDY to create a new study in ENA when no existing submission_study accession is given. ENA documentation: https://ena-docs.readthedocs.io/en/latest/submit/study/programmatic.html", "fa_icon": "fas fa-file-alt" }, "webincli_mode": { diff --git a/subworkflows/local/genome_evaluation/main.nf b/subworkflows/local/genome_evaluation/main.nf index 758f903..4f4921f 100644 --- a/subworkflows/local/genome_evaluation/main.nf +++ b/subworkflows/local/genome_evaluation/main.nf @@ -27,7 +27,6 @@ workflow GENOME_EVALUATION { // only used if ch_checkm2_db is empty main: - ch_versions = channel.empty() // // Database preparation diff --git a/subworkflows/local/rna_detection/main.nf b/subworkflows/local/rna_detection/main.nf index bb0a23f..0cac5bb 100644 --- a/subworkflows/local/rna_detection/main.nf +++ b/subworkflows/local/rna_detection/main.nf @@ -26,7 +26,6 @@ workflow RNA_DETECTION { main: - ch_versions = channel.empty() BARRNAP( fasta.map {id, fasta_file -> [id, fasta_file, "bac"]} ) @@ -43,5 +42,4 @@ workflow RNA_DETECTION { emit: rna_detected = COUNT_RNA.out.rna_decision - versions = ch_versions } diff --git a/subworkflows/local/rna_detection/meta.yml b/subworkflows/local/rna_detection/meta.yml index 4650e92..84902ba 100644 --- a/subworkflows/local/rna_detection/meta.yml +++ b/subworkflows/local/rna_detection/meta.yml @@ -43,11 +43,6 @@ output: pattern: "*.tsv" ontologies: - edam: "http://edamontology.org/format_3475" # TSV - - versions: - type: file - description: | - Channel containing software versions. - Structure: versions authors: - "@KateSakharova" - "@ochkalova" diff --git a/subworkflows/local/utils_nfcore_seqsubmit_pipeline/main.nf b/subworkflows/local/utils_nfcore_seqsubmit_pipeline/main.nf index 53fd0dc..f65014a 100644 --- a/subworkflows/local/utils_nfcore_seqsubmit_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_seqsubmit_pipeline/main.nf @@ -112,10 +112,7 @@ workflow PIPELINE_INITIALISATION { } else if ( mode == "reads" ) { ch_samplesheet = channel .fromList(samplesheetToList(input, "${projectDir}/assets/schema_input_reads.json")) - } else { - error("Unknown mode specified: '${mode}'. Supported modes are 'mags', 'bins', 'metagenomic_assemblies', and 'reads'.") } - emit: samplesheet = ch_samplesheet versions = ch_versions @@ -200,7 +197,7 @@ def toolCitationText() { ].join(' ').trim() def preprocessing_tools = [ - "Input FASTA validation was done by py_fasta_validator (Edwards et al. 2023)." + "Input FASTA validation was done by fa-lint (https://github.com/GallVp/fa-lint)." ].join(' ').trim() def stats_tools = [ diff --git a/workflows/assemblysubmit.nf b/workflows/assemblysubmit.nf index f712b72..d599b59 100644 --- a/workflows/assemblysubmit.nf +++ b/workflows/assemblysubmit.nf @@ -231,8 +231,8 @@ workflow ASSEMBLYSUBMIT { : file("${projectDir}/assets/methods_description_template.yml", checkIfExists: true) def ch_methods_description = channel.value(methodsDescriptionText(ch_multiqc_custom_methods_description)) ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml', sort: true)) - ch_multiqc_files = ch_multiqc_files.mix(CONCAT_ACCESSIONS.out.file_out.map{meta, file -> file}) - ch_multiqc_files = ch_multiqc_files.mix(CONCAT_METADATA.out.file_out.map{meta, file -> file}) + ch_multiqc_files = ch_multiqc_files.mix(CONCAT_ACCESSIONS.out.file_out.map{_meta, file -> file}) + ch_multiqc_files = ch_multiqc_files.mix(CONCAT_METADATA.out.file_out.map{_meta, file -> file}) MULTIQC( ch_multiqc_files.flatten().collect().map { files -> [ diff --git a/workflows/genomesubmit.nf b/workflows/genomesubmit.nf index 8c1df8e..780a88e 100644 --- a/workflows/genomesubmit.nf +++ b/workflows/genomesubmit.nf @@ -150,7 +150,6 @@ workflow GENOMESUBMIT { trna_limit, rrna_limit ) - ch_versions = ch_versions.mix( RNA_DETECTION.out.versions ) // Update metadata for records missing RNA fasta_updated_with_rna = RNA_DETECTION.out.rna_detected.join(branched_rna_results.rna_prediction_input) @@ -304,13 +303,13 @@ workflow GENOMESUBMIT { } // Combine fasta and manifests ch_combined = fasta_updated_with_taxonomy - .map { meta, fasta -> [meta.id, meta, fasta] } - .join( - manifests_ch.map { meta, manifest -> [meta.id, manifest] } // Has only [id: prefix] - ) - .map { _id, full_meta, fasta, manifest -> - [full_meta, fasta, manifest] - } + .map { meta, fasta -> [meta.id, meta, fasta] } + .join( + manifests_ch.map { meta, manifest -> [meta.id, manifest] } // Has only [id: prefix] + ) + .map { _id, full_meta, fasta, manifest -> + [full_meta, fasta, manifest] + } // --------- Upload data to ENA @@ -369,9 +368,9 @@ workflow GENOMESUBMIT { : file("${projectDir}/assets/methods_description_template.yml", checkIfExists: true) def ch_methods_description = channel.value(methodsDescriptionText(ch_multiqc_custom_methods_description)) ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml', sort: true)) - ch_multiqc_files = ch_multiqc_files.mix(CONCAT_METADATA.out.file_out.map{meta, file -> file}) + ch_multiqc_files = ch_multiqc_files.mix(CONCAT_METADATA.out.file_out.map{_meta, file -> file}) ch_multiqc_files = ch_multiqc_files.mix(CREATE_MANIFESTS.out.upload_registered_mags) - ch_multiqc_files = ch_multiqc_files.mix(CONCAT_ACCESSIONS.out.file_out.map{meta, file -> file}) + ch_multiqc_files = ch_multiqc_files.mix(CONCAT_ACCESSIONS.out.file_out.map{_meta, file -> file}) MULTIQC( ch_multiqc_files.flatten().collect().map { files -> [