Quickly get general stats about Artifact

I want to compare the sequences in my FeatureData[AlignedSequences] compared to after I run alignment.methods.mask(aligned_seqs). The long unpleasant way would seem to be to convert the Artifact to some skbio format and then count sequences - is there a shorter path?

e.g.

aligned_seqs = qiime.Artifact.load('aligned_seqs.qza') filtered_aligned_seqs = alignment.methods.mask(aligned_seqs)

Hi @lkursell! Right now there isn’t a convenient way to do this. We’ve thought it might be useful to implement some sort of plugin API to generate a summary of an artifact’s data (probably placed in metadata.yml). I created an issue to track progress on this feature.

In the meantime, the approach you described should work, or you could extract the raw data from your .qza file. You can use qiime tools export, qiime tools extract, or unzip manually to get at the raw data (it’ll be in a data subdirectory).

1 Like