Hi
Im trying to merge the table.qza and the rep.seq.qza but I get the following error:
"Cannot merge because there are no IDs shared across metadata objects "
How can this be? The tables were generated from the same run/analysis after dada2 plugin... Its not that I m trying to merge different anaylsis, shouldn t the metadata be the same? Am I using the wrong Plugin?
Hi @stella
You must merge two or more tables each other and two or more ref-seqs each other with different commands!
This function you have used qiime feature-table merge is only for merging tables! you are not allowed to merge Table and ref-seq each other!
If you do not have more tables to merge and more ref-seq to merge, just go on the nest step analysis.
By the way, you should add an output parameter to your command that I do not see it!
Good luck
Qiimer
As @TurboQiimer pointed out, the feature-table merge command is for merging multiple feature tables together.
You do not need to "merge" or "join" your FeatureTable[Frequency] or FeatureData[Sequence] - QIIME 2 commands keep those two data types separated in downstream steps.
Was there something in particular you were trying to accomplish here? Please share more details, if so!
What I would like to create is a table with the features + respective sequences matches with the sample. Example:
Sample ID -- Feature ID --- Sequence
Is this somehow possible?
I would like to have a new table showing the sequence and feature ID (like on the repseq table) as well as the frequency (as on the table.qza). In addition, I would like to have a column showing in which sample the sequence was found. Now I can only see on the table.qza the # of samples Observed in.
Hence, I would like to see the Sequences found on a sample resolution level.
The command I showed above was an example of how to rename the feature IDs - feel free to customize as you see fit. For example - export the FeatureData[Sequence], load in a spreadsheet editor, and create a new column with the ID labels you're looking for. Then follow the protocol I outlined above, but be sure to change the metadata-file and metadata-column params as necessary.
This would need to be done outside of the FeatureTable[Frequency] => I would export the data and customize as necessary. I'll point out too, you should be prepared for each feature to be seen in more than one sample - this kind of nested table usually leads to a lot of pain, in my experience.
I just re-read this and I'm not sure I follow - an unmodified FeatureTable[Frequency] shows the number of times a feature was observed in each sample. In order to determine the "# of samples observed in" you would need to derive that from this table, using the "observed_features" alpha diversity metric, for example. You could also manually count up the number of samples that have counts > 0.
The orientation of the FeatureTable[Frequency] is samples as rows, and features as columns, btw.
Ok, I m going to make an example.
I importd 8 samples. I see on the table.qzv that feature x has a Frequency of 389,179 and it also tell me that # of Samples Observed In is 7. I can now go to the repseq.qzv and check to which sequence the feature x corresponds.
What I m interested in, is to know in which 7 out of 8 samples the feature was present.
So I would like to know which sample was missing the feature x and the frequency of feautre x /sample. I assume the 389,179 refers to the 7 samples out of 8 total samples it appeared in...?
Ah, we were talking about two different things, you switched from talking about the FeatureTable[Frequency] data to the visualization produced by feature-table summarize. No worries!
Then, load the merged/metadata.tsv file in your favorite spreadsheet editor (or, if your favorite programming environment, I'll demonstrate here using Google Sheets):
Note the formula I entered at the top. This will show the samples that have observations corresponding to each individual feature.
An alternative visualization that gets the same information is feature-table heatmap:
Great. This worked out all the way it should and was very helpful!
Would there also be a way to merge the Seqences of the rep-seq.qza with a collapsed taxonomy.qza file, lets say when collapsed at the genus level..?
No, because after a table is collapsed based on taxonomy, the individual features (taxa) do not map to any single sequence. Instead, you could merge your table with your taxonomy using the same qiime metadata tabulate command that @thermokarst demonstrated above, just include the taxonomy as an additional --m-input-file. Then taxonomy can be viewed (and searched in the resulting visualization) side-by-side with sequences and abundance.