Error when running DADA2 metadata tabulate

Hi there,

I’m new to QIIME and still learning so sorry if this is an obvious question/answer.

I’ve just run the DADA2 code and got the following outputs:
rep-seqs-dada2-trim1.qza
stats-dada2-16Strim1.qza
table-dada2-16Strim1.qza

I’m trying to run the next step from the Moving Pictures tutorial (the metadata tabulate):
qiime metadata tabulate
–m-input-file stats-dada2-16Strim1.qza
–o-visualization stats-dada2-16Strim1.qzv

However when I run that line of code with my stats-dada2 output this error message comes up in bold red letters:
There was an issue with loading the file stats-dada2-16Strim1.qza as metadata:

Metadata file must be encoded as UTF-8 or ASCII. The following error occurred when decoding the file:

’utf-8’ codec can’t decode byte 0xc0 in position 14: invalid start byte

There may be more errors present in the metadata file. To get a full report, sample/feature metadata files can be validated with Keemei: https://keemei.qiime2.org

Find details on QIIME 2 metadata requirements here: https://docs.qiime2.org/2018.8/tutorials/metadata/

I am slightly confused as to why the error appears and what it means? Do I need to load my personal metadata file I’ve created into QIIME first? (If so why is that not a step in the tutorial?).

I’ve been through the plugins to see if there is extra code I should add but I’m not sure what I need to/if I need to.

Any help would be great :slight_smile:, thanks, Grace

Hi @ebolyen, I got a notification you replied but can’t see the reply anywhere. I’m new to QIIME forum so still navigating my way around. How do I view your reply?

Thanks for your help
Grace

1 Like

H @Grace1 — you didn’t miss anything — the notification you saw was for the assignment of @ebolyen to respond to your question. @ebolyen has not yet responded — stay tuned!

Hi @thermokarst - thank you for clarifying! I’ll get used to QIIME and the forum eventually :joy:

1 Like

Hi @Grace1,

Sorry about that, in the case of your problem, it sounds like the file is not in the right encoding for metadata which is a little surprising as it comes from QIIME 2.

Would you be able to provide your stats-dada2-16Strim1.qza file (it only has sample names and read numbers).

What I think happened is a unicode character was written by the R script as ISO-8859-1, which has 0xc0 as a valid byte. But I am not sure why this would have happened yet. Perhaps there are some environment flags we are unaware of which change the default encoding in R?

1 Like

stats-dada2.qza (13.0 KB)

@ebolyen This is the output file from the DADA2 step. I have since renamed the file since posting last week.

Is there a way for me to visualise the file on my end? I've tried a number of ways but can't get it open.

Thanks for you help :grinning: I really appreciate it!

Grace

Use qiime metadata tabulate to create a qzv that you can visualize.

Hi @Nicholas_Bokulich - that’s the problem I’ve been having (see above in thread). The metadata tabulate isn’t working with the .qza file. I was wondering if there was a different way to visualise it to see what’s wrong with the file.

Thanks
Grace

2 Likes

There must be something fishy with your environment. I have no problem tabulating that file... here's the result:

stats-dada2.qzv (1.2 MB)

How strange! I tried so many times and so many different things. Thank you so much for trying out the file.

By environment do you mean my terminal/bug in the qiime I’m using maybe? I’m using Macbook Pro and qiime 2 2018.8

Thanks
Grace

Most likely this is an environment issue (a problem with the configuration of your local machine). Can you run the following and paste the results here?

env

Also, for future reference, you can always export any qza from QIIME 2 --- this is your escape hatch for when things aren't working. Export, then load in something like Excel.

PS --- 2018.8 is old and not supported any more --- if you performed a native install of QIIME 2 on your macbook I suggest installing 2019.1. No need to uninstall 2018.8 if you don't want to, multiple versions can coexist peacefully.

1 Like

Just to add to the mystery a bit, this file definitely doesn't have the byte sequences that the original error was complaining about.

The zip archive itself also looks pretty normal, so I don't have any clue why this happened.

@Grace1, does this file still produce the error you saw earlier when trying to tabulate it?

After running env in my terminal with QIIME activated, is that what you meant?:

JAVA_LD_LIBRARY_PATH=/Users/gracecole/miniconda3/envs/qiime2-2018.8/jre/lib/server

TERM_PROGRAM=Apple_Terminal

SHELL=/bin/bash

TERM=xterm-256color

PYTHONNOUSERSITE=/Users/gracecole/miniconda3/envs/qiime2-2018.8/lib/python*/site-packages/

TMPDIR=/var/folders/p4/hcq837nd11xgc46dd5b4dqnc0000gn/T/

CONDA_SHLVL=1

Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.VhlKlALhoe/Render

CONDA_PROMPT_MODIFIER=(qiime2-2018.8)

TERM_PROGRAM_VERSION=421.1

TERM_SESSION_ID=73C0BB7D-D4C4-46F0-86A9-F5EB272F86E5

USER=gracecole

CONDA_EXE=/Users/gracecole/miniconda3/bin/conda

SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.vzkCDj31ye/Listeners

PATH=/Users/gracecole/miniconda3/envs/qiime2-2018.8/bin:/Users/gracecole/miniconda3/bin:/Users/gracecole/miniconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin

CONDA_PREFIX=/Users/gracecole/miniconda3/envs/qiime2-2018.8

PWD=/Users/gracecole

JAVA_HOME=/Users/gracecole/miniconda3/envs/qiime2-2018.8

MPLBACKEND=Agg

LANG=en_AU.UTF-8

XPC_FLAGS=0x0

XPC_SERVICE_NAME=0

SHLVL=1

HOME=/Users/gracecole

CONDA_PYTHON_EXE=/Users/gracecole/miniconda3/bin/python

LOGNAME=gracecole

JAVA_HOME_CONDA_BACKUP=

CONDA_DEFAULT_ENV=qiime2-2018.8

DISPLAY=/private/tmp/com.apple.launchd.bryv5CxYWL/org.macosforge.xquartz:0

JAVA_LD_LIBRARY_PATH_BACKUP=

R_LIBS_USER=/Users/gracecole/miniconda3/envs/qiime2-2018.8/lib/R/library/

_=/usr/bin/env

I’ll update QIIME and see if I still get the same error.

Thanks so much for your help everyone!! :smile:

1 Like

@ebolyen yea it still happens… I’m going to try installing the most updated version of QIIME 2 to see if that helps.

Thanks :slight_smile: I really appreciate all the help!

1 Like

@ebolyen @thermokarst @Nicholas_Bokulich

Just letting you all know, I installed lastest Qiime and updated my conda environment and the code worked!

Thank’s for your help and suggestions! I really appreciate it :smile:

Sometimes posting on forums can be scary so thank you for making it easy!

3 Likes

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