I think you are very close! Take a look at the docs for filter-samples. Notice how the --p-exclude-ids only works when you also pass the --p-where flag.
Hey @colinbrislawn, the --p-where parameter is not a requirement for --p-exclude-ids, it is optional. What isn't optional is the --m-metadata-file --- that parameter is required. As the help text states:
If True, the samples selected by the metadata and optional where parameter will be excluded from the filtered data.
@moonlight - if those Sample IDs aren't in 1st.bacteria.demux.qza in the first place then the filtering would be a no-op, like you have described. Can you confirm the Sample IDs in 1st.bacteria.demux.qza by running demux summarize on this file and reviewing the Sample IDs there? Please send a screenshot or the QZV so that we can get a closer look.
I guess I figured out. I figure by sample ID. I need to filter out the sample that I don’t want too. I have to create another tsv (metafile) for this filter process. However, there is no details description about the metafile format.
I do this before
sampleid
1
2
3
However, the header is not correct and it must be “SampleID” and it is case sensitive.
Sound's good - I assumed that is what we were discussing above.
Not necessarily - you can include a --p-where clause if you want that describes which IDs (directly or indirectly) to remove. If you don't want to use --p-where, then yes, a new Metadata file is necessary.
The format and specification are discussed in detail there.
What error did you see? As you can see here, we support sampleid as an "Identifier Column" label. In fact, you can view an example of this in action here:
I know you support this -- sampleid. There is no error and the program runs smoothly. I don't remember any error (if I am correctly). Your feature table doesn't change anything, still the old one untill I use "SampleID".
My version is 2019.10 and I am not sure if this is a bug. You could give it a try. I am new to QIIME2, I might have made mistake.