Developing visualizations for package in dev

I am attempting to contribute a visualizer to the aldex2 plugin (R package), and I am running into a few walls. I have experience developing R packages, but next to none with the qiime2 framework and visualizing data using python.

I want to start with an x vs y-type plot. For my case, I can generate the artifact I need from my fork of the q2-aldex2 package from Jamie Morton’s Github.

From my understanding of the tutorial and docs, I believe I need to

  1. define a new semantic type for the artifact output from the method
  2. create a function to plot 2 columns of this artifact
  3. register the function
  4. output the visualization artifact
  5. view with the qiime visualizer

I am looking for resources on how to generate this plot, and define the semantic type. I have little (none) experience with visualizing data in python. It seems that seaborn is the python module that people are using, which is easy enough to learn, but I’m having trouble seeing how the plots in made with seaborn are outputted to the html page (or how to create these pages).

Any resources or tutorials, or even commented code for creating a simple plot using a visualizer would be very helpful!

Thanks,

Dan

1 Like

Hey there @dgiguer! Welcome to the community! We are getting ready to release QIIME 2 2019.7, so this reply might be a bit short, but hopefully steers you in the right direction:

This isn’t necessary for creating a visualizer — your new visualizer just needs to accept the semantic types created by q2-aldex2.

Yep! This can be done in R, Python, or whatever you want.

Yep! This has to happen in python.

Technically visualizers output visualizations.

Since you asked about seaborn, here is a very old PR that adds a visualizer using seaborn: https://github.com/qiime2/q2-feature-table/pull/132/files (you might want to look at the latest version of this code, though, the diff here is nice though because it shows the parts that are needed to get going).

You can also read up on Visualizers here: https://dev.qiime2.org/latest/actions/visualizers/

Please take a look at this stuff, and let us know. As I mentioned above, a bit swamped at the moment, but really excited to help you out! :t_rex: :qiime2:

thanks for the response! I got it worked out

1 Like