nf-core / ampliseq

Amplicon sequencing analysis workflow using DADA2 and QIIME2
https://nf-co.re/ampliseq
MIT License
187 stars 117 forks source link

Bug with v2.4.1: categorical data required in metadata #522

Closed chuan-wang closed 1 year ago

chuan-wang commented 1 year ago

Description of the bug

According to the pipeline instruction, metadata files are not required to have additional columns than the ID column, and it is optional to have --metadata_category. But when I ran with a metadata file with only the ID column, qiime threw the following error messages:

Plugin error from diversity:

    Metadata does not contain any columns that satisfy this visualizer's requirements. There must be at least one metadata column that contains categorical data, isn't empty, doesn't consist of unique values, and doesn't consist of exactly one value.

I tried adding a "fake" category column with two values ("A" and "B") in the metadata file, running the same command with the option --metadata_category fake, the pipeline could be completed.

Command used and terminal output

No response

Relevant files

No response

System information

No response

d4straub commented 1 year ago

Thanks for the report! I think some processes cannot be run without additional columns, such as diversity & differential abundance analysis. Those would need to be manually skipped with the skipping parameters, see https://nf-co.re/ampliseq/2.4.1/parameters#skipping-specific-steps. I will see if I can make those processes be skipped automatically when the metadata file contains only one column or I just update the documentation and reference the relevant skipping params.

d4straub commented 1 year ago

I updated the documentation, currently in the dev branch, but will be part of the next release. Thanks again for reporting!