Skip to content
Permalink
Browse files

Merge pull request #503 from girder/download-analysis-table

Download ANOVA and Wilcoxon data tables
  • Loading branch information
jeffbaumes committed Feb 5, 2020
2 parents 32713a6 + 2231ca8 commit 9b6fbba4480abc3a73408d1dbe748a5ffab0755c
Showing with 31 additions and 0 deletions.
  1. +1 −0 web/package.json
  2. +11 −0 web/src/components/vis/AnovaTableTile.vue
  3. +10 −0 web/src/components/vis/WilcoxonPlotTile.vue
  4. +9 −0 web/yarn.lock
@@ -22,6 +22,7 @@
"d3-boxplot": "^0.7.5",
"d3-color": "^1.4.0",
"d3-drag": "^1.2.4",
"d3-dsv": "^1.2.0",
"d3-force": "^2.0.1",
"d3-format": "^1.3.2",
"d3-hierarchy": "^1.1.8",
@@ -1,11 +1,13 @@
<script>
import { csvFormat } from 'd3-dsv';
import AnovaTable from './AnovaTable.vue';
import VisTileLarge from './VisTileLarge.vue';
import ToolbarOption from '../toolbar/ToolbarOption.vue';
import MetaboliteFilter from '../toolbar/MetaboliteFilter.vue';
import MetaboliteColorer from '../toolbar/MetaboliteColorer.vue';
import plotData from './mixins/plotData';
import { SET_DATASET_SELECTED_COLUMNS } from '../../store/actions.type';
import { downloadCSV } from '../../utils/exporter';
export default {
components: {
@@ -61,6 +63,12 @@ export default {
};
},
},
methods: {
downloadTable() {
downloadCSV(csvFormat(this.tableData.data, ['Metabolite', 'Group', 'Intercept', ...this.tableData.pairs]), 'ANOVA');
},
},
};
</script>

@@ -78,6 +86,9 @@ vis-tile-large(v-if="plot", title="Anova Table", :loading="plot.loading", expand
v-layout(column)
v-slider.my-1.minCorrelation(v-model="threshold", label="0", thumb-label="always",
hide-details, min="0", max="0.1", step="0.001")
v-btn(flat, dark, block, @click="downloadTable")
v-icon.mr-2 {{ $vuetify.icons.save }}
| Download Table
anova-table(v-if="plot.data", :data="tableData", :threshold="threshold", v-model="selected")
</template>

@@ -1,11 +1,13 @@
<script>
import { csvFormat } from 'd3-dsv';
import WilcoxonPlot from './WilcoxonPlot.vue';
import VisTileLarge from './VisTileLarge.vue';
import ToolbarOption from '../toolbar/ToolbarOption.vue';
import MetaboliteFilter from '../toolbar/MetaboliteFilter.vue';
import MetaboliteColorer from '../toolbar/MetaboliteColorer.vue';
import plotData from './mixins/plotData';
import { SET_DATASET_SELECTED_COLUMNS } from '../../store/actions.type';
import { downloadCSV } from '../../utils/exporter';
export default {
components: {
@@ -61,6 +63,11 @@ export default {
};
},
},
methods: {
downloadTable() {
downloadCSV(csvFormat(this.tableData.data, ['Metabolite', ...this.tableData.pairs]), 'Wilcoxon');
},
},
};
</script>

@@ -78,6 +85,9 @@ vis-tile-large(title="Wilcoxon Test", :loading="plot.loading", expanded)
v-layout(column)
v-slider.my-1.minCorrelation(v-model="threshold", label="0", thumb-label="always",
hide-details, min="0", max="0.1", step="0.001")
v-btn(flat, dark, block, @click="downloadTable")
v-icon.mr-2 {{ $vuetify.icons.save }}
| Download Table
wilcoxon-plot(v-if="plot.data", :data="tableData", :threshold="threshold", v-model="selected")
</template>

@@ -3224,6 +3224,15 @@ d3-dsv@1:
iconv-lite "0.4"
rw "1"

d3-dsv@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/d3-dsv/-/d3-dsv-1.2.0.tgz#9d5f75c3a5f8abd611f74d3f5847b0d4338b885c"
integrity sha512-9yVlqvZcSOMhCYzniHE7EVUws7Fa1zgw+/EAV2BxJoG3ME19V6BQFBwI855XQDsxyOuG7NibqRMTtiF/Qup46g==
dependencies:
commander "2"
iconv-lite "0.4"
rw "1"

d3-ease@1:
version "1.0.5"
resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-1.0.5.tgz#8ce59276d81241b1b72042d6af2d40e76d936ffb"

0 comments on commit 9b6fbba

Please sign in to comment.
You can’t perform that action at this time.