Registering outputs with more than one possible type

I am creating a pipeline that runs a few different trimmer and aligner actions. The pipeline uses a config file that specifies what aligner and trimmer the pipeline should use. I want to save each intermediate step as output, however, depending on, for example, the type of aligner being used, the output could be one of two possible semantic types that I created. In addition, I wanted to be able to accept paired-end data or single-end data and output single-end or paired-end data from the trimming step in the pipeline. Is there a way to specify that the outputs in plugin_setup can be one of two types? I am considering simply saving the data without returning it, but I would lose the provenance. I am open to any ideas on how to accomplish this, thank you!

Hi @nicolesylvester,
It sounds like you want our typemap or typematch functionality.

We actually have new docs on both these functions! Check them out and let me know if you have any questions!

https://develop.qiime2.org/en/latest/plugins/references/api/types.html#qiime2.plugin.TypeMap

https://develop.qiime2.org/en/latest/plugins/references/api/types.html#qiime2.plugin.TypeMatch

5 Likes