-
Notifications
You must be signed in to change notification settings - Fork 11
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
NEW: Adds core beta diversity measures #6
Conversation
8336eff
to
0e10c54
Compare
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.
Hey @ChrisKeefe, this PR is looking pretty good. I was poking around at this this morning and noticed a few things that I wanted to bring to your attention. There is a bit of an inconsistency between the util tests, the decorator utils, and the view functions (the actions). In particular, the inconsistency has to do with the "file-based" biom files. The decorators (and their tests) all are set up to work withstr
filepaths, but the view annotations in your actions look like:
def faith_pd(table: BIOMV210Format, phylogeny: NewickFormat) -> pd.Series:
Note, the annotation for table
is BIOMV210Format
, not str
. I think it would make sense to "consolidate" on one view type: BIOMV210Format
. You can start to do that by following a few of the suggestions I have provided, inline.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
adjusts tests, does not handle 'auto' argument to these params
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.
Took a pass through the tests, they look great! I have a few minor requests (see inline). Thanks!
@thermokarst, I'm running into some squirrelly issues ( |
Just a mis-wiring issue - the problem is in qiime2/q2-diversity#273, not in this PR. You just need to match up the right applying this patch (below) to commit d2ec98091bc2c8c0ca05ec6c7c928dd5ae021d7b (in PR 273) fixes it up: diff --git a/q2_diversity/_core_metrics.py b/q2_diversity/_core_metrics.py
index 47a7b89..4f1ab57 100644
--- a/q2_diversity/_core_metrics.py
+++ b/q2_diversity/_core_metrics.py
@@ -61,9 +61,9 @@ def core_metrics_phylogenetic(ctx, table, phylogeny, sampling_depth, metadata,
dms = []
dms += unweighted_unifrac(table=cr.rarefied_table, phylogeny=phylogeny,
- n_jobs=n_jobs)
+ threads=n_jobs)
dms += weighted_unifrac(table=cr.rarefied_table, phylogeny=phylogeny,
- n_jobs=n_jobs)
+ threads=n_jobs)
pcoas = []
for dm in dms: |
I'm going to merge this PR so that busywork can chew away at it, we'll address any fallout in additional PRs. Then, if everything goes to plan, you'll have a good dev env to work with in travis, which should help keep you lined up on qiime2/q2-diversity#273. Also, I will do one sweeping pass over the whole repo tomorrow, to do a "holisitic" review. |
Thanks for pushing this through, @thermokarst. Totally possible it is a mis-wiring issue, but it may be elsewhere. The code I'm testing already looks like this: I'll give it a thorough looking over when I'm fresh. :) |
I think that sounds like a great idea. Let's: a) stop discussing here (a least for now), and instead move over to qiime2/q2-diversity#273 Thanks! |
For posterity, the |
This PR includes:
In addition, this PR attempts to impose consistent quoting across the package, with user-facing strings double-quoted, and non-user-facing strings, keys, etc single-quoted. See fd0e24e