Skip to content

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

Description

@fedarko

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinteroperabilityMaking Qurro work well with other bioinformatics tools

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions