qurro
qurro copied to clipboard
Add nicer API for using Qurro outside of QIIME 2 but from within Python
Analogous to how Emperor has an easy-to-use emperor.Emperor
interface, shown off here.
This probably wouldn't need to differ that much from Emperor's interface.
The current way of generating Qurro plots from within Python (without using QIIME 2) is something like:
from qurro.scripts._plot import plot
from click.testing import CliRunner
CliRunner.invoke(plot, [
"--ranks", "ranksfile",
"--table", "tablefile",
"--sample-metadata", "smfile",
"--feature-metadata", "fmfile",
"--output-dir", "outputdir"
])
...Where the *file
and outputdir
strings are replaced with the real file / directory paths you want to use. Note that I haven't tested this personally so I can't guarantee it'll work.
A nicer version, although not super consistent with how Emperor's API looks, might work something like:
from qurro import make_qurro_plot
make_qurro_plot("ranksfile", "tablefile", "smfile", "fmfile", "outputdir")
Hopefully things could be set up so the amount of unique code this would require is minimal (perhaps restructuring things so that qurro.scripts._plot
actually calls make_qurro_plot()
directly).
Based on discussion with @cameronmartino. This would be useful for the gemelli tutorials.