Can't tabulate dada2 denoising_stats in python

After running qiime2.plugins.dada2.methods.denoise_single, I have a SampleData[DADA2Stats] artifact. When I try convert this to a visualization using qiime2.plugins.metadata.visualizers.tabulate, it errors out:

TypeError: Parameter 'input' requires an argument of type Metadata. An argument of type SampleData[DADA2Stats] was passed.

This issue is not present with the CLI version of tabulate, so I can use os.system() to run that within my script, but it's not ideal.

Hi @dylan!

You're missing a .view() step prior to visualizing. Viewing as Metadata happens automatically on the CLI, which is why you don't see the same problem there.

Try adding a x = dada2_denoising_artifact.view(qiime2.Metadata) before tabulating, then feed x into the tabulate step.

Keep us posted!



Worked like a charm, thanks.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.