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

Mutation pie chart and multi-selection table #4794

Merged
merged 29 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3f8b86b
group gene selection options by alteration type
qlu-cls Oct 2, 2023
2d0cc23
add mutation-data-counts endpoint and revamp renderAttributes giant s…
qlu-cls Oct 12, 2023
d9aa882
add sub menu options for mutation profile
qlu-cls Oct 18, 2023
48c6580
get mutation data and fix display text on add chart
qlu-cls Nov 2, 2023
5ce470e
fix filter and show pill tags for mutation count data
qlu-cls Nov 9, 2023
640f4a8
add mutation type table and disable group comparison
qlu-cls Nov 27, 2023
31b36d9
get mutation table download data
qlu-cls Nov 28, 2023
697ebcb
support and fix intersect and union selection on mutation table
qlu-cls Dec 7, 2023
b816a6c
ui update for mutation chart
qlu-cls Dec 19, 2023
9b9c502
fix pilltags, apis, and select
qlu-cls Jan 18, 2024
1298c88
cleanup code
qlu-cls Jan 19, 2024
5d69c31
resolve comments from Karthik
qlu-cls Jan 23, 2024
eaea1db
resolve Aaron's comments
qlu-cls Feb 12, 2024
26390ed
resolve Study View Page missing data
qlu-cls Feb 15, 2024
2efa35f
fix selecting more rows in mutation counts table
qlu-cls Feb 21, 2024
ea2468d
fix pilltag errors on intersection selection
qlu-cls Feb 21, 2024
99833a6
rename wild type to mutation type
qlu-cls Feb 23, 2024
dff40ac
Merge branch 'master' into mutation-pie-chart
7xuanlu Feb 23, 2024
dad6c54
fix type errors and conflicts
qlu-cls Feb 23, 2024
af4b7cb
fix GenomicDataCount
qlu-cls Feb 23, 2024
f0bbab1
Merge branch 'master' into mutation-pie-chart
7xuanlu Feb 29, 2024
40aafe0
fix e2e tests on SummaryTab
qlu-cls Feb 29, 2024
6245234
Merge branch 'master' into mutation-pie-chart
7xuanlu Mar 1, 2024
3c2ec30
update any to Partial in SummaryTab
qlu-cls Mar 1, 2024
fbaed5e
resolve Aaron's comments
qlu-cls Mar 12, 2024
8152f81
remove categories grouping and change colors for mutation pie chart
qlu-cls Apr 3, 2024
74c1587
Merge branch 'master' into mutation-pie-chart
7xuanlu Apr 3, 2024
94f9f9c
fix mutation categories type assertion
qlu-cls Apr 3, 2024
62abd1e
revert colors.ts changes and add callback to change Mutated vs Wild T…
qlu-cls Apr 5, 2024
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -714,10 +714,10 @@ export type GenomicDataBinFilter = {
export type GenomicDataCount = {
'count': number

'label': string

'uniqueCount': number

'label': string

'value': string

};
Expand Down Expand Up @@ -907,9 +907,8 @@ export type MutationDataFilter = {

'profileType': string

'values': Array < Array < DataFilterValue >
>

'values': Array < Array< DataFilterValue > >

};
export type MutationPositionIdentifier = {
'entrezGeneId': number
Expand Down Expand Up @@ -4815,6 +4814,85 @@ export default class CBioPortalAPIInternal {
return response.body;
});
};

fetchMutationDataCountsUsingPOSTURL(parameters: {
'genomicDataCountFilter': GenomicDataCountFilter,
$queryParameters ? : any
}): string {
let queryParameters: any = {};
let path = '/api/mutation-data-counts/fetch';

if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
var parameter = parameters.$queryParameters[parameterName];
queryParameters[parameterName] = parameter;
});
}
let keys = Object.keys(queryParameters);
return this.domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '');
};

/**
* Fetch mutation data counts by GenomicDataCountFilter
* @method
* @name CBioPortalAPIInternal#fetchMutationDataCountsUsingPOST
* @param {} genomicDataCountFilter - Genomic data count filter
*/
fetchMutationDataCountsUsingPOSTWithHttpInfo(parameters: {
'genomicDataCountFilter': GenomicDataCountFilter,
$queryParameters ? : any,
$domain ? : string
}): Promise < request.Response > {
const domain = parameters.$domain ? parameters.$domain : this.domain;
const errorHandlers = this.errorHandlers;
const request = this.request;
let path = '/api/mutation-data-counts/fetch';
let body: any;
let queryParameters: any = {};
let headers: any = {};
let form: any = {};
return new Promise(function(resolve, reject) {
headers['Accept'] = 'application/json';
headers['Content-Type'] = 'application/json';

if (parameters['genomicDataCountFilter'] !== undefined) {
body = parameters['genomicDataCountFilter'];
}

if (parameters['genomicDataCountFilter'] === undefined) {
reject(new Error('Missing required parameter: genomicDataCountFilter'));
return;
}

if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
var parameter = parameters.$queryParameters[parameterName];
queryParameters[parameterName] = parameter;
});
}

request('POST', domain + path, body, headers, queryParameters, form, reject, resolve, errorHandlers);

});
};

/**
* Fetch mutation data counts by GenomicDataCountFilter
* @method
* @name CBioPortalAPIInternal#fetchMutationDataCountsUsingPOST
* @param {} genomicDataCountFilter - Genomic data count filter
*/
fetchMutationDataCountsUsingPOST(parameters: {
'genomicDataCountFilter': GenomicDataCountFilter,
$queryParameters ? : any,
$domain ? : string
}): Promise < Array < GenomicDataCountItem >
> {
return this.fetchMutationDataCountsUsingPOSTWithHttpInfo(parameters).then(function(response: request.Response) {
return response.body;
});
};

fetchMolecularProfileSampleCountsUsingPOSTURL(parameters: {
'studyViewFilter' ? : StudyViewFilter,
$queryParameters ? : any
Expand Down Expand Up @@ -5542,89 +5620,6 @@ export default class CBioPortalAPIInternal {
return response.body;
});
};
fetchMutationDataCountsUsingPOSTURL(parameters: {
'projection' ? : "ID" | "SUMMARY" | "DETAILED" | "META",
'genomicDataCountFilter' ? : GenomicDataCountFilter,
$queryParameters ? : any
}): string {
let queryParameters: any = {};
let path = '/api/mutation-data-counts/fetch';
if (parameters['projection'] !== undefined) {
queryParameters['projection'] = parameters['projection'];
}

if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
var parameter = parameters.$queryParameters[parameterName];
queryParameters[parameterName] = parameter;
});
}
let keys = Object.keys(queryParameters);
return this.domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '');
};

/**
* Fetch mutation data counts by GenomicDataCountFilter
* @method
* @name CBioPortalAPIInternal#fetchMutationDataCountsUsingPOST
* @param {string} projection - Level of detail of the response
* @param {} genomicDataCountFilter - A web service for supplying JSON formatted data to cBioPortal clients. Please note that this API is currently in beta and subject to change.
*/
fetchMutationDataCountsUsingPOSTWithHttpInfo(parameters: {
'projection' ? : "ID" | "SUMMARY" | "DETAILED" | "META",
'genomicDataCountFilter' ? : GenomicDataCountFilter,
$queryParameters ? : any,
$domain ? : string
}): Promise < request.Response > {
const domain = parameters.$domain ? parameters.$domain : this.domain;
const errorHandlers = this.errorHandlers;
const request = this.request;
let path = '/api/mutation-data-counts/fetch';
let body: any;
let queryParameters: any = {};
let headers: any = {};
let form: any = {};
return new Promise(function(resolve, reject) {
headers['Accept'] = 'application/json';
headers['Content-Type'] = 'application/json';

if (parameters['projection'] !== undefined) {
queryParameters['projection'] = parameters['projection'];
}

if (parameters['genomicDataCountFilter'] !== undefined) {
body = parameters['genomicDataCountFilter'];
}

if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
var parameter = parameters.$queryParameters[parameterName];
queryParameters[parameterName] = parameter;
});
}

request('POST', domain + path, body, headers, queryParameters, form, reject, resolve, errorHandlers);

});
};

/**
* Fetch mutation data counts by GenomicDataCountFilter
* @method
* @name CBioPortalAPIInternal#fetchMutationDataCountsUsingPOST
* @param {string} projection - Level of detail of the response
* @param {} genomicDataCountFilter - A web service for supplying JSON formatted data to cBioPortal clients. Please note that this API is currently in beta and subject to change.
*/
fetchMutationDataCountsUsingPOST(parameters: {
'projection' ? : "ID" | "SUMMARY" | "DETAILED" | "META",
'genomicDataCountFilter' ? : GenomicDataCountFilter,
$queryParameters ? : any,
$domain ? : string
}): Promise < ResponseEntityListGenomicDataCountItem > {
return this.fetchMutationDataCountsUsingPOSTWithHttpInfo(parameters).then(function(response: request.Response) {
return response.body;
});
};
getAllReferenceGenomeGenesUsingGETURL(parameters: {
'genomeName': string,
$queryParameters ? : any
Expand Down
7 changes: 7 additions & 0 deletions src/pages/studyView/StudyViewConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export enum ChartTypeEnum {
SCATTER = 'SCATTER',
VIOLIN_PLOT_TABLE = 'VIOLIN_PLOT_TABLE',
MUTATED_GENES_TABLE = 'MUTATED_GENES_TABLE',
MUTATION_TYPE_COUNTS_TABLE = 'MUTATION_TYPE_COUNTS_TABLE',
STRUCTURAL_VARIANT_GENES_TABLE = 'STRUCTURAL_VARIANT_GENES_TABLE',
STRUCTURAL_VARIANTS_TABLE = 'STRUCTURAL_VARIANTS_TABLE',
CNA_GENES_TABLE = 'CNA_GENES_TABLE',
Expand All @@ -92,6 +93,7 @@ export enum ChartTypeNameEnum {
SCATTER = 'density plot',
VIOLIN_PLOT_TABLE = 'table',
MUTATED_GENES_TABLE = 'table',
MUTATION_TYPE_COUNTS_TABLE = 'table',
STRUCTURAL_VARIANT_GENES_TABLE = 'table',
STRUCTURAL_VARIANTS_TABLE = 'table',
CNA_GENES_TABLE = 'table',
Expand Down Expand Up @@ -207,6 +209,11 @@ const studyViewFrontEnd = {
h: 2,
minW: 2,
},
[ChartTypeEnum.MUTATION_TYPE_COUNTS_TABLE]: {
w: 2,
h: 2,
minW: 2,
},
[ChartTypeEnum.STRUCTURAL_VARIANT_GENES_TABLE]: {
w: 2,
h: 2,
Expand Down
Loading
Loading