-
Notifications
You must be signed in to change notification settings - Fork 50
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
DOC: Add animations tutorial #547
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failures are real, some comments.
|
||
.. index:: animations | ||
|
||
How to create an animation using Emperor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a question or will it be better to say: "Creating an animation using Emperor"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea!
category. | ||
|
||
To do this, we need to have two metadata categories, a *gradient* category, and | ||
a *trajectory* category. The *gradient* category determines the order in which |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we always call it trajectory? IMOO it sounds confusing cause the trajectory is given by the gradient, right? Perhaps grouping is a better name but OK if this is how we always have call it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have always called it that, or at least that's the name given in the menu, and it's the name we used in the manuscript.
the oral microbiome changes in a cohort of 3 mice over the course of 5 weeks, | ||
each sample will be described by the following columns: | ||
|
||
* ``cage_number``: the cage where each mice was housed, more than one mice could |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK, you don't need this for the animation, right? But perhaps I need to read further down.
have resided in the same cage. | ||
|
||
* ``age_in_years``: the age of each mice in years. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we are planning to describe 2 trajectories examples, not only one, right?
|
||
* ``week``: the number of the week in this experiment. | ||
|
||
* ``sex``: the sex of each mice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this category really need it by the animation? Perhaps adding some text after the description saying why we want it will be useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added this two paragraphs after the description of these columns.
|
||
* ``mice_identifier``: where each mice is assigned a unique identifier. | ||
|
||
In the example above, we can use the ``week`` column as our *gradient* category, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which example? I think we are still in the example ... 😉
|
||
In the example above, we can use the ``week`` column as our *gradient* category, | ||
so as long as all the values are numerical. To be more precise, a column where | ||
values were indicated as ``pre-treatment, first, second, third and last`` would |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is super important and perhaps it should be part of the description of each category and why we want them.
In the next section we will go through an example using published data from | ||
`Weingarden et al. 2015 <https://www.ncbi.nlm.nih.gov/pubmed/25825673>`_. | ||
|
||
Data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need 2 examples that are different mice/human? If you want to add them both suggest splitting them clearly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't really need both, but I think that if you are unfamiliar with the topic, it may be of more help to look at a small synthetic example with just a handful of data points. As per your other comments, I've made the distinction between these two more explicit, hopefully this will help.
@antgonza thanks for the review, I think most of your comments have been addressed, let me know if this looks better now. |
|
||
In this tutorial we describe how to create a principal coordinates analysis | ||
(PCoA) plot, and display animated traces of the samples sorted by a metadata | ||
category. To do this, we will describe a `Synthetic Example` (explaining |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To do this -> Here | For this purpose, ... Just cause that's how the next paragraph starts.
.. figure:: trajectories.png | ||
:alt: Cartoon representation of the example above. | ||
|
||
Cartoon representation of the example we see above. On the left, the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we see above -> of the synthetic example
|
||
Cartoon representation of the example we see above. On the left, the | ||
unmodified ordination coloring samples by mice. On the center, the same | ||
odination with a label for each sample, corresponding to the week where this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
odination -> ordination
|
||
---- | ||
Data | ||
---- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use these same divisions (data, processing, filtering) in the synthetic example? Also, could you add a small description of each section before starting the examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've now separated the sections of the two examples. The filtering section is really a "you should know" thing, not really part of the second example. I've changed the headers to make this distinction clearer.
be logged in to access the studies. | ||
|
||
The files needed for this tutorial can be downloaded from this `link | ||
<http://emperor.microbio.me/animations-tutorial.zip>`_, download and unzip in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the download and unzip is obvious but if you want to leave it change to: '. Download and unzip in'
I've now made these changes, thanks! |
Thanks!! Looks great. One more request, which I just thought of: how to deal with missing data? In specific, what happens if one mouse has only -1, 3? |
@antgonza good point, I had already considered this in the red samples, but did not highlight this in the text, this has now been mentioned in the text (right after the figure). |
Thanks @antgonza! |
This adds a tutorial on how to create animations and a brief explanation of the concepts behind them.