biocore / American-Gut

American Gut open-access data and IPython notebooks
Other
107 stars 81 forks source link

Generate alpha diversity graphs for each metadata category of interest #209

Closed squirrelo closed 6 years ago

squirrelo commented 8 years ago

This generates the highlighted category alpha diversity graphs, allowing comparison on the interactive page.

Requires #208

squirrelo commented 8 years ago

Ready for review

squirrelo commented 8 years ago

One test passed one failed due to timeout. Should still be good to review.

squirrelo commented 8 years ago

ping @EmbrietteH @ekopylova

squirrelo commented 8 years ago

ping @EmbrietteH @ekopylova

squirrelo commented 8 years ago

ping @EmbrietteH @ekopylova

squirrelo commented 8 years ago

ping @EmbrietteH @ekopylova

ekopylova commented 8 years ago

lualatex seems to be a dependency but don't see it mentioned anywhere

ekopylova commented 8 years ago

@squirrelo a few comments

squirrelo commented 8 years ago

The lualatex is needed for rendering the barcode results PDFs.

squirrelo commented 8 years ago

Test added for file names, but there is not a way to actually test the graph itself.

squirrelo commented 8 years ago

Travis is not behaving for testing the rendering, and given that there are no other tests for rendering in the codebase, how much of a priority/how imperative is it that we have the render tests, given we're not checking the figure that is rendered and instead just the filename.

josenavas commented 8 years ago

Just checked the error really fast. It looks like the error is saying that the label "70+" is not in the axis. I'm unsure on how the figure is generated and I understand that systems can change the output figure a bit. However, I think that changing the axis is not a small change and it should be ensure that the axis are as we expect. It may be a bit more helpful to see an example of the image generated attached in here.

squirrelo commented 8 years ago

That error is the latest in a long string of errors, mostly having to do with the latex not rendering correctly or at all. Only the latest non-working commit is in the PR for brevity's sake.

squirrelo commented 8 years ago

Here is an example graph: pd_stool-age-30s

squirrelo commented 8 years ago

Aaaand now tests are passing. Ok, cool.

josenavas commented 8 years ago

Code looks good - however, before merging, I'm gonna pulldown this code and test it using the latest AG round

squirrelo commented 8 years ago

ping @josenavas mergable?

josenavas commented 8 years ago

No it's not:

Exception: Traceback (most recent call last):
  File "/home/jona1883/software/American-Gut/americangut/parallel.py", line 27, in run_functor
    return functor(*args, **kwargs)
  File "/home/jona1883/software/American-Gut/americangut/per_sample.py", line 117, in sample_type_processor
    return merge_error_reports(*[f(opts, ids) for f in functions])
  File "/home/jona1883/software/American-Gut/americangut/per_sample.py", line 307, in alpha_plot
    fp=shannon_path)
  File "/home/jona1883/software/American-Gut/americangut/results_utils.py", line 730, in plot_alpha
    sample_alpha, group_alpha.mean()).expandtabs()
AttributeError: 'tuple' object has no attribute 'expandtabs'

I though you told me that you did not modify the plot alpha function?

squirrelo commented 8 years ago

The only change is to prepend the alpha diversity type, which we discussed offline. Investigating now.

On Jun 23, 2016, at 09:42, Jose Navas notifications@github.com wrote:

No it's not:

Exception: Traceback (most recent call last): File "/home/jona1883/software/American-Gut/americangut/parallel.py", line 27, in run_functor return functor(_args, _kwargs) File "/home/jona1883/software/American-Gut/americangut/per_sample.py", line 117, in sample_type_processor return merge_error_reports([f(opts, ids) for f in functions]) File "/home/jona1883/software/American-Gut/americangut/per_sample.py", line 307, in alpha_plot fp=shannon_path) File "/home/jona1883/software/American-Gut/americangut/results_utils.py", line 730, in plot_alpha sample_alpha, group_alpha.mean()).expandtabs() AttributeError: 'tuple' object has no attribute 'expandtabs' I though you told me that you did not modify the plot alpha function?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/biocore/American-Gut/pull/209#issuecomment-228109630, or mute the thread https://github.com/notifications/unsubscribe/AC77mqRD1GneoieEJ3DADL60ob3x8blpks5qOrd8gaJpZM4IMMnD.

squirrelo commented 8 years ago

Fixed the issue. Was missing parenthesis.