Skip to content
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

Add nicer API for using Qurro outside of QIIME 2 but from within Python #307

Open
fedarko opened this issue May 29, 2020 · 0 comments
Open
Labels
enhancement New feature or request interoperability Making Qurro work well with other bioinformatics tools

Comments

@fedarko
Copy link
Collaborator

fedarko commented May 29, 2020

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.

@fedarko fedarko added enhancement New feature or request interoperability Making Qurro work well with other bioinformatics tools labels May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request interoperability Making Qurro work well with other bioinformatics tools
Projects
None yet
Development

No branches or pull requests

1 participant