Error in metadata: taxa barplot with group-table

Hello,

I found an error when I was trying to generate a taxa barplot from a grouped table.

There was an issue with loading the file Metadados_grouped_local.txt as metadata:

  There was an issue with loading the metadata file:

  Metadata IDs must be unique. The following IDs are duplicated: 'JDG', 'JDGF1', 'JU', 'JUF1', 'LAB', 'NEG', 'RPC', 'RPCF1'

My goal is to generate a taxa barplot from 7 groups of my "local" variable ('RPC', 'JDG', 'JU','RPCF1','JDGF1','JUF1','LAB').

I know the way I can run my command involves modifying my metadata. I've looked at several discussions on the forum, but I'm having problems manually modifying my metadata, maybe it's something simple but I can't find where I'm going wrong.

I replaced my entire sample-id column with the group names found in the "local" variable.

Here is my original metadata: Metadados.tsv (3.0 KB)
And here is the modified metadata that I'm trying to make correctly:Metadados_grouped_local.tsv (2.7 KB)

Hi!
Plugin is complaining, that your ids are not unique. Since you already replaced your initial ids by group names, the next step would be to remove all replicates for each new ID (there should be only one row for each group name).

Hi @timanix,

Thank you for the prompt response!

This is a little bit confusing for me, because I have 96 individuals, so removing the replicates in my metadata will leave just 7 rows with the group names, and the others 89 rows will be empty. Is this right?

That's right but I guess that you need this grouped table and grouped metadata only for taxabarplot to show groups rather individuals. For stat analysis and other plugins you can use original metadata and tables.

I made the corrections in my metadata, but now I have a new error.

Firstly I runned the code to generate a grouped table, with my original metadata

 qiime feature-table group \
  --i-table filtered-table-with-phyla-min10.qza \
  --p-axis sample \
  --m-metadata-file Metadados.txt \
  --m-metadata-column "local"  \
  --p-mode sum \
  --o-grouped-table grouped_local_table.qza

Now I have the error while I was running the second code with the modified metadata, with the 7 rows containing my group names in sample-id

 qiime taxa barplot \
   --i-table grouped_local_table.qza \
   --i-taxonomy taxonomy-gg.qza \
   --m-metadata-file Metadados_grouped_local.txt \
   --o-visualization taxa-bar-plots-grouped-local.qzv

     There was an issue with loading the file Metadados_grouped_local.txt as metadata:

      [Errno 13] Permission denied: 'Metadados_grouped_local.txt'

Did you modified metadata on other machine?
Do you have root access? Could you try to cahnge permissions with or without sudo:

sudo chmod 777 Metadados_grouped_local.txt
chmod 777 Metadados_grouped_local.txt
1 Like

Thanks, It worked!

But my empty rows in the modified metadata give me the error that I was suspecting, please if you can check my modified metadata: Metadados_grouped_local.tsv (2.4 KB)

The new error:

There was an issue with loading the file Metadados_grouped_local.txt as metadata:

  There was an issue with loading the metadata file:

  Detected empty metadata ID. IDs must consist of at least one character.

You need to delete completely rows without IDs in modified metadata - you don't need them to create grouped taxabarplot.

1 Like

Thanks, now it worked well!

I'm uploading my modified metadata, for other users that have the same doubts could visualize.

Metadados_grouped_local.tsv (291 Bytes)

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.