Skip to content

Commit

Permalink
feat: color tree by clade and filter by Node Type - New by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-aksamentov committed Mar 10, 2021
1 parent 13af3ad commit 79de7cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/web/src/algorithms/tree/treePostprocess.ts
Expand Up @@ -89,7 +89,7 @@ export function treePostProcess(auspiceData: AuspiceJsonV2Extended): AuspiceJson
// TODO: this can be done offline when preparing the json
auspiceData.meta.display_defaults = {
branch_label: 'clade',
color_by: NODE_TYPE,
color_by: 'clade_membership',
distance_measure: 'div',
}
auspiceData.meta.panels = ['tree', 'entropy']
Expand Down
3 changes: 2 additions & 1 deletion packages/web/src/state/algorithm/algorithmRun.sagas.ts
Expand Up @@ -17,7 +17,7 @@ import { notUndefined } from 'src/helpers/notUndefined'
import { fsaSagaFromParams } from 'src/state/util/fsaSagaFromParams'
import fsaSaga from 'src/state/util/fsaSaga'

import { auspiceStartClean } from 'src/state/auspice/auspice.actions'
import { auspiceStartClean, treeFilterByNodeType } from 'src/state/auspice/auspice.actions'
import {
algorithmRunAsync,
algorithmRunWithSequencesAsync,
Expand Down Expand Up @@ -144,6 +144,7 @@ export function* runAlgorithm() {
const auspiceDataPostprocessed = treePostProcess(auspiceDataNew)
yield* put(setOutputTree(JSON.stringify(auspiceDataPostprocessed, null, 2)))
yield* setAuspiceState(auspiceDataPostprocessed)
yield* put(treeFilterByNodeType(['New']))
yield* put(setAlgorithmGlobalStatus(AlgorithmGlobalStatus.allDone))
}

Expand Down
4 changes: 3 additions & 1 deletion packages/web/src/types/auspice/src/actions/tree.d.ts
@@ -1,3 +1,5 @@
declare module 'auspice/src/actions/tree' {
export function applyFilter(mode: string, trait: string, values: string[]): void
import { Action } from 'redux'

export function applyFilter(mode: string, trait: string, values: string[]): Action
}

0 comments on commit 79de7cd

Please sign in to comment.