Skip to content

Commit

Permalink
Fixes to some small open issues (#404)
Browse files Browse the repository at this point in the history
* ENH: add border btwn q2template header & app body

Makes things look nicer when using qiime tools view

* REL: Remove pep8 dependency: closes #397

* DOC: note in README that emperor'll be reinstalled

closes #401

* DOC: describe metadata merging pbms (close #393)

* DOC: tidy up #393 stuff
  • Loading branch information
fedarko authored Oct 1, 2020
1 parent 864f010 commit 4b51529
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 4 deletions.
44 changes: 42 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Empress
[![Build Status](https://travis-ci.org/biocore/empress.svg?branch=master)](https://travis-ci.org/biocore/empress)
[![Build Status](https://travis-ci.org/biocore/empress.svg?branch=master)](https://travis-ci.org/biocore/empress)

<!---Empress Logo--->

Expand All @@ -18,7 +18,10 @@ conda activate qiime2-2020.6

You can replace `qiime2-2020.6` above with whichever version of QIIME 2 you have currently installed.

Now we are ready to install Empress. Run the following commands:
Now we are ready to install Empress. Run the following commands to do so. (Note
that Emperor will be _re-installed_ when the second command is run; the reason
we uninstall it first is so that we can ensure the most up-to-date version of
it is available.)

```
pip uninstall --yes emperor
Expand Down Expand Up @@ -328,6 +331,43 @@ This is a good example of when your data can tell you something about your metad

## Additional Considerations

### Providing multiple metadata files

QIIME 2 allows you to specify multiple metadata files at once by just
repeating `--m-feature-metadata-file` (or `--m-sample-metadata-file`). For
example, we may want to visualize feature importances on a tree
in addition to taxonomic annotations:

```bash
qiime empress community-plot \
--i-tree rooted-tree.qza \
--i-feature-table table.qza \
--m-sample-metadata-file sample_metadata.tsv \
--m-feature-metadata-file taxonomy.qza \
--m-feature-metadata-file feature_importance.qza \
--o-visualization empress-tree.qzv
```

However, what QIIME 2 will do internally ([as of writing](https://forum.qiime2.org/t/support-other-metadata-merging-strategies/15907))
is filter the metadata to
_just_ the entries contained in _all_ of the input metadata files. So, in the
example above, if the `feature_importance.qza` file only has entries for a
couple of features (compared to the `taxonomy.qza` file), then the feature
metadata Empress receives will be limited to just the features contained in
both the feature importance and taxonomy metadata files -- which will mean that
less taxonomy information will be available in the Empress interface!

In the interim, the way to get around this (and to include multiple sources of
feature or sample metadata in Empress) is to merge metadata yourself before
creating an Empress visualization. Of course, you'll need to determine what
value(s) to assign to indicate that a given entry is "missing"; for
quantitative metadata, `NaN` or an empty value are both reasonable options.

Merging metadata files should be doable in many different programming
languages or spreadsheet tools; see
[this GitHub issue](https://github.com/biocore/empress/issues/393) for some
example Python code that does this.

### Filtered vs. raw table?

When your ordination was created from a subset of your original dataset (e.g. the feature table was rarefied, or certain low-frequency features or samples were otherwise filtered out), we recommend that you carefully consider *which* feature table you would like to visualize in Empress. You can use either:
Expand Down
8 changes: 7 additions & 1 deletion empress/support_files/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@
border: none;
}

#q2templatesheader {
/* border color between header and application matches side panel
background color */
border-bottom: 1px solid #777;
}

#q2templatesheader ~ .row > iframe {
height: calc(100vh - 85px);
height: calc(100vh - 85px);
}
</style>

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
base = ["numpy", "scipy", "pandas", "click",
"jinja2", "scikit-bio", "biom-format", "iow",
"emperor @ https://www.github.com/biocore/emperor/archive/master.zip"]
test = ["pep8", "flake8", "nose"]
test = ["flake8", "nose"]
all_deps = base + test

setup(
Expand Down

0 comments on commit 4b51529

Please sign in to comment.