Download All Kruskal-Wallis Results


I have a lot of metadata factors and was wondering if there is a simpler way of viewing all the results from the Kruskal-Wallis testing. For example, I ran a pairwise Kruskal-Wallis analysis of the Observed OTUs and want to be able to just download all the H-vals, p-vals, etc. for all metadata columns without having to use the drop down box to go to each and download individually. Is this possible?


1 Like

Alas there is not a QIIME 2 command to export these as a fancy table, but doing so should be fairly easy using qiime tools export.

qiime tools export \
  --input-path observed_otus-alpha-significance.qzv \
  --output-path observed_otus-alpha-significance/

This will create a directory containing a whole bunch of different data files. If you want the per-column kruskal-wallis results, these are stored in a bunch of JSON files that you should be able to parse easily enough, and the within-column pairwise group comparisons are stored in a bunch of TSV files sharing the filepath observed_otus-alpha-significance/kruskal-wallis-pairwise-*.

I have nothing on-hand but if you or another forum user work out a quick script to parse these data to generate a nice table, please do share here!

1 Like

Thanks for response @Nicholas_Bokulich. I exported the JSON files and it seems they are in JSONP format. Is there an easy way to convert JSONP to JSON so it can be parsed?

1 Like

Hey there @Zach_Burcham! JSONP is just JSON, just pull the arguments out of the function (or, write your own function to be called by the padding function).

1 Like

Hi @thermokarst, one more question. Can I do something similar for the beta diversity group significance? I unzipped one of .qzv files from beta-group-significance and there are no JSONP files for this one. I can find the pvalue for the overall model in the HTML file, but is that the only place it is saved?

Unfortunately not - that viz isn't dynamic like the alpha-group-significance viz. Sorry! :qiime2: :t_rex:

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.