Bioinformatics book with QIIME2

Hi,

I am the author of the Book “Bioinformatics with Python Cookbook”. This book will most probably have a second edition and I am considering adding a chapter on meta-genomics, which would be mostly QIIME. I do have a question, though:

Can a user do everything via the Artifact API?
It is not clear from the documentation what is the scope of the API. And for the book, API access is what really matters.

Thanks

2 Likes

Hi @tiagoantao!

Absolutely! That is one of the goals of QIIME 2, to be interface agnostic, so every bit of bioinformatics functionality should be available in every interface (in principle anyway, our GUI is lagging a bit behind at the moment).

Our docs on that are very weak at the moment. The objects you'll want to look at will be:

qiime2.Metadata
qiime2.MetadataColumn
qiime2.Artifact
qiime2.Visualization
qiime2.plugins.<name of plugin>

Those should be enough to replicate anything an interface like q2cli does. The Artifact API always takes instances of one of those objects (or is something simple like a str/int). Additionally, much of the qiime tools functionality in q2cli are really just glorified method calls on one of those objects.

Please feel free to ask any question about how you might replicate something in one interface in another, we love answering those kinds of questions!

1 Like

@antgonza reminded me that @tomasz has written a moving pictures tutorial using the Artifact API in a Jupyter notebook as well:

Argh… I actually did that for the book. I should have come here before…
Well, fortunately I still did not submit it to the editor, so I will go to choose one of the other tutorials and make an Artifact API version of it.
Assuming you are fine with it…

That’s fine, although I don’t see why using the Moving Pictures tutorial is a problem either :slight_smile:

It might be more compelling to use some other dataset entirely (if your book happens to have a running theme or dataset it is analyzing), but I can’t really say.