Semantic Type Filepaths

I’m trying QIIME2 for a new analysis. I’ve been using QIIME since in the 1.7 version, so I’m relatively used to having more access to my data. I love the idea of semantic types carrying providence, and having that providence in a readable format. It would be really helpful if there was a python-based tutorial for using the new system, as thats one of the most exciting features to me.

However, I’m finding a couple of challenges. First, going through the tutorial, I found it hard to figure out how to export the semantic type. It would be really helpful if that could be provided somewhere?

Second, I find the .qza and .qzv extensions really hard to keep straight from a .gza extension. I’m not sure if theres an extended form, or something slightly different.

Hi @jwdebelius!

It would be really helpful if there was a python-based tutorial for using the new system, as thats one of the most exciting features to me.

Check out the “Artifact API” tutorial (i.e. the QIIME 2 Python 3 API). We’ll be expanding the tutorial in the future.

First, going through the tutorial, I found it hard to figure out how to export the semantic type. It would be really helpful if that could be provided somewhere?

We have an importing tutorial but don’t have docs on exporting data. I created an issue to track this.

To export data from an artifact, use qiime tools export or qiime2.Artifact.export_data.

Second, I find the .qza and .qzv extensions really hard to keep straight from a .gza extension. I’m not sure if theres an extended form, or something slightly different.

We haven’t defined an extended form or alternative extensions. The .qza/qzv extensions are mostly convention, but we highly recommend using them so that QIIME 2 interfaces can discover artifacts/visualizations on the filesystem. For example, q2studio only detects files that end in .qza/.qzv. The CLI and Artifact API, however, do not care about the file extension.

When using the Artifact API, CLI, or q2studio, if you save an artifact or visualization without the .qza/.qzv extension, the appropriate file extension will be added for you when the data is saved to disk (this is a nice shortcut if you don’t want to always type out the file extension).

2 Likes

Thanks. I found the API tutorial shortly after I posted. :blush:

2 Likes