#!/usr/bin/env python # coding: utf-8 # In[1]: from feature_table.artifact_types.feature_table import FeatureTable, Frequency # In[2]: # this is temporarily in place for testing purposes import biom biom_path = "/Users/caporaso/code/q2d2/example-data/keyboard/q191/otu-table.tsv" #table = biom.util.biom_open(open(biom_path)) table = biom.load_table(biom_path) # In[3]: print(table.head(n=5)) # In[4]: from qiime.sdk.artifact import Artifact # In[5]: Artifact.save(table, FeatureTable[Frequency], "nothing...", "./table.qtf") # In[6]: get_ipython().system('pwd') # In[7]: a = Artifact('./table.qtf') # In[8]: a # In[9]: a.data # In[10]: a.uuid # In[11]: a.provenance # In[12]: print(a.data.head(n=5)) # In[13]: a.type # In[18]: a.type.get_columns(a.data)[:5] # In[16]: a.type.get_values(a.data, 'New.CleanUp.ReferenceOTU0')[:5] # In[ ]: