Closed walterst closed 11 years ago
Thanks Greg works great!
@walterst, any chance you have a test file for this one?
Here is an OTU table that will fail without the fix: http://tajmahal.colorado.edu/tmp/tmpmoPGaeST7Aotu_table.biom.zip
Slight problem with this one-the unit test does do a test for a case where there isn't a core microbiome-but the scripts/compute_core_microbiome.py has the actual bug in how the output data are built before being written, which isn't tested.
OK, thanks! I'll work on this.
Will get an error like the one posted at the end of this post if the OTU table has some non-shared OTUs (i.e. no shared OTUs across 95% of the samples).
This is due to otu_counts and fraction_for_core not having the same length. otu_counts has nothing appended to it when no OTUs are shared, and ends up being shorter than the fraction_for_core variable.
Quick fix: add: otu_counts.append(0) at line 109 of scripts/compute_core_microbiome.py
File "/home/fireantlabbfl/qiime_software/qiime-1.6.0-release/bin/compute_core_microbiome.py", line 148, in
main()
File "/home/fireantlabbfl/qiime_software/qiime-1.6.0-release/bin/compute_core_microbiome.py", line 135, in main
plot(fractions_for_core, otu_counts)
File "/home/fireantlabbfl/qiime_software/matplotlib-1.1.0-release/lib/python2.7/site-packages/matplotlib/pyplot.py", line 2458, in plot
ret = ax.plot(_args, _kwargs)
File "/home/fireantlabbfl/qiime_software/matplotlib-1.1.0-release/lib/python2.7/site-packages/matplotlib/axes.py", line 3848, in plot
for line in self._get_lines(_args, _kwargs):
File "/home/fireantlabbfl/qiime_software/matplotlib-1.1.0-release/lib/python2.7/site-packages/matplotlib/axes.py", line 323, in _grab_next_args
for seg in self._plot_args(remaining, kwargs):
File "/home/fireantlabbfl/qiime_software/matplotlib-1.1.0-release/lib/python2.7/site-packages/matplotlib/axes.py", line 300, in _plot_args
x, y = self._xy_from_xy(x, y)
File "/home/fireantlabbfl/qiime_software/matplotlib-1.1.0-release/lib/python2.7/site-packages/matplotlib/axes.py", line 240, in _xy_from_xy
raise ValueError("x and y must have same first dimension")
ValueError: x and y must have same first dimension