Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emtpy samples should be (optionally) filtered after subsample-* actions #154

Open
gregcaporaso opened this issue Sep 22, 2023 · 0 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@gregcaporaso
Copy link
Member

@brett-van-tussler discovered that if a sample has 0 reads following qiime demux subsample-paired (or subsample-single), the sample will still be retained in the output. There should be an option to drop these samples from the resulting artfiact.

A workaround is as follows (once #151 is merged):

# subsample the Moving Pictures demux.qza such that all samples will likely have zero read count
qiime demux subsample-single --i-sequences demux.qza --p-fraction 0.0000000000000000000000001 --o-subsampled-sequences demux-empty.qza

# generate counts of reads on a per-sample basis (this is what we're waiting on #151 for)
qiime demux tabulate-read-counts --i-sequences demux-empty.qza --o-counts demux-empty-counts.qza

# tabulate those into a .qzv, just to confirm counts are zero
qiime metadata tabulate --m-input-file demux-empty-counts.qza --o-visualization demux-empty-counts.qzv

# filter all samples with a count of zero (this will fail if no samples have a count greater than 0)
qiime demux filter-samples --i-demux demux-empty.qza --m-metadata-file demux-empty-counts.qza --p-where "[Demultiplexed sequence count] > 0" --o-filtered-demux demux-empty-filtered.qza

# generate read counts on the filtered artifact
qiime demux tabulate-read-counts --i-sequences demux-empty-filtered.qza --o-counts demux-empty-filtered-counts.qza

# tabulate those into a .qzv to confirm that no samples are left
qiime metadata tabulate --m-input-file demux-empty-filtered-counts.qza --o-visualization demux-empty-filtered-counts.qzv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Development

No branches or pull requests

3 participants