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

Custom data Enhancements for Plots Tab #4994

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
5 changes: 4 additions & 1 deletion src/pages/resultsView/ResultsViewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,10 @@ export default class ResultsViewPage extends React.Component<
entrezGeneIdToGene={store.entrezGeneIdToGene}
sampleKeyToSample={store.sampleKeyToSample}
genes={store.genes}
clinicalAttributes={store.clinicalAttributes}
clinicalAttributes={
store.plotClinicalAttributes
}
customAttributes={store.customAttributes}
genesets={store.genesets}
genericAssayEntitiesGroupByMolecularProfileId={
store.genericAssayEntitiesGroupByMolecularProfileId
Expand Down
22 changes: 16 additions & 6 deletions src/pages/resultsView/ResultsViewPageStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ export class ResultsViewPageStore extends AnalysisStore
this.studyIds,
this.clinicalAttributes_profiledIn,
this.clinicalAttributes_comparisonGroupMembership,
this.clinicalAttributes_customCharts,
Nelliney marked this conversation as resolved.
Show resolved Hide resolved
this.customAttributes,
Nelliney marked this conversation as resolved.
Show resolved Hide resolved
this.samples,
this.patients,
],
Expand Down Expand Up @@ -1142,7 +1142,7 @@ export class ResultsViewPageStore extends AnalysisStore
...specialAttributes,
...this.clinicalAttributes_profiledIn.result!,
...this.clinicalAttributes_comparisonGroupMembership.result!,
...this.clinicalAttributes_customCharts.result!,
...this.customAttributes.result!,
];
},
});
Expand Down Expand Up @@ -1187,7 +1187,7 @@ export class ResultsViewPageStore extends AnalysisStore
this.studyToDataQueryFilter,
this.clinicalAttributes_profiledIn,
this.clinicalAttributes_comparisonGroupMembership,
this.clinicalAttributes_customCharts,
this.customAttributes,
],
invoke: async () => {
let clinicalAttributeCountFilter: ClinicalAttributeCountFilter;
Expand Down Expand Up @@ -1270,7 +1270,7 @@ export class ResultsViewPageStore extends AnalysisStore
);
}
// add counts for custom chart clinical attributes
for (const attr of this.clinicalAttributes_customCharts.result!) {
for (const attr of this.customAttributes.result!) {
ret[attr.clinicalAttributeId] = attr.data!.filter(
d => d.value !== 'NA'
).length;
Expand Down Expand Up @@ -2723,7 +2723,17 @@ export class ResultsViewPageStore extends AnalysisStore
default: [],
});

readonly clinicalAttributes_customCharts = remoteData({
readonly plotClinicalAttributes = remoteData<ExtendedClinicalAttribute[]>({
await: () => [this.clinicalAttributes, this.customAttributes],
invoke: async () => {
return _.filter(
this.clinicalAttributes.result!,
attr => !this.customAttributes.result!.includes(attr)
);
},
});

readonly customAttributes = remoteData({
await: () => [this.sampleMap],
invoke: async () => {
let ret: ExtendedClinicalAttribute[] = [];
Expand Down Expand Up @@ -5693,7 +5703,7 @@ export class ResultsViewPageStore extends AnalysisStore
this.coverageInformation,
this.filteredSampleKeyToSample,
this.filteredPatientKeyToPatient,
this.clinicalAttributes_customCharts
this.customAttributes
);

public mutationCache = new MobxPromiseCache<
Expand Down
4 changes: 2 additions & 2 deletions src/pages/resultsView/oncoprint/TracksMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default class TracksMenu extends React.Component<IAddTrackProps, {}> {
await: () => [
this.props.store.clinicalAttributes,
this.clinicalAttributeIdToAvailableFrequency,
this.props.store.clinicalAttributes_customCharts,
this.props.store.customAttributes,
],
invoke: () => {
const uniqueAttributes = _.uniqBy(
Expand All @@ -167,7 +167,7 @@ export default class TracksMenu extends React.Component<IAddTrackProps, {}> {
};

const customChartClinicalAttributeIds = _.keyBy(
this.props.store.clinicalAttributes_customCharts.result!,
this.props.store.customAttributes.result!,
a => a.clinicalAttributeId
);

Expand Down
3 changes: 3 additions & 0 deletions src/pages/studyView/StudyViewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,9 @@ export default class StudyViewPage extends React.Component<
clinicalAttributes={
this.store.clinicalAttributes
}
customAttributes={
this.store.customAttributes
}
genesets={this.store.genesets}
genericAssayEntitiesGroupByMolecularProfileId={
this.store
Expand Down
4 changes: 2 additions & 2 deletions src/pages/studyView/StudyViewPageStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11439,7 +11439,7 @@ export class StudyViewPageStore
),
});

readonly clinicalAttributes_customCharts = remoteData({
readonly customAttributes = remoteData({
await: () => [this.sampleMap],
invoke: async () => {
let ret: ExtendedClinicalAttribute[] = [];
Expand Down Expand Up @@ -11485,7 +11485,7 @@ export class StudyViewPageStore
this.coverageInformation,
this.filteredSampleKeyToSample,
this.filteredPatientKeyToPatient,
this.clinicalAttributes_customCharts
this.customAttributes
);

private _numericGeneMolecularDataCache = new MobxPromiseCache<
Expand Down
Loading
Loading