Skip to content

Commit

Permalink
MAINT: otus->features in artifact api tutorial (#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisKeefe authored Aug 21, 2020
1 parent 0b1ae30 commit 8981d9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/interfaces/artifact-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ A powerful feature of QIIME 2 is that you can export different types of views fr
imported_artifact = Artifact.import_data("FeatureTable[Frequency]", df)
The ``rarefied_table`` artifact can be passed to methods of other QIIME 2 plugins. Here we'll compute the *Observed OTUs* alpha diversity metric using the ``q2-diversity`` plugin. The resulting ``Artifact`` will be of type ``SampleData[AlphaDiversity]``, and we can access a ``pd.Series`` as a view of this ``Artifact``.
The ``rarefied_table`` artifact can be passed to methods of other QIIME 2 plugins. Here we'll compute the *Observed Features* alpha diversity metric using the ``q2-diversity`` plugin. The resulting ``Artifact`` will be of type ``SampleData[AlphaDiversity]``, and we can access a ``pd.Series`` as a view of this ``Artifact``.

.. code-block:: python
>>> from qiime2.plugins import diversity
>>> alpha_result = diversity.methods.alpha(table=rarefied_table, metric='observed_otus')
>>> alpha_result = diversity.methods.alpha(table=rarefied_table, metric='observed_features')
>>> alpha_diversity = alpha_result.alpha_diversity
>>> alpha_diversity.view(pd.Series)
L1S105 24
Expand All @@ -68,7 +68,7 @@ The ``rarefied_table`` artifact can be passed to methods of other QIIME 2 plugin
L1S76 20
L1S8 17
...
Name: observed_otus, dtype: int64
Name: observed_features, dtype: int64
Finally, we can save our ``Artifacts`` as ``.qza`` files and exit the interpreter as follows:

Expand Down

0 comments on commit 8981d9a

Please sign in to comment.