Skip to content

Commit

Permalink
Updating heatmaps in notebook (#201)
Browse files Browse the repository at this point in the history
* DOC: Fixing linear mixed effects summary plots.
Also separating out qiime2 tutorials

* ENH: Adding in multiple hypothesis correction

* forgot import

* TST: Fixing file creation issues

* pep8

* FIX: Fixing orientation of pvalues for lme

* Updating qiime2 tutorials for 88 soils and cf

* TST: Fixing summary test

* Adding in all of the updated IPython notebooks

* Updating bokeh tests

* pep8

* DOC: Adding much more documentation

* Updating docs for principal balances

* DOC: Fixing references

* Updating taxonomies to meet qiime2 format

* DOC: Addressing #199.

* DOC: Updating notebooks to reflect on changes in heatmap orientation

* DOC: Removing warning

* ENH: Changing types over to Hierarchy instead of Phylogeny[Rooted]

* FIX: fixing typos in assign-ids
Fixing types in regression

* FIX: Fixing types with plotting and clustering functions

* Updating notebooks
  • Loading branch information
mortonjt authored Jun 17, 2017
1 parent f03cf46 commit 4fd87b3
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 92 deletions.
6 changes: 3 additions & 3 deletions gneiss/plot/_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from gneiss.plot._decompose import balance_barplots, balance_boxplot
from gneiss.util import (match, NUMERATOR, DENOMINATOR)

from q2_types.tree import Phylogeny, Rooted
from q2_types.tree import Hierarchy
from q2_composition.plugin_setup import Composition, Balance
from q2_types.feature_table import FeatureTable
from q2_types.feature_data import FeatureData, Taxonomy
Expand Down Expand Up @@ -111,7 +111,7 @@ def f(x):

plugin.visualizers.register_function(
function=balance_taxonomy,
inputs={'balances': FeatureTable[Balance], 'tree': Phylogeny[Rooted],
inputs={'balances': FeatureTable[Balance], 'tree': Hierarchy,
'taxonomy': FeatureData[Taxonomy]},
parameters={'balance_name': Str,
'taxa_level': Int,
Expand Down Expand Up @@ -188,7 +188,7 @@ def dendrogram_heatmap(output_dir: str, table: pd.DataFrame,
plugin.visualizers.register_function(
function=dendrogram_heatmap,
inputs={'table': FeatureTable[Composition],
'tree': Phylogeny[Rooted]},
'tree': Hierarchy},
parameters={'metadata': MetadataCategory, 'ndim': Int,
'method': Str % Choices(_transform_methods),
'color_map': Str % Choices(_mpl_colormaps)},
Expand Down
6 changes: 3 additions & 3 deletions gneiss/regression/_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from q2_composition.plugin_setup import Balance
from q2_types.feature_table import FeatureTable
from q2_types.tree import Phylogeny, Rooted
from q2_types.tree import Hierarchy
from qiime2.plugin import Str, Metadata
from gneiss.plugin_setup import plugin
from gneiss.plot._regression_plot import ols_summary, lme_summary
Expand All @@ -31,7 +31,7 @@ def ols_regression(output_dir: str,
plugin.visualizers.register_function(
function=ols_regression,
inputs={'table': FeatureTable[Balance],
'tree': Phylogeny[Rooted]},
'tree': Hierarchy},
parameters={'formula': Str, 'metadata': Metadata},
name='Simplicial Ordinary Least Squares Regression',
input_descriptions={
Expand Down Expand Up @@ -65,7 +65,7 @@ def lme_regression(output_dir: str,
plugin.visualizers.register_function(
function=lme_regression,
inputs={'table': FeatureTable[Balance],
'tree': Phylogeny[Rooted]},
'tree': Hierarchy},
parameters={'metadata': Metadata, 'formula': Str, 'groups': Str},
name='Simplicial Linear mixed effects regression',
input_descriptions={
Expand Down
Binary file modified gneiss/regression/tests/data/lme_tree.qza
Binary file not shown.
Binary file modified gneiss/regression/tests/data/ols_tree.qza
Binary file not shown.
24 changes: 15 additions & 9 deletions ipynb/88soils/88soils-python-tutorial.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ipynb/88soils/88soils-qiime2-tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[32mSaved Phylogeny[Rooted] to: ph_tree.nwk.qza\u001b[0m\r\n"
"\u001b[32mSaved Hierarchy to: ph_tree.nwk.qza\u001b[0m\r\n"
]
}
],
Expand Down
42 changes: 21 additions & 21 deletions ipynb/cfs/cfs-python-tutorial.ipynb

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions ipynb/cfs/cfs-qiime2-tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"!qiime tools import --input-path final.withtax.biom \\\n",
Expand Down Expand Up @@ -98,7 +100,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[32mSaved Phylogeny[Rooted] to: correlated_hierarchy.nwk.qza\u001b[0m\r\n"
"\u001b[32mSaved Hierarchy to: correlated_hierarchy.nwk.qza\u001b[0m\r\n"
]
}
],
Expand Down
68 changes: 42 additions & 26 deletions ipynb/cfstudy/cfstudy-python-tutorial.ipynb

Large diffs are not rendered by default.

34 changes: 7 additions & 27 deletions ipynb/cfstudy/cfstudy-qiime2-tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,6 @@
" --type FeatureData[Taxonomy]"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[32mSaved FeatureTable[Frequency] to: cfstudy_common.biom.qza\u001b[0m\r\n"
]
}
],
"source": [
"!qiime feature-table filter-samples \\\n",
" --i-table cfstudy.biom.qza \\\n",
" --m-sample-metadata-file cfstudy_modified_metadata.txt \\\n",
" --o-filtered-table cfstudy_common.biom.qza"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -57,7 +37,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"metadata": {},
"outputs": [
{
Expand All @@ -84,14 +64,14 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[32mSaved Phylogeny[Rooted] to: ph_tree.nwk.qza\u001b[0m\r\n"
"\u001b[32mSaved Hierarchy to: ph_tree.nwk.qza\u001b[0m\r\n"
]
}
],
Expand All @@ -113,7 +93,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand All @@ -133,7 +113,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand All @@ -160,7 +140,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -192,7 +172,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 7,
"metadata": {},
"outputs": [
{
Expand Down

0 comments on commit 4fd87b3

Please sign in to comment.