Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to some small open issues #404

Merged
merged 5 commits into from
Oct 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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))
ElDeveloper marked this conversation as resolved.
Show resolved Hide resolved
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