qiime2 / q2-cutadapt

BSD 3-Clause "New" or "Revised" License
3 stars 18 forks source link

Output multiple artifacts per primer, similar to Cutadapt's demultiplexing method #60

Open lina-kim opened 10 months ago

lina-kim commented 10 months ago

Addition Description It would be useful to bin reads by primer prior to primer removal. I'd like to separate a single FASTQ-based artifact (containing several different primers) into multiple output artifacts by primer; each output artifact would be characterized by a single primer. This would be helpful for meta-analyses in which sequences with multiple primers/variable regions may be found in a single QIIME artifact.

This is possible with native Cutadapt (as of v4.5) using steps to demultiplex, but not in the QIIME 2 plugin as its inputs are restricted to specific semantic types.

Current Behavior

Proposed Behavior

Questions

  1. Does QIIME 2 allow for variable numbers of output artifacts? I suppose that would be a blocker to implementation.

References

  1. Cutadapt manual, "Demultiplexing"
  2. QIIME 2 docs, qiime cutadapt trim-paired
ebolyen commented 1 month ago

This is totally possible now with Collection[...] as an output. Is this something you would be interested in working on @lina-kim?

lina-kim commented 1 month ago

Great to know, thanks @ebolyen! Yes, I would be more than happy to work on it. Is Collection[...] a semantic type found in q2-types / the base QIIME 2 installation? I'm not seeing much documentation for it on first glance.

gregcaporaso commented 1 month ago

Hey @lina-kim, I am actually working on some tutorial content that includes Collection right now. You can see the working draft here. Note that you'll only be able to access this tutorial page through this like as it's built from a pull-request (so you won't find this content if you navigate from https://develop.qiime2.org yet). This link will also break once the corresponding PR is merged.

You can also find the new API docs on Collection here.

Want to take a look at that and let us know if you have questions about how to use Collection?

lina-kim commented 1 month ago

Perfect, thanks for the resources @gregcaporaso! I'll check them out and get back to you with any questions.