-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
"Match" table, tree, and sample metadata, and verify that things seem…
… ok (#154) * BUG/TST: Add back in data matching/checking code Closes #139, for real this time. Eventually we'll need to check that feature metadata matches up, but that is its own problem for later down the road. * STY: fix flake8 complaint * DOC: add all needed moving pix files & "make docs" Not sure why these files weren't here before, but this will make rerunning the tutorial easy. Also "make docs" is just a shorthand that saves extra typing when re-visualizing the moving pictures tree. We could integrate this into the travis build in the future if desired (of course this would be predicated on us getting QIIME 2 set up in the travis build, which would add on a few minutes to each build due to Q2 installation taking some time). * DOC: typo fix [ci skip] * BUG: Transpose feature tbl before matching it So apparently QIIME 2's transformers from biom table -> pd DataFrame produce DFs that are transposed from what biom.Table does -- QIIME 2 uses samples as the indices (rows) and features as the columns, while biom.Table does it the other way around. As you can imagine, this is pretty confusing! This commit should fix this problem from our end, but in the future we should really add logic to prevent having to do table-DF-transposition, since IIRC that can be super slow with massive DFs. (...We really oughta unit-test _plot.) * STY: rm extra blank line * TST: rename a prev matching test and add skeletons * TST: Add "no features shared" test for matching part of #139 fixes * TST: test a warning msg printed during matching * TST: Add sample dropping warning test think this pr should be good for now * DOC: add note to match_inputs() re #130 (TODO) * TST: Install and use QIIME 2 env in travis build * TST: Add actual Q2 integration test! Addresses @ElDeveloper's comment on #154. I'm keeping 'make docs' around since it could still be nifty (if you just wanna regenerate the empress-tree.qzv file without rerunning the tests, I guess). * TST: don't run 'make docs' on travis build Since the Q2 Artifact API test I just added does the same thing. * TST: Add rough Q2 visualization check #154 Addresses comment from @ElDeveloper * STY: Remove blank lines in match_inputs() Co-Authored-By: Yoshiki Vázquez Baeza <[email protected]> * STY: more blank line removals in docstring Co-Authored-By: Yoshiki Vázquez Baeza <[email protected]> * STY: rm blank lines in print_if_dropped docstring Co-Authored-By: Yoshiki Vázquez Baeza <[email protected]> * MNT: warn instead of printing re: sample dropping Tests haven't been updated yet -- will do so when --ignore-missing-samples option added in. (So this will currently break the tests.) This represents part of the work on addressing @ElDeveloper's comments on #154. * ENH: add UI skeleton for no-data sample/feat flags Per suggestion from @ElDeveloper in #154 * STY: make _plot inputs prettier * DOC: add ref to emperor --ignore-missing-samples * DOC: Remove 'standalone' instructions in README Just for now. When we resolve #140, we should add these instructions back in (likely we'll also have to adjust these when we get to the 'initial release' of Empress on PyPI / conda-forge / etc.) * DOC: switch feature/sample flag order, imprv docs * ENH: Add @ElDeveloper's suggested filtering flags This entailed substantial restructuring of match_inputs(). I also completely deleted warn_if_dropped(), because it was honestly easier to replace it with custom error messages for each of its 3 usages. (Also, that thing was like 50 lines of docstring / infrastructure for 8 lines of code. It was gnarly. :P) This isn't done yet! I still need to test this new behavior thoroughly, and to update the tests for the old functionality accordingly. * MNT: Avoid redundant table DF transpositions #155 * BUG: don't display useless warning in most cases * TST: reduce tests to just one working one will add more back (with relevant changes to work with new behavior) soon * DOC: add TODO note re empty checking * TST: add back "simple" matching error tests * TST: add + beef up tests of matching warnings, etc * TST: add --p-ignore-missing-samples tests * TST: add another cornercase test * TST: test final "warning" in matching func for now also fixed a bug in prev test i just added in, and removed extraneous comment * TST: Add other check for extra s.m. sample warning I think I'm satisfied with the new matching behavior tests, at least for now * DOC: update example QZV :) * MNT: don't warn on dropped samples from s.metadata See new comment for justification. Addresses comment from @ElDeveloper. Co-authored-by: Yoshiki Vázquez Baeza <[email protected]>
- Loading branch information
1 parent
cb25912
commit 2bd92b3
Showing
14 changed files
with
581 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
sample-id barcode-sequence body-site year month day subject reported-antibiotic-usage days-since-experiment-start | ||
#q2:types categorical categorical numeric numeric numeric categorical categorical numeric | ||
L1S8 AGCTGACTAGTC gut 2008 10 28 subject-1 Yes 0 | ||
L1S57 ACACACTATGGC gut 2009 1 20 subject-1 No 84 | ||
L1S76 ACTACGTGTGGT gut 2009 2 17 subject-1 No 112 | ||
L1S105 AGTGCGATGCGT gut 2009 3 17 subject-1 No 140 | ||
L2S155 ACGATGCGACCA left palm 2009 1 20 subject-1 No 84 | ||
L2S175 AGCTATCCACGA left palm 2009 2 17 subject-1 No 112 | ||
L2S204 ATGCAGCTCAGT left palm 2009 3 17 subject-1 No 140 | ||
L2S222 CACGTGACATGT left palm 2009 4 14 subject-1 No 168 | ||
L3S242 ACAGTTGCGCGA right palm 2008 10 28 subject-1 Yes 0 | ||
L3S294 CACGACAGGCTA right palm 2009 1 20 subject-1 No 84 | ||
L3S313 AGTGTCACGGTG right palm 2009 2 17 subject-1 No 112 | ||
L3S341 CAAGTGAGAGAG right palm 2009 3 17 subject-1 No 140 | ||
L3S360 CATCGTATCAAC right palm 2009 4 14 subject-1 No 168 | ||
L5S104 CAGTGTCAGGAC tongue 2008 10 28 subject-1 Yes 0 | ||
L5S155 ATCTTAGACTGC tongue 2009 1 20 subject-1 No 84 | ||
L5S174 CAGACATTGCGT tongue 2009 2 17 subject-1 No 112 | ||
L5S203 CGATGCACCAGA tongue 2009 3 17 subject-1 No 140 | ||
L5S222 CTAGAGACTCTT tongue 2009 4 14 subject-1 No 168 | ||
L1S140 ATGGCAGCTCTA gut 2008 10 28 subject-2 Yes 0 | ||
L1S208 CTGAGATACGCG gut 2009 1 20 subject-2 No 84 | ||
L1S257 CCGACTGAGATG gut 2009 3 17 subject-2 No 140 | ||
L1S281 CCTCTCGTGATC gut 2009 4 14 subject-2 No 168 | ||
L2S240 CATATCGCAGTT left palm 2008 10 28 subject-2 Yes 0 | ||
L2S309 CGTGCATTATCA left palm 2009 1 20 subject-2 No 84 | ||
L2S357 CTAACGCAGTCA left palm 2009 3 17 subject-2 No 140 | ||
L2S382 CTCAATGACTCA left palm 2009 4 14 subject-2 No 168 | ||
L3S378 ATCGATCTGTGG right palm 2008 10 28 subject-2 Yes 0 | ||
L4S63 CTCGTGGAGTAG right palm 2009 1 20 subject-2 No 84 | ||
L4S112 GCGTTACACACA right palm 2009 3 17 subject-2 No 140 | ||
L4S137 GAACTGTATCTC right palm 2009 4 14 subject-2 No 168 | ||
L5S240 CTGGACTCATAG tongue 2008 10 28 subject-2 Yes 0 | ||
L6S20 GAGGCTCATCAT tongue 2009 1 20 subject-2 No 84 | ||
L6S68 GATACGTCCTGA tongue 2009 3 17 subject-2 No 140 | ||
L6S93 GATTAGCACTCT tongue 2009 4 14 subject-2 No 168 |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.