Hi,
I ran the qiime diversity beta-group-significance command in qiime-2018.11 I have two groups extraction methods and primers. The boxplot produced through this command is giving distance within the same group. I actually want to compare the extraction methods and primers and show the distances between two groups. I went through the qiime longitudinal pairwise-distances tutorial but there we require specific state and studyid values. I don’t have those values for my data. is there any way I can create a distance box plot calculating the distance based on two groups using weighted unifrac distance matrix.
I think qiime longitudinal pairwise-distances is probably still your best bet here. You may need to fidget your metadata, though.
Let’s say you want to compare the effect of primer on the distance between your two extraction techniques. Then, you “state” variable will be the extraction column, where state-1 is the first method, and state-2 is the second. Your “group” column will be the primer. And then, you’ll pass a column with original sample the identifier for the two technical replicates.
Dear Justine,
Thank you for the suggestion. As per your suggestion I used "state" variable as the extraction method where state - 1 is method 1 and state-2 is method2 and my group column as the primer. I gave the studyid the name of the samples, that is both my SampleID and StudtyID are same. Following was the command I used:
After running this command when opening the qzv file I am not getting a boxplot figure. The resulting figure is blank with my variables labelled. Should I post this in the technical section as a new post? Could you please help me to resolve this problem.
Is there anyway that I could export the unifrac weighted distance matrix to a csv. If this option is there then it will be very helpful.
I have attached the unifrac_weighted_distancematrix, qzv file and metadata here
Dear Justine,
Thank you for the reply. I have modified the metadata based on your suggestion. But still the output does not produce boxplot nor the statistical results. I really couldn't figure out the problem. If there is any way I could download the distance matrix data in a csv format that will be very helpful. The following commands were used:
qiime longitudinal pairwise-distances
--i-distance-matrix final_merged-soil-swab-v1-v3-v3-v4-core-metrics-results/weighted_unifrac_distance_matrix.qza
--m-metadata-file metadata-merged_allwe-gene-final.tsv
--p-group-column 16S_Regions
--p-state-column ExtractionMethods
--p-state-1 Soil_DNA
--p-state-2 Swab_DNA
--p-individual-id-column Sample_Region
--p-replicate-handling random
--o-visualization final_merged-soil-swab-v1-v3-v3-v4-core-metrics-results/extraction_vs_16S_regions-pairwise-distances.qzv
You are not using an appropriate individual ID column. That column should specify the precise sample that you analyzed using two different methods. A paired method like this will only be appropriate if you are examining identical samples processed using your different methods — it is not clear if that is the case. If it is, you will need a separate metadata column that indicates which unique individual subject each sample came from — and each value should be found twice: once at state 1 and once at state 2.
Given the metadata that you have now, I would recommend instead using qiime diversity beta-group-significance as you originally planned. Simply make a new metadata column that concatenates your two columns of interest. You wish to compare across 16S regions AND extraction methods, so you can just make a new column that concatenates this information so you have the following groups:
Dear Nicholas,
Thank you for the suggestion. Instead of grouping the primers and extraction method, grouping of samples in specific category was the appropriate way for pair comparison, which worked fine. I have a suggestion, along with the PCoA values if we could also download the distance matrix of any analysis we perform, it will be a great help. With that matrix I could generate my own plot in R using different R functions
Regards
Sree