Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default axis scale to frequency in group comparison lollipop plot #4442

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/pages/groupComparison/GroupComparisonMutationsTabPlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default class GroupComparisonMutationsTabPlot extends React.Component<
mutations: Mutation[],
group: string
) {
return this.props.store.userSelectedAxisMode === AxisScale.COUNT
return this.props.store.axisMode === AxisScale.COUNT
? countUniqueMutations(mutations)
: (countUniqueMutations(mutations) /
this.props.store.groupToProfiledSamples.result![group]
Expand Down Expand Up @@ -124,7 +124,7 @@ export default class GroupComparisonMutationsTabPlot extends React.Component<
plotLollipopTooltipCountInfo={
plotLollipopTooltipCountInfo
}
axisMode={this.props.store.userSelectedAxisMode}
axisMode={this.props.store.axisMode}
onScaleToggle={this.props.onScaleToggle}
plotYAxisLabelFormatter={plotYAxisLabelFormatter}
/>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/groupComparison/GroupComparisonStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {
} from 'shared/api/session-service/sessionServiceModels';
import ComplexKeySet from 'shared/lib/complexKeyDataStructures/ComplexKeySet';
import { REQUEST_ARG_ENUM } from 'shared/constants';
import { DataFilter } from 'react-mutation-mapper';
import { AxisScale, DataFilter } from 'react-mutation-mapper';
import { getAllGenes } from 'shared/lib/StoreUtils';
import {
CoverageInformation,
Expand Down Expand Up @@ -458,8 +458,8 @@ export default class GroupComparisonStore extends ComparisonStore {
return this.urlWrapper.query.selectedGene;
}

@computed get userSelectedAxisMode() {
return this.urlWrapper.query.axisMode;
@computed get axisMode() {
return this.urlWrapper.query.axisMode || AxisScale.PERCENT;
}

@computed get activeMutationMapperGene() {
Expand Down