You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.
observation_metadata_correlation.py has a show-stopping bug that causes the script to return incorrect values for any set of mapping file, biom file where the order of the samples returned by iterating over the dictionary representation of the mapping file doesn't end up being the same as the order of the samples in the biom table (I would guess these almost never line up).
Line 202 of scripts/observation_metadata_correlation.py is where the error is. It is simple:
# sort the biom table so that feature values are retrieved in the same# order as the metadata in the samples they correspond tobt.sort(sort_f=lambda_: samples_to_correlate, axis='sample')
.sort doesn't work in place, so the sorted biom table is not returned. Simply changing this to return a new biom table object solves the problem.
The reason that QIIME was not catching this bug is because the error was in the script rather than the library file. A refactor of this script would be nice to move the offending functionality to library code.
wdwvt1
added a commit
to wdwvt1/qiime
that referenced
this issue
May 15, 2015
observation_metadata_correlation.py
has a show-stopping bug that causes the script to return incorrect values for any set of mapping file, biom file where the order of the samples returned by iterating over the dictionary representation of the mapping file doesn't end up being the same as the order of the samples in the biom table (I would guess these almost never line up).Line 202 of
scripts/observation_metadata_correlation.py
is where the error is. It is simple:.sort
doesn't work in place, so the sorted biom table is not returned. Simply changing this to return a new biom table object solves the problem.See here for the user first reporting this issue.
The text was updated successfully, but these errors were encountered: