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

DOC: Add animations tutorial #547

Merged
merged 5 commits into from
Nov 1, 2016
Merged

Conversation

ElDeveloper
Copy link
Member

This adds a tutorial on how to create animations and a brief explanation of the concepts behind them.

Copy link
Collaborator

@antgonza antgonza left a 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
Copy link
Collaborator

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"?

Copy link
Member Author

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
Copy link
Collaborator

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.

Copy link
Member Author

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
Copy link
Collaborator

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.

Copy link
Collaborator

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.
Copy link
Collaborator

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.

Copy link
Member Author

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,
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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.

Copy link
Member Author

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.

@ElDeveloper
Copy link
Member Author

@antgonza thanks for the review, I think most of your comments have been addressed, let me know if this looks better now.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 93.985% when pulling 89dcc79 on ElDeveloper:tutorial into 6ac8242 on biocore:master.


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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

odination -> ordination


----
Data
----
Copy link
Collaborator

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.

Copy link
Member Author

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
Copy link
Collaborator

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'

@ElDeveloper
Copy link
Member Author

I've now made these changes, thanks!

@antgonza
Copy link
Collaborator

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?

@coveralls
Copy link

coveralls commented Oct 31, 2016

Coverage Status

Coverage remained the same at 93.985% when pulling 0718e3e on ElDeveloper:tutorial into 6ac8242 on biocore:master.

@ElDeveloper
Copy link
Member Author

@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).

@coveralls
Copy link

Coverage Status

Coverage remained the same at 93.985% when pulling ce9cfe3 on ElDeveloper:tutorial into 6ac8242 on biocore:master.

@antgonza antgonza merged commit fe559e1 into biocore:master Nov 1, 2016
@ElDeveloper
Copy link
Member Author

Thanks @antgonza!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants