Skip to content

Commit

Permalink
Updated tutorials (#259)
Browse files Browse the repository at this point in the history
* DOC: Updating changelog

* Update CHANGELOG.md

* FIX: fix issues with pep8

* FIX: pep8 -> pycodestyle

* DOC: fixing toctree

* STY: flake8

* ENH: Adding in sparse representation for tree

* Updating ipython notebooks

* DOC: Updating 88soils tutorial fixing the heatmap
  • Loading branch information
mortonjt committed Apr 5, 2018
1 parent 0336c5f commit d2bb199
Show file tree
Hide file tree
Showing 2 changed files with 166 additions and 118 deletions.
104 changes: 76 additions & 28 deletions ipynb/88soils/88soils-qiime2-tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"metadata": {},
"outputs": [
{
"name": "stdout",
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/mortonjt/miniconda3/envs/qiime2-2018.2/lib/python3.5/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
Expand All @@ -33,12 +33,13 @@
}
],
"source": [
"!qiime tools import \\\n",
"%%bash\n",
"qiime tools import \\\n",
" --input-path 238_otu_table.biom \\\n",
" --output-path 88soils.biom.qza \\\n",
" --type FeatureTable[Frequency]\n",
"\n",
"!qiime tools import \\\n",
"qiime tools import \\\n",
" --input-path 88soils_taxonomy.txt \\\n",
" --output-path 88soils_taxonomy.qza \\\n",
" --type FeatureData[Taxonomy]"
Expand All @@ -62,15 +63,22 @@
{
"name": "stdout",
"output_type": "stream",
"text": [
"Saved FeatureTable[Frequency] to: 88soils_filt100.biom.qza\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/mortonjt/miniconda3/envs/qiime2-2018.2/lib/python3.5/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
" from ._conv import register_converters as _register_converters\n",
"\u001b[32mSaved FeatureTable[Frequency] to: 88soils_filt100.biom.qza\u001b[0m\n"
" from ._conv import register_converters as _register_converters\n"
]
}
],
"source": [
"!qiime feature-table filter-features \\\n",
"%%bash\n",
"qiime feature-table filter-features \\\n",
" --i-table 88soils.biom.qza \\\n",
" --o-filtered-table 88soils_filt100.biom.qza \\\n",
" --p-min-frequency 100"
Expand All @@ -94,15 +102,22 @@
{
"name": "stdout",
"output_type": "stream",
"text": [
"Saved Hierarchy to: ph_tree.nwk.qza\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/mortonjt/miniconda3/envs/qiime2-2018.2/lib/python3.5/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
" from ._conv import register_converters as _register_converters\n",
"\u001b[32mSaved Hierarchy to: ph_tree.nwk.qza\u001b[0m\n"
" from ._conv import register_converters as _register_converters\n"
]
}
],
"source": [
"!qiime gneiss gradient-clustering \\\n",
"%%bash\n",
"qiime gneiss gradient-clustering \\\n",
" --i-table 88soils_filt100.biom.qza \\\n",
" --m-gradient-file 88soils_metadata.txt \\\n",
" --m-gradient-column ph \\\n",
Expand Down Expand Up @@ -133,15 +148,22 @@
{
"name": "stdout",
"output_type": "stream",
"text": [
"Saved FeatureTable[Composition] to: 88soils_composition.biom.qza\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/mortonjt/miniconda3/envs/qiime2-2018.2/lib/python3.5/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
" from ._conv import register_converters as _register_converters\n",
"\u001b[32mSaved FeatureTable[Composition] to: 88soils_composition.biom.qza\u001b[0m\n"
" from ._conv import register_converters as _register_converters\n"
]
}
],
"source": [
"!qiime composition add-pseudocount \\\n",
"%%bash\n",
"qiime composition add-pseudocount \\\n",
" --i-table 88soils_filt100.biom.qza \\\n",
" --p-pseudocount 1 \\\n",
" --o-composition-table 88soils_composition.biom.qza"
Expand All @@ -162,21 +184,26 @@
{
"name": "stdout",
"output_type": "stream",
"text": [
"Saved Visualization to: ph_heatmap.qzv\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/mortonjt/miniconda3/envs/qiime2-2018.2/lib/python3.5/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
" from ._conv import register_converters as _register_converters\n",
"\u001b[31m\u001b[1mThere was an issue with retrieving column 'ph_rounded' from the metadata:\n",
"\n",
" Metadata column 'ph_rounded' is numeric. Option --m-metadata-column expects the column to be categorical.\u001b[0m\n",
"\n"
"/Users/mortonjt/miniconda3/envs/qiime2-2018.2/lib/python3.5/site-packages/gneiss-0.4.2.dev0-py3.5.egg/gneiss/util.py:181: FutureWarning: '.reindex_axis' is deprecated and will be removed in a future version. Use '.reindex' instead.\n"
]
}
],
"source": [
"!qiime gneiss dendrogram-heatmap \\\n",
"%%bash\n",
"qiime gneiss dendrogram-heatmap \\\n",
" --i-table 88soils_composition.biom.qza \\\n",
" --i-tree ph_tree.nwk.qza \\\n",
" --m-metadata-file 88soils_metadata.txt \\\n",
" --m-metadata-file 88soils_modified_metadata.txt \\\n",
" --m-metadata-column \"ph_rounded\" \\\n",
" --o-visualization \"ph_heatmap\" \\\n",
" --p-ndim 10 --verbose"
Expand Down Expand Up @@ -210,15 +237,22 @@
{
"name": "stdout",
"output_type": "stream",
"text": [
"Saved FeatureTable[Balance] to: 88soils_balances.qza\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/mortonjt/miniconda3/envs/qiime2-2018.2/lib/python3.5/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
" from ._conv import register_converters as _register_converters\n",
"\u001b[32mSaved FeatureTable[Balance] to: 88soils_balances.qza\u001b[0m\n"
" from ._conv import register_converters as _register_converters\n"
]
}
],
"source": [
"!qiime gneiss ilr-transform \\\n",
"%%bash\n",
"qiime gneiss ilr-transform \\\n",
" --i-table 88soils_composition.biom.qza \\\n",
" --i-tree ph_tree.nwk.qza \\\n",
" --o-balances 88soils_balances.qza"
Expand All @@ -232,15 +266,22 @@
{
"name": "stdout",
"output_type": "stream",
"text": [
"Saved Visualization to: 88soils_regression_summary.qzv\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/mortonjt/miniconda3/envs/qiime2-2018.2/lib/python3.5/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
" from ._conv import register_converters as _register_converters\n",
"\u001b[32mSaved Visualization to: 88soils_regression_summary.qzv\u001b[0m\n"
" from ._conv import register_converters as _register_converters\n"
]
}
],
"source": [
"!qiime gneiss ols-regression \\\n",
"%%bash\n",
"qiime gneiss ols-regression \\\n",
" --p-formula \"ph + ph2 + ph3 + ph4\" \\\n",
" --i-table 88soils_balances.qza \\\n",
" --i-tree ph_tree.nwk.qza \\\n",
Expand All @@ -250,21 +291,28 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Saved Visualization to: y0_taxa_summary.qzv\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/mortonjt/miniconda3/envs/qiime2-2018.2/lib/python3.5/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
" from ._conv import register_converters as _register_converters\n",
"\u001b[32mSaved Visualization to: y0_taxa_summary.qzv\u001b[0m\n"
" from ._conv import register_converters as _register_converters\n"
]
}
],
"source": [
"!qiime gneiss balance-taxonomy \\\n",
"%%bash\n",
"qiime gneiss balance-taxonomy \\\n",
" --i-table 88soils_composition.biom.qza \\\n",
" --i-tree ph_tree.nwk.qza \\\n",
" --i-taxonomy 88soils_taxonomy.qza \\\n",
Expand Down
Loading

0 comments on commit d2bb199

Please sign in to comment.