Skip to content

Commit

Permalink
Merge branch 'comparison_2023' into cohort_creation_experiments
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/Taskview/tasks/Filter.ts
  • Loading branch information
richardwolfmayr committed Sep 25, 2023
2 parents 085570d + a8e43b7 commit ba27f53
Show file tree
Hide file tree
Showing 5 changed files with 817 additions and 21 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@
"react-dom": "^16.13.0",
"react-router-dom": "^5.2.0",
"split-grid": "^1.0.9",
"tdp_core": "git+ssh://[email protected]/datavisyn/tdp_core#develop",
"tdp_publicdb": "git+ssh://[email protected]/caleydo/tdp_publicdb#develop",
"tdp_core": "git+ssh://[email protected]/datavisyn/tdp_core#semver:20.0.0",
"tdp_publicdb": "git+ssh://[email protected]/caleydo/tdp_publicdb#semver:14.0.0",
"tippy.js": "^6.2.6",
"tourdino": "git+ssh://[email protected]/caleydo/tourdino#develop",
"tourdino": "git+ssh://[email protected]/caleydo/tourdino#semver:8.0.0",
"vega": "~5.20.0",
"vega-embed": "6.19.1",
"vega-functions": "5.12.0",
"vega-lite": "5.1.1",
"vega-parser": "6.1.3",
"visyn_scripts": "git+ssh://[email protected]/datavisyn/visyn_scripts.git#develop"
"visyn_scripts": "git+ssh://[email protected]/datavisyn/visyn_scripts.git#semver:4.0.0"
},
"devDependencies": {
"@types/d3-selection": "^3.0.2",
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
tdp_core@git+https://github.com/datavisyn/tdp_core.git@develop#egg=tdp_core
tdp_publicdb@git+https://github.com/Caleydo/[email protected]#egg=tdp_publicdb
tdp_core==20.0.0
10 changes: 6 additions & 4 deletions src/Taskview/SearchBar.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { select } from 'd3v7';
import { IServerColumn } from 'visyn_core/base';
import { IdTextPair, RestBaseUtils } from 'tdp_core';
import { dataTypes, depletion, IDataSubtypeConfig, IDataTypeConfig } from 'tdp_publicdb';
import { dataTypes, depletion, IDataSubtypeConfig, IDataTypeConfig, mutation } from 'tdp_publicdb';
import { colors } from '../config/colors';
import { deepCopy, getAnimatedLoadingText, log } from '../util';
import { niceName } from '../utils/labels';
Expand Down Expand Up @@ -297,17 +297,19 @@ export class SearchBar {
}
})
.on('mouseover', (event, d) => {
// store in separate variable to keep the reference around for the mouseOverHandlers
const hoveredElement = event.currentTarget as HTMLElement;
if (d.optionType === 'gene') {
// set global optionId
this._geneHoverOptionId = d.optionId;
setTimeout(() => {
// update detail after timeout time global and current optionId is equal
if (d.optionId === this._geneHoverOptionId) {
this._mouseOverHandler(d, event.currentTarget);
this._mouseOverHandler(d, hoveredElement);
}
}, 200);
} else {
this._mouseOverHandler(d, event.currentTarget);
this._mouseOverHandler(d, hoveredElement);
}
})
.on('mouseout', (event, d) => {
Expand Down Expand Up @@ -934,7 +936,7 @@ export class SearchBar {
.html((v: IDataSubtypeConfig) => v.name)
.on('click', (event, v: IDataSubtypeConfig) => {
// merge subtype with the with d as the d.name is only available in the d variable
const dataSubType = { ...d, v };
const dataSubType = { ...d, ...v };
const badgeName = this._composeGeneDataTypeName(data.optionText, dataSubType.name);
const badgeData = deepCopy(data);
badgeData.optionData = { subType: dataSubType, type: (dataSubType as any).dataTypeId };
Expand Down
10 changes: 7 additions & 3 deletions src/Taskview/tasks/Filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { DensityPlot } from '../visualizations/DensityPlot';
import { GroupedBoxplot } from '../visualizations/GroupedBoxplot';
import { VegaGroupedHistogram } from '../visualizations/GroupedHistogram';
import { KaplanMeierPlot } from '../visualizations/KaplanMeierPlot';
import { Scatterplot } from '../visualizations/Scatterplot';
import { Scatterplot, TsneScatterplot } from '../visualizations/Scatterplot';
import { ATask } from './ATask';
import tippy from "tippy.js";
import {createDBCohortAutomatically, ICohortMultiAttrDBDataParams} from "../../base";
Expand Down Expand Up @@ -82,8 +82,6 @@ export class Filter extends ATask {
this.addControls();
break;
}


}

addVisSelector() {
Expand Down Expand Up @@ -148,6 +146,12 @@ export class Filter extends ATask {
}

private async showTsne(attributes: IAttribute[], cohorts: ICohort[]) {
// compiarion_2023
this.attributes = attributes;
this.cohorts = cohorts;
this.setVisualizations([TsneScatterplot]);

// cohort_creation_experiments
this.$visContainer.innerHTML = 'Currently, we only support the visualization of up to two attributes.';
// this.addControls(); // why does it not add if I add here, only if I add it in show()?
this.attributes = attributes;
Expand Down
Loading

0 comments on commit ba27f53

Please sign in to comment.