No Metadata for Creating Visualization of Merged Tables

Hi all-
Went through the FMT tutorial for merging single-end post DADA2 feature tables / representative seq's etc. Trying to do the same for my data and have merged rep-seq's into a .qzv file, but when I go to create the visualization for the merged table and the script asks me for the metadata file...it won't show up in the drop down (q2 studio). My file is in .tsv format and keemei-checked as valid. What am I missing?

image

Thanks
S

Hey @Sausage_Mahoney!

There is a tab called Metadata on the main-window at the bottom where you artifacts and visualizations are listed. Does sample-metadata.tsv appear there? If not does hitting the “refresh” icon at the top-right of the widget help?

Let me know if that makes it show up!

1 Like

Hey @ebolyen
I checked this and the .tsv file does not appear, nor does it populate when the widget is refreshed. Any ideas?

If I’m thinking about this correctly, I edited the FMT metadata table in Excel…saved it as a tab delimited *.txt file and then changed the extension to .tsv and moved it into the VM directory. Any issues with that process?

Also (unrelated but related), in the FMT metadata file - there are discrete UUID’s associated with each sample. Where do those come from and is that something I need to incorporate into my metadata? For context, I am assessing the gut microbiomes of 9 individuals, 3 are controls, and 6 are treatment samples…but essentially wanting the same outputs as the FMT tutorial more or less.

Thanks!
S

Hey @Sausage_Mahoney!

:frowning: There’s another thing we can try which will hopefully give us some kind of diagnostic info.

Open a terminal and run the following:

npm start --prefix /opt/q2studio-2017.11.0

(If you aren’t using the latest release, replace 11 with whatever your current version is.)

You should see the studio start up, and in the terminal there’s going to be a bunch of lines printed out which are logging what’s going on. Set up your working directory like normal and then hit the refresh button again. What did the terminal do while that ran?

No, that process should work great.


Ultimately, while the metadata loading used to work, I am not terribly shocked that it perhaps isn’t working anymore. We’re a little tight on developers and the studio has certainly fallen behind a little bit. I would recommend using the command line interface whenever the studio is acting up or not doing exactly what you want.


Great question! Those IDs where generated with cual-id, it’s just a detail of that particular study. I would recommend reading the paper, but the main idea is that those IDs are completely opaque (no metadata is hidden in their scheme like gut.1.april) and have a shorter human-readable form that is error-correctable (making wet-lab processing easier and less typo-prone).

1 Like

I just remembered something important about q2studio’s implementation!

Since it doesn’t really have a concept of a “project” yet, it can’t know which files are supposed to be loaded and which one’s aren’t. So it just tries everything in the directory it’s given and skips whatever doesn’t load or errors (because those are probably just plain-old not-QIIME 2 files like a word document or anything else).

I bet your metadata file has something subtly off which is causing the studio to ignore it. Try running the following in a terminal, you should see an error. If not, then the studio is doing something wrong.

qiime metadata tabulate --m-input-file <YOUR METADATA.TSV> --o-visualization tabulated-metadata.qzv

We don’t need to do anything with tabulated-metadata.qzv so you can delete it if you want. If the file is the issue, we’ll see the above command fail.

Let me know what you see!

2 Likes

Hi @ebolyen!

Thanks for reply and information. Here's what the terminal threw back at me when I ran the script above:

Looks like there is something wrong with the file (formatting?) per your comments above?

Hey @Sausage_Mahoney - QIIME 2 2017.7 is a pretty ancient version of QIIME 2 :skull: ! Try running that same command in a 2017.11 environment to learn a bit more about what the specific issue is (well, theoretically, at least). We have added a lot of great new validation in the last few months! :heart: :t_rex:

1 Like

Hi @thermokarst,
Here's the output of that same script in QIIME2 2017.11 for the metadata file in question

I had a '<' in the mix, although not in a metadata category label. I deleted it and re-ran the script above and it generated the same output error message. This sheet checked out in Keemei...any ideas?

Thanks
S

1 Like

Thanks for the follow-up @Sausage_Mahoney :hotdog:!

The part of that error message that is catching my eye :eye: is that the category causing the problem has an empty label ('')! Yikes! That usually means that the TSV looks like this:

foo\tbar\tbaz\t
1\t2\t4\t

Note the empty column at the end (this will cause problems for you).

In the short term, crack open your favorite text editor and interrogate that TSV, make sure there are no trailing columns, and if there are, prune them away!

foo\tbar\tbaz
1\t2\t4

In the near term, @jairideout has been tackling a pretty awesome metadata overhaul, which we are hoping will land in 2017.12 (knock on wood :christmas_tree:). One of the planned features there is QIIME 2 automatically cropping off empty rows or columns, so having a feature like that would have prevented your issue from occurring.

Keep us posted and let us know if you need any help! QIIME on!

3 Likes

Your kung-fu :mahjong: is strong. Indeed I had trailing columns past the last header unbeknownst to me. I edited those out and the script executed.

QIIME2 support is on point.

Thanks!
S

3 Likes

Thanks for the report about Keemei @Sausage_Mahoney! As part of the Metadata Overhaul :tm: I’m working on, I will be updating Keemei’s validation rules to match the latest rules enforced by QIIME 2. Looks like you found a bug that another forum user ran into related to the header – I will get that fixed this month!

Reference:

2 Likes

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

In the QIIME 2 2018.2 release, Metadata ignores empty trailing columns in the file, avoiding the error reported in this topic. The latest version of Keemei supports the new Metadata file format, and the reported Keemei bug has also been fixed.

Note: if you have Keemei installed already, you’ll automatically be updated to the latest version.

There are a number of other changes to QIIME 2 Metadata in the 2018.2 release. See this forum announcement for details on what changed, as well as the updated Metadata tutorial. :sun_with_face: