# Nextflow (NF-Core Ampliseq) Metadata Error out

**URL:** https://community.seqera.io/t/nextflow-nf-core-ampliseq-metadata-error-out/2032
**Category:** Ask for help
**Tags:** nextflow
**Created:** [April 2, 2025, 12:12am UTC](https://community.seqera.io/t/nextflow-nf-core-ampliseq-metadata-error-out/2032 "2025-04-02T00:12:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![With3y](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/with3y/32/1731_2.png) [@With3y](https://community.seqera.io/u/With3y)
#### Post date: [April 2, 2025, 12:12am UTC](https://community.seqera.io/t/nextflow-nf-core-ampliseq-metadata-error-out/2032/1 "2025-04-02T00:12:51Z")

</div>

Hi, i was hoping i could get some assistance with figuring out why nextflow (NF-Core Ampliseq) cant read my metadata file. I am relatively new to this workflow so any help would be greatly appreciated.

Command executed

```auto
#!/usr/bin/env Rscript
  
  suppressPackageStartupMessages(library(phyloseq))
  
  otu_df <- read.table("reformat_filtered-table.tsv", sep="\t", header=TRUE, row.names=1)
  tax_df <- read.table("reformat_taxonomy.tsv", sep="\t", header=TRUE, row.names=1)
  otu_mat <- as.matrix(otu_df)
  tax_mat <- as.matrix(tax_df)
  
  OTU <- otu_table(otu_mat, taxa_are_rows=TRUE)
  TAX <- tax_table(tax_mat)
  phy_obj <- phyloseq(OTU, TAX)
  
  if (file.exists("Metadata.txt")) {
      sam_df <- read.table("Metadata.txt", sep="\t", header=TRUE, row.names=1)
      SAM <- sample_data(sam_df)
      phy_obj <- merge_phyloseq(phy_obj, SAM)
  }

  if (file.exists("")) {
      TREE <- read_tree("")
      phy_obj <- merge_phyloseq(phy_obj, TREE)
  }
  
  saveRDS(phy_obj, file = paste0("qiime2", "_phyloseq.rds"))
  
  # Version information
  writeLines(c("\"NFCORE_AMPLISEQ:AMPLISEQ:PHYLOSEQ_WORKFLOW:PHYLOSEQ\":",
      paste0(" R: ", paste0(R.Version()[c("major","minor")], collapse = ".")),
      paste0(" phyloseq: ", packageVersion("phyloseq"))),
      "versions.yml"
  )

```

```auto
Command error:
  INFO: Environment variable SINGULARITYENV_NXF_TASK_WORKDIR is set, but APPTAINERENV_NXF_TASK_WORKDIR is preferred
  INFO: Environment variable SINGULARITYENV_NXF_DEBUG is set, but APPTAINERENV_NXF_DEBUG is preferred
  Error in read.table("Metadata.txt", sep = "\t", : 
   duplicate 'row.names' are not allowed
  Execution halted

```

---

<div class="post-metadata">

### Author: ![mribeirodantas](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/mribeirodantas/32/235_2.png) [@mribeirodantas](https://community.seqera.io/u/mribeirodantas)
#### Post date: [April 2, 2025, 1:31pm UTC](https://community.seqera.io/t/nextflow-nf-core-ampliseq-metadata-error-out/2032/2 "2025-04-02T13:31:37Z")

</div>

Can you share a bit of your metadata file? I believe you have duplicate row names in it.
