Closed ngehlenborg closed 8 years ago
There's some stochasticity in the k-means clustering. Currently, k-means clustering is used to identify 2 main "subpopulations" in the data. If the k-means clusters change, then the PCA colorings will change, and all the downstream differential expression analysis (p-value, fold-change, and volcano plot) will change. Since the heatmap columns are sorted by fold change, the row ordering changes.
I was considering getting rid of the k-means clustering and just using a cutree(k=2) equivalent on the hierarchical clustering. Alternatively, if there's a way to set a random seed via Javascript, that could work too. Do you have any recommendations?
Could you store the results of the k-means clustering in localStorage or sessionStorage and only rerun the k-means when the data changes?
I haven't yet figure out how to best use localStorage or sessionStorage since both require strings rather than objects. The latest commit https://github.com/JEFworks/ubit2/commit/3c19e62fba46d2ec99559a9be582cd0ea7e4bb83 allows each panel to be run separately, so users can keep the k-means clustering they have while re-running the hierarchical clustering analysis for example.
Consider trying localForage to store results in the user's browser.
Every time I reload the page I get different results (without changing anything). Is that intentional?