Hi again,
Picking up from my last issue. I'm having a problem where I'm trying to filter-features based on a metadata file (output of another vsearch-based filter-feature run) and nothing is being filtered.
Right from the beginning:
I export a text feature-table and a FASTA rep-seqs from R and convert both line endings with dos2unix to run these in my VM Q2.
I successfully import them into qiime:
echo -n "#OTU Table" | cat - seqtab-nochim.txt > unfiltered-table.txt
biom convert -i unfiltered-table.txt -o unfiltered-table.biom --table-type='OTU table' --to-hdf5
qiime tools import \
--input-path unfiltered-table.biom \
--type 'FeatureTable[Frequency]' \
--input-format BIOMV210Format \
--output-path unfiltered-table.qza
qiime tools import \
--input-path rep-seqs.fna\
--output-path rep-seq.qza \
--type 'FeatureData[Sequence]'
unfiltered-table.qza (341.2 KB) | unfiltered-table.qzv
rep-seqs.qza (153.4 KB) | rep-seqs.qzv
The aim is to get rid of a bunch of host-contamination sequences so:
qiime quality-control exclude-seqs \
--i-query-sequences rep-seq.qza \
--i-reference-sequences ../88_otus.qza \
--p-method vsearch \
--p-perc-identity 0.65 \
--p-perc-query-aligned 0.60 \
--p-threads 6 \
--o-sequence-hits hits.qza \
--o-sequence-misses misses.qza \
--verbose
Everything works as expected, no problem so far. The sum of features from the hits and misses file add up to the total features I initially had, great.
hits.qza (88.1 KB) | hits.qzv
misses.qza (70.6 KB) | misses.qzv
So then I go to filter the sequences in misses.qza file from my feature-table:
qiime feature-table filter-features \
--i-table unfiltered-table.qza \
--m-metadata-file misses.qza \
--p-exclude-ids \
--o-filtered-table exclude-misses-table.qza \
--verbose
exclude-misses-table.qza (416.3 KB) | exclude-misses-table.qzv
The command runs successfully without an error but the new filtered table has not been filtered. It is the same as its unfiltered version.
Even more weird, when I try to do the reverse and filter my table and retain everything from hits.qza, everything is filtered!
qiime feature-table filter-features \
--i-table unfiltered-table.qza \
--m-metadata-file hits.qza \
--o-filtered-table include-hits-table.qza \
--verbose
include-hits-table.qza (98.9 KB) | include.hits.qzv
I've used these scripts/methods in 2018.11 no problem when I was performing everything from within qiime2. I initially thought there was still something wrong with my importing from R but everything else looks good up until this last step. So I'm not sure what I'm missing. Hope it's another simple fix I'm foolishly overlooking