From 4901c09ee3d021875d2ba9108533c8d06553603d Mon Sep 17 00:00:00 2001 From: alisman Date: Thu, 29 Jun 2023 14:09:46 -0400 Subject: [PATCH 01/48] add clickhouse mode --- src/config/config.ts | 5 +- src/pages/studyView/StudyViewPage.tsx | 29 ++- src/pages/studyView/StudyViewPageStore.ts | 192 +++++++++++------- src/pages/studyView/StudyViewPageTabs.ts | 1 + .../api/cbioportalInternalClientInstance.ts | 30 +++ 5 files changed, 180 insertions(+), 77 deletions(-) diff --git a/src/config/config.ts b/src/config/config.ts index 9e096df6b07..b8baa6f2b20 100644 --- a/src/config/config.ts +++ b/src/config/config.ts @@ -20,7 +20,9 @@ import internalGenomeNexusClient from '../shared/api/genomeNexusInternalClientIn import oncoKBClient from '../shared/api/oncokbClientInstance'; import genome2StructureClient from '../shared/api/g2sClientInstance'; import client from '../shared/api/cbioportalClientInstance'; -import internalClient from '../shared/api/cbioportalInternalClientInstance'; +import internalClient, { + internalClientColumnStore, +} from '../shared/api/cbioportalInternalClientInstance'; import $ from 'jquery'; import { AppStore } from '../AppStore'; import { CBioPortalAPI, CBioPortalAPIInternal } from 'cbioportal-ts-api-client'; @@ -194,6 +196,7 @@ export function initializeAPIClients() { // we need to set the domain of our api clients (client as any).domain = getCbioPortalApiUrl(); (internalClient as any).domain = getCbioPortalApiUrl(); + (internalClientColumnStore as any).domain = getCbioPortalApiUrl(); (genomeNexusClient as any).domain = getGenomeNexusApiUrl(); (internalGenomeNexusClient as any).domain = getGenomeNexusApiUrl(); (oncoKBClient as any).domain = getOncoKbApiUrl(); diff --git a/src/pages/studyView/StudyViewPage.tsx b/src/pages/studyView/StudyViewPage.tsx index 508fe36e461..e975b3e389b 100644 --- a/src/pages/studyView/StudyViewPage.tsx +++ b/src/pages/studyView/StudyViewPage.tsx @@ -27,7 +27,9 @@ import IFrameLoader from '../../shared/components/iframeLoader/IFrameLoader'; import { StudySummaryTab } from 'pages/studyView/tabs/SummaryTab'; import StudyPageHeader from './studyPageHeader/StudyPageHeader'; import CNSegments from './tabs/CNSegments'; - +import internalClient, { + internalClientColumnStore, +} from 'shared/api/cbioportalInternalClientInstance'; import AddChartButton from './addChartButton/AddChartButton'; import { sleep } from '../../shared/lib/TimeUtils'; import { Else, If, Then } from 'react-if'; @@ -145,9 +147,19 @@ export default class StudyViewPage extends React.Component< this.store = new StudyViewPageStore( this.props.appStore, ServerConfigHelpers.sessionServiceIsEnabled(), - this.urlWrapper + this.urlWrapper, + this.props.routing.query.legacy === '1' + ? internalClient + : internalClientColumnStore ); + // this.store_column_store = new StudyViewPageStore( + // this.props.appStore, + // ServerConfigHelpers.sessionServiceIsEnabled(), + // this.urlWrapper, + // internalClientColumnStore + // ); + // Expose store to window for use in custom tabs. setWindowVariable('studyViewPageStore', this.store); @@ -674,6 +686,19 @@ export default class StudyViewPage extends React.Component< store={this.store} > + + {/**/} + {/* */} + {/**/} + ({ invoke: () => { if (!_.isEmpty(this.unfilteredAttrsForNonNumerical)) { - return internalClient.fetchClinicalDataCountsUsingPOST({ + return this.internalClient.fetchClinicalDataCountsUsingPOST({ clinicalDataCountFilter: { attributes: this.unfilteredAttrsForNonNumerical, studyViewFilter: this.filters, @@ -4545,7 +4551,7 @@ export class StudyViewPageStore invoke: () => { //only invoke if there are filtered samples if (this.hasFilteredSamples) { - return internalClient.fetchCustomDataCountsUsingPOST({ + return this.internalClient.fetchCustomDataCountsUsingPOST({ clinicalDataCountFilter: { attributes: this.unfilteredCustomAttrsForNonNumerical, studyViewFilter: this.filters, @@ -4572,7 +4578,7 @@ export class StudyViewPageStore >({ invoke: () => { if (!_.isEmpty(this.newlyAddedUnfilteredAttrsForNonNumerical)) { - return internalClient.fetchClinicalDataCountsUsingPOST({ + return this.internalClient.fetchClinicalDataCountsUsingPOST({ clinicalDataCountFilter: { attributes: this .newlyAddedUnfilteredAttrsForNonNumerical, @@ -4601,7 +4607,7 @@ export class StudyViewPageStore this.hasSampleIdentifiersInFilter && this.newlyAddedUnfilteredAttrsForNumerical.length > 0 ) { - const clinicalDataBinCountData = await internalClient.fetchClinicalDataBinCountsUsingPOST( + const clinicalDataBinCountData = await this.internalClient.fetchClinicalDataBinCountsUsingPOST( { dataBinMethod: 'STATIC', clinicalDataBinCountFilter: { @@ -4642,7 +4648,7 @@ export class StudyViewPageStore return element !== undefined; } ); - const clinicalDataBinCountData = await internalClient.fetchClinicalDataBinCountsUsingPOST( + const clinicalDataBinCountData = await this.internalClient.fetchClinicalDataBinCountsUsingPOST( { dataBinMethod: 'STATIC', clinicalDataBinCountFilter: { @@ -4768,7 +4774,7 @@ export class StudyViewPageStore this._clinicalDataFilterSet.has(uniqueKey) || this.isInitialFilterState ) { - result = await internalClient.fetchClinicalDataCountsUsingPOST( + result = await this.internalClient.fetchClinicalDataCountsUsingPOST( { clinicalDataCountFilter: { attributes: [ @@ -4850,7 +4856,7 @@ export class StudyViewPageStore if (!this.hasFilteredSamples) { return []; } - result = await internalClient.fetchCustomDataCountsUsingPOST( + result = await this.internalClient.fetchCustomDataCountsUsingPOST( { clinicalDataCountFilter: { attributes: [ @@ -4898,7 +4904,7 @@ export class StudyViewPageStore return element !== undefined; } ); - const result2 = await internalClient.fetchCustomDataBinCountsUsingPOST( + const result2 = await this.internalClient.fetchCustomDataBinCountsUsingPOST( { dataBinMethod: 'STATIC', clinicalDataBinCountFilter: { @@ -4930,7 +4936,7 @@ export class StudyViewPageStore const attribute: ClinicalDataBinFilter = getDefaultClinicalDataBinFilter( chartMeta.clinicalAttribute! ); - const result = await internalClient.fetchCustomDataBinCountsUsingPOST( + const result = await this.internalClient.fetchCustomDataBinCountsUsingPOST( { dataBinMethod: 'STATIC', clinicalDataBinCountFilter: { @@ -4977,7 +4983,7 @@ export class StudyViewPageStore const attribute: ClinicalDataBinFilter = this._customDataBinFilterSet.get( uniqueKey )!; - const result = await internalClient.fetchCustomDataBinCountsUsingPOST( + const result = await this.internalClient.fetchCustomDataBinCountsUsingPOST( { dataBinMethod: 'STATIC', clinicalDataBinCountFilter: { @@ -5030,26 +5036,46 @@ export class StudyViewPageStore chartMeta.uniqueKey ); if (chartInfo) { - const result = await invokeGenericAssayDataCount( - chartInfo, - this.filters + let result: GenericAssayDataCountItem[] = []; + + result = await this.internalClient.fetchGenericAssayDataCountsUsingPOST( + { + genericAssayDataCountFilter: { + genericAssayDataFilters: [ + { + stableId: + chartInfo.genericAssayEntityId, + profileType: chartInfo.profileType, + } as GenericAssayDataFilter, + ], + studyViewFilter: this.filters, + } as GenericAssayDataCountFilter, + } ); if (_.isEmpty(result)) { return res; } - if (!this.chartToUsedColors.has(result!.stableId)) { - this.chartToUsedColors.set( - result!.stableId, - new Set() - ); + let data = result.find( + d => d.stableId === chartInfo.genericAssayEntityId + ); + let counts: ClinicalDataCount[] = []; + let stableId: string = ''; + if (data !== undefined) { + counts = data.counts.map(c => { + return { + count: c.count, + value: c.value, + } as ClinicalDataCount; + }); + stableId = data.stableId; + if (!this.chartToUsedColors.has(stableId)) { + this.chartToUsedColors.set(stableId, new Set()); + } } - return this.addColorToCategories( - result!.counts, - result!.stableId - ); + return this.addColorToCategories(counts, stableId); } return res; }, @@ -5209,7 +5235,7 @@ export class StudyViewPageStore if (!this.hasSampleIdentifiersInFilter) { return []; } - result = await internalClient.fetchClinicalDataBinCountsUsingPOST( + result = await this.internalClient.fetchClinicalDataBinCountsUsingPOST( { dataBinMethod, clinicalDataBinCountFilter: { @@ -5265,7 +5291,7 @@ export class StudyViewPageStore )!; //only invoke if there are filtered samples if (chartInfo && this.hasFilteredSamples) { - const genomicDataBins = await internalClient.fetchGenomicDataBinCountsUsingPOST( + const genomicDataBins = await this.internalClient.fetchGenomicDataBinCountsUsingPOST( { dataBinMethod: DataBinMethodConstants.STATIC, genomicDataBinCountFilter: { @@ -5315,7 +5341,7 @@ export class StudyViewPageStore chartMeta.uniqueKey )!; if (chartInfo) { - const gaDataBins = await internalClient.fetchGenericAssayDataBinCountsUsingPOST( + const gaDataBins = await this.internalClient.fetchGenericAssayDataBinCountsUsingPOST( { dataBinMethod: DataBinMethodConstants.STATIC, genericAssayDataBinCountFilter: { @@ -5746,7 +5772,7 @@ export class StudyViewPageStore readonly resourceDefinitions = remoteData({ await: () => [this.queriedPhysicalStudies], invoke: () => { - return internalClient.fetchResourceDefinitionsUsingPOST({ + return this.internalClient.fetchResourceDefinitionsUsingPOST({ studyIds: this.queriedPhysicalStudies.result.map( study => study.studyId ), @@ -5771,7 +5797,7 @@ export class StudyViewPageStore const promises = []; for (const resource of studyResourceDefinitions) { promises.push( - internalClient + this.internalClient .getAllStudyResourceDataInStudyUsingGET({ studyId: resource.studyId, resourceId: resource.resourceId, @@ -6683,6 +6709,16 @@ export class StudyViewPageStore this._chartVisibility, this.chartMetaSetForSummary ); + + // return [ { + // "uniqueKey": "msk_impact_2017_mutations", + // "dataType": "Genomic", + // "patientAttribute": false, + // "displayName": "Mutated Genes", + // "priority": 90, + // "renderWhenDataChange": false, + // "description": "" + // }] as ChartMeta[]; } @computed @@ -7723,7 +7759,7 @@ export class StudyViewPageStore attr => attr.attributeId ); - return internalClient.fetchClinicalDataCountsUsingPOST({ + return this.internalClient.fetchClinicalDataCountsUsingPOST({ clinicalDataCountFilter: { attributes, studyViewFilter: this.initialFilters, @@ -7754,7 +7790,7 @@ export class StudyViewPageStore >({ await: () => [this.initialVisibleAttributesClinicalDataBinAttributes], invoke: async () => { - const clinicalDataBinCountData = await internalClient.fetchClinicalDataBinCountsUsingPOST( + const clinicalDataBinCountData = await this.internalClient.fetchClinicalDataBinCountsUsingPOST( { dataBinMethod: 'STATIC', clinicalDataBinCountFilter: { @@ -8008,7 +8044,7 @@ export class StudyViewPageStore !_.isEmpty(studyViewFilter.sampleIdentifiers) || !_.isEmpty(studyViewFilter.studyIds) ) { - return internalClient.fetchFilteredSamplesUsingPOST({ + return this.internalClient.fetchFilteredSamplesUsingPOST({ studyViewFilter: studyViewFilter, }); } @@ -8128,7 +8164,7 @@ export class StudyViewPageStore )}` ); } - return internalClient.fetchFilteredSamplesUsingPOST({ + return this.internalClient.fetchFilteredSamplesUsingPOST({ studyViewFilter: this.filters, }); } else { @@ -8240,7 +8276,7 @@ export class StudyViewPageStore >( q => ({ invoke: async () => ({ - data: await internalClient.fetchClinicalDataViolinPlotsUsingPOST( + data: await this.internalClient.fetchClinicalDataViolinPlotsUsingPOST( { categoricalAttributeId: q.chartInfo.categoricalAttr.clinicalAttributeId, @@ -8332,7 +8368,7 @@ export class StudyViewPageStore ) { parameters.yAxisStart = 0; // mutation count always starts at 0 } - const result: any = await internalClient.fetchClinicalDataDensityPlotUsingPOST( + const result: any = await this.internalClient.fetchClinicalDataDensityPlotUsingPOST( parameters ); const bins = result.bins.filter( @@ -8392,7 +8428,7 @@ export class StudyViewPageStore : [this.mutationProfiles], invoke: async () => { if (!_.isEmpty(this.mutationProfiles.result)) { - let mutatedGenes = await internalClient.fetchMutatedGenesUsingPOST( + let mutatedGenes = await this.internalClient.fetchMutatedGenesUsingPOST( { studyViewFilter: this.filters, } @@ -8448,7 +8484,7 @@ export class StudyViewPageStore : [this.structuralVariantProfiles], invoke: async () => { if (!_.isEmpty(this.structuralVariantProfiles.result)) { - const structuralVariantGenes = await internalClient.fetchStructuralVariantGenesUsingPOST( + const structuralVariantGenes = await this.internalClient.fetchStructuralVariantGenesUsingPOST( { studyViewFilter: this.filters, } @@ -8504,7 +8540,7 @@ export class StudyViewPageStore : [this.structuralVariantProfiles], invoke: async () => { if (!_.isEmpty(this.structuralVariantProfiles.result)) { - const structuralVariantCounts = await internalClient.fetchStructuralVariantCountsUsingPOST( + const structuralVariantCounts = await this.internalClient.fetchStructuralVariantCountsUsingPOST( { studyViewFilter: this.filters, } @@ -8581,9 +8617,11 @@ export class StudyViewPageStore : [this.cnaProfiles], invoke: async () => { if (!_.isEmpty(this.cnaProfiles.result)) { - let cnaGenes = await internalClient.fetchCNAGenesUsingPOST({ - studyViewFilter: this.filters, - }); + let cnaGenes = await this.internalClient.fetchCNAGenesUsingPOST( + { + studyViewFilter: this.filters, + } + ); return cnaGenes.map(item => { return { ...item, @@ -8683,7 +8721,7 @@ export class StudyViewPageStore const molecularProfileIds = this.molecularProfiles.result.map( molecularProfile => molecularProfile.molecularProfileId ); - const report = await internalClient.fetchAlterationDriverAnnotationReportUsingPOST( + const report = await this.internalClient.fetchAlterationDriverAnnotationReportUsingPOST( { molecularProfileIds } ); return { @@ -9213,7 +9251,7 @@ export class StudyViewPageStore await: () => [this.molecularProfiles], invoke: async () => { const [counts, selectedSamples] = await Promise.all([ - internalClient.fetchMolecularProfileSampleCountsUsingPOST({ + this.internalClient.fetchMolecularProfileSampleCountsUsingPOST({ studyViewFilter: this.filters, }), toPromise(this.selectedSamples), @@ -9238,7 +9276,7 @@ export class StudyViewPageStore readonly caseListSampleCounts = remoteData({ invoke: async () => { const [counts, selectedSamples] = await Promise.all([ - internalClient.fetchCaseListCountsUsingPOST({ + this.internalClient.fetchCaseListCountsUsingPOST({ studyViewFilter: this.filters, }), toPromise(this.selectedSamples), @@ -9279,9 +9317,11 @@ export class StudyViewPageStore readonly initialMolecularProfileSampleCounts = remoteData({ invoke: async () => { - return internalClient.fetchMolecularProfileSampleCountsUsingPOST({ - studyViewFilter: this.initialFilters, - }); + return this.internalClient.fetchMolecularProfileSampleCountsUsingPOST( + { + studyViewFilter: this.initialFilters, + } + ); }, default: [], }); @@ -9342,7 +9382,7 @@ export class StudyViewPageStore let clinicalAttributeCountFilter = { sampleIdentifiers, } as ClinicalAttributeCountFilter; - return internalClient.getClinicalAttributeCountsUsingPOST({ + return this.internalClient.getClinicalAttributeCountsUsingPOST({ clinicalAttributeCountFilter, }); }, @@ -10050,7 +10090,7 @@ export class StudyViewPageStore } public readonly clinicalEventTypeCounts = remoteData({ invoke: async () => { - return internalClient.getClinicalEventTypeCountsUsingPOST({ + return this.internalClient.getClinicalEventTypeCountsUsingPOST({ studyViewFilter: this.filters, }); }, @@ -10064,9 +10104,11 @@ export class StudyViewPageStore filters.studyIds = this.queriedPhysicalStudyIds.result; return Promise.resolve( ( - await internalClient.getClinicalEventTypeCountsUsingPOST({ - studyViewFilter: filters as StudyViewFilter, - }) + await this.internalClient.getClinicalEventTypeCountsUsingPOST( + { + studyViewFilter: filters as StudyViewFilter, + } + ) ).length > 0 ); }, @@ -10392,7 +10434,7 @@ export class StudyViewPageStore await: () => [this.shouldDisplaySampleTreatments], invoke: () => { if (this.shouldDisplaySampleTreatments.result) { - return internalClient.getAllSampleTreatmentsUsingPOST({ + return this.internalClient.getAllSampleTreatmentsUsingPOST({ studyViewFilter: this.filters, }); } @@ -10403,7 +10445,7 @@ export class StudyViewPageStore public readonly shouldDisplayPatientTreatments = remoteData({ await: () => [this.queriedPhysicalStudyIds], invoke: () => { - return internalClient.getContainsTreatmentDataUsingPOST({ + return this.internalClient.getContainsTreatmentDataUsingPOST({ studyIds: toJS(this.queriedPhysicalStudyIds.result), }); }, @@ -10412,7 +10454,7 @@ export class StudyViewPageStore public readonly shouldDisplaySampleTreatments = remoteData({ await: () => [this.queriedPhysicalStudyIds], invoke: () => { - return internalClient.getContainsSampleTreatmentDataUsingPOST({ + return this.internalClient.getContainsSampleTreatmentDataUsingPOST({ studyIds: toJS(this.queriedPhysicalStudyIds.result), }); }, @@ -10424,7 +10466,7 @@ export class StudyViewPageStore await: () => [this.shouldDisplayPatientTreatments], invoke: () => { if (this.shouldDisplayPatientTreatments.result) { - return internalClient.getAllPatientTreatmentsUsingPOST({ + return this.internalClient.getAllPatientTreatmentsUsingPOST({ studyViewFilter: this.filters, }); } @@ -10436,7 +10478,7 @@ export class StudyViewPageStore await: () => [this.shouldDisplaySampleTreatmentGroups], invoke: () => { if (this.shouldDisplaySampleTreatmentGroups.result) { - return internalClient.getAllSampleTreatmentsUsingPOST({ + return this.internalClient.getAllSampleTreatmentsUsingPOST({ studyViewFilter: this.filters, tier: 'AgentClass', }); @@ -10451,7 +10493,7 @@ export class StudyViewPageStore if (!getServerConfig().enable_treatment_groups) { return Promise.resolve(false); } - return internalClient.getContainsTreatmentDataUsingPOST({ + return this.internalClient.getContainsTreatmentDataUsingPOST({ studyIds: toJS(this.queriedPhysicalStudyIds.result), tier: 'AgentClass', }); @@ -10464,7 +10506,7 @@ export class StudyViewPageStore if (!getServerConfig().enable_treatment_groups) { return Promise.resolve(false); } - return internalClient.getContainsSampleTreatmentDataUsingPOST({ + return this.internalClient.getContainsSampleTreatmentDataUsingPOST({ studyIds: toJS(this.queriedPhysicalStudyIds.result), tier: 'AgentClass', }); @@ -10477,7 +10519,7 @@ export class StudyViewPageStore await: () => [this.shouldDisplayPatientTreatmentGroups], invoke: () => { if (this.shouldDisplayPatientTreatmentGroups.result) { - return internalClient.getAllPatientTreatmentsUsingPOST({ + return this.internalClient.getAllPatientTreatmentsUsingPOST({ studyViewFilter: this.filters, tier: 'AgentClass', }); @@ -10490,7 +10532,7 @@ export class StudyViewPageStore await: () => [this.shouldDisplaySampleTreatmentTarget], invoke: () => { if (this.shouldDisplaySampleTreatmentTarget.result) { - return internalClient.getAllSampleTreatmentsUsingPOST({ + return this.internalClient.getAllSampleTreatmentsUsingPOST({ studyViewFilter: this.filters, tier: 'AgentTarget', }); @@ -10505,7 +10547,7 @@ export class StudyViewPageStore if (!getServerConfig().enable_treatment_groups) { return Promise.resolve(false); } - return internalClient.getContainsTreatmentDataUsingPOST({ + return this.internalClient.getContainsTreatmentDataUsingPOST({ studyIds: toJS(this.queriedPhysicalStudyIds.result), tier: 'AgentTarget', }); @@ -10518,7 +10560,7 @@ export class StudyViewPageStore if (!getServerConfig().enable_treatment_groups) { return Promise.resolve(false); } - return internalClient.getContainsSampleTreatmentDataUsingPOST({ + return this.internalClient.getContainsSampleTreatmentDataUsingPOST({ studyIds: toJS(this.queriedPhysicalStudyIds.result), tier: 'AgentTarget', }); @@ -10531,7 +10573,7 @@ export class StudyViewPageStore await: () => [this.shouldDisplayPatientTreatmentTarget], invoke: () => { if (this.shouldDisplayPatientTreatmentTarget.result) { - return internalClient.getAllPatientTreatmentsUsingPOST({ + return this.internalClient.getAllPatientTreatmentsUsingPOST({ studyViewFilter: this.filters, tier: 'AgentTarget', }); @@ -11061,14 +11103,16 @@ export class StudyViewPageStore // createStructuralVariantQuery(sv, this.plotsSelectedGenes.result!) // ); - return await internalClient.fetchStructuralVariantsUsingPOST({ - structuralVariantFilter: { - entrezGeneIds, - structuralVariantQueries: [], - sampleMolecularIdentifiers, - molecularProfileIds: [], - }, - }); + return await this.internalClient.fetchStructuralVariantsUsingPOST( + { + structuralVariantFilter: { + entrezGeneIds, + structuralVariantQueries: [], + sampleMolecularIdentifiers, + molecularProfileIds: [], + }, + } + ); } }, }); @@ -11368,7 +11412,7 @@ export class StudyViewPageStore readonly genesets = remoteData({ invoke: () => { if (this.genesetIds && this.genesetIds.length > 0) { - return internalClient.fetchGenesetsUsingPOST({ + return this.internalClient.fetchGenesetsUsingPOST({ genesetIds: this.genesetIds.slice(), }); } else { @@ -11414,7 +11458,7 @@ export class StudyViewPageStore if (_.isEmpty(filters)) { return []; } else { - return internalClient.fetchStructuralVariantsUsingPOST({ + return this.internalClient.fetchStructuralVariantsUsingPOST({ structuralVariantFilter: { entrezGeneIds: [q.entrezGeneId], sampleMolecularIdentifiers: filters, diff --git a/src/pages/studyView/StudyViewPageTabs.ts b/src/pages/studyView/StudyViewPageTabs.ts index bc76f0292d6..f70e5e445f0 100644 --- a/src/pages/studyView/StudyViewPageTabs.ts +++ b/src/pages/studyView/StudyViewPageTabs.ts @@ -1,5 +1,6 @@ export enum StudyViewPageTabKeyEnum { SUMMARY = 'summary', + SUMMARY_COLUMN_STORE = 'summaryColumnStore', CLINICAL_DATA = 'clinicalData', HEATMAPS = 'heatmaps', CN_SEGMENTS = 'cnSegments', diff --git a/src/shared/api/cbioportalInternalClientInstance.ts b/src/shared/api/cbioportalInternalClientInstance.ts index 0aa9e2f3c57..b376899fbcd 100644 --- a/src/shared/api/cbioportalInternalClientInstance.ts +++ b/src/shared/api/cbioportalInternalClientInstance.ts @@ -1,5 +1,35 @@ import { CBioPortalAPIInternal } from 'cbioportal-ts-api-client'; +import { getLoadConfig } from 'config/config'; +import { getBrowserWindow } from 'cbioportal-frontend-commons'; + +function proxyColumnStore(client: any, endpoint: string) { + if (getBrowserWindow().location.search.includes('legacy')) { + return; + } + + const method = `${endpoint}UsingPOSTWithHttpInfo`; + const old = client[method]; + + client[method] = function(params: any) { + params.$domain = `//${getLoadConfig().baseUrl}/api/column-store`; + const url = old.apply(this, [params]); + return url; + }; +} const internalClient = new CBioPortalAPIInternal(); +export const internalClientColumnStore = new CBioPortalAPIInternal(); + +const oldRequest = (internalClientColumnStore as any).request; +(internalClientColumnStore as any).request = function(...args: any) { + args[1] = args[1].replace(/column-store\/api/, 'column-store'); + return oldRequest.apply(this, args); +}; + +proxyColumnStore(internalClientColumnStore, 'fetchMutatedGenes'); +proxyColumnStore(internalClientColumnStore, 'fetchFilteredSamples'); +proxyColumnStore(internalClientColumnStore, 'fetchClinicalDataCounts'); +proxyColumnStore(internalClientColumnStore, 'fetchClinicalDataBinCounts'); + export default internalClient; From 25db97bcadbf8ef9966c3c5dfd489622b5c14e03 Mon Sep 17 00:00:00 2001 From: Neel Kuila Date: Tue, 18 Jun 2024 16:18:14 -0400 Subject: [PATCH 02/48] trigger precommit hooks (#4926) --- src/shared/api/cbioportalInternalClientInstance.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/api/cbioportalInternalClientInstance.ts b/src/shared/api/cbioportalInternalClientInstance.ts index b376899fbcd..5715f1e2a10 100644 --- a/src/shared/api/cbioportalInternalClientInstance.ts +++ b/src/shared/api/cbioportalInternalClientInstance.ts @@ -31,5 +31,6 @@ proxyColumnStore(internalClientColumnStore, 'fetchMutatedGenes'); proxyColumnStore(internalClientColumnStore, 'fetchFilteredSamples'); proxyColumnStore(internalClientColumnStore, 'fetchClinicalDataCounts'); proxyColumnStore(internalClientColumnStore, 'fetchClinicalDataBinCounts'); +proxyColumnStore(internalClientColumnStore, 'fetchClinicalDataDensityPlot'); export default internalClient; From 5084fff6b6c0a6cfcb30cdcf93bc4a814086a1e1 Mon Sep 17 00:00:00 2001 From: lismana Date: Mon, 24 Jun 2024 15:05:44 -0400 Subject: [PATCH 03/48] add new endpoints and use subdomain --- src/shared/api/cbioportalInternalClientInstance.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/shared/api/cbioportalInternalClientInstance.ts b/src/shared/api/cbioportalInternalClientInstance.ts index 5715f1e2a10..4b64d8d8415 100644 --- a/src/shared/api/cbioportalInternalClientInstance.ts +++ b/src/shared/api/cbioportalInternalClientInstance.ts @@ -10,8 +10,10 @@ function proxyColumnStore(client: any, endpoint: string) { const method = `${endpoint}UsingPOSTWithHttpInfo`; const old = client[method]; + const host = 'genie-public-beta1.cbioportal.org'; //getLoadConfig().baseUrl + client[method] = function(params: any) { - params.$domain = `//${getLoadConfig().baseUrl}/api/column-store`; + params.$domain = `//${host}/api/column-store`; const url = old.apply(this, [params]); return url; }; @@ -27,6 +29,13 @@ const oldRequest = (internalClientColumnStore as any).request; return oldRequest.apply(this, args); }; +proxyColumnStore(internalClientColumnStore, 'fetchCNAGenes'); +proxyColumnStore(internalClientColumnStore, 'fetchStructuralVariantGenes'); +proxyColumnStore(internalClientColumnStore, 'fetchCaseListCounts'); +proxyColumnStore( + internalClientColumnStore, + 'fetchMolecularProfileSampleCounts' +); proxyColumnStore(internalClientColumnStore, 'fetchMutatedGenes'); proxyColumnStore(internalClientColumnStore, 'fetchFilteredSamples'); proxyColumnStore(internalClientColumnStore, 'fetchClinicalDataCounts'); From 5033e091518a1019d36a52439af6f079e1a50736 Mon Sep 17 00:00:00 2001 From: lismana Date: Tue, 25 Jun 2024 12:25:02 -0400 Subject: [PATCH 04/48] conditionally point clickhouse at secondary subdomain of beta --- src/shared/api/cbioportalInternalClientInstance.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/shared/api/cbioportalInternalClientInstance.ts b/src/shared/api/cbioportalInternalClientInstance.ts index 4b64d8d8415..06a95984d0a 100644 --- a/src/shared/api/cbioportalInternalClientInstance.ts +++ b/src/shared/api/cbioportalInternalClientInstance.ts @@ -10,9 +10,13 @@ function proxyColumnStore(client: any, endpoint: string) { const method = `${endpoint}UsingPOSTWithHttpInfo`; const old = client[method]; - const host = 'genie-public-beta1.cbioportal.org'; //getLoadConfig().baseUrl - client[method] = function(params: any) { + const host = + getBrowserWindow().location.hostname === + 'genie-public-beta.cbioportal.org' + ? 'genie-public-beta1.cbioportal.org' + : getLoadConfig().baseUrl; + params.$domain = `//${host}/api/column-store`; const url = old.apply(this, [params]); return url; From cba5de7b8d7a7835381ffa6e3f9a4c9461037d73 Mon Sep 17 00:00:00 2001 From: lismana Date: Mon, 15 Jul 2024 11:44:36 -0400 Subject: [PATCH 05/48] Add clickhouse endpoint validation tool --- .../api/cbioportalInternalClientInstance.ts | 36 +++++ src/shared/api/validation.ts | 123 ++++++++++++++++++ 2 files changed, 159 insertions(+) create mode 100644 src/shared/api/validation.ts diff --git a/src/shared/api/cbioportalInternalClientInstance.ts b/src/shared/api/cbioportalInternalClientInstance.ts index 06a95984d0a..e2ff8109cbd 100644 --- a/src/shared/api/cbioportalInternalClientInstance.ts +++ b/src/shared/api/cbioportalInternalClientInstance.ts @@ -1,6 +1,9 @@ import { CBioPortalAPIInternal } from 'cbioportal-ts-api-client'; import { getLoadConfig } from 'config/config'; import { getBrowserWindow } from 'cbioportal-frontend-commons'; +import { toJS } from 'mobx'; +import { validate } from 'shared/api/validation'; +import _ from 'lodash'; function proxyColumnStore(client: any, endpoint: string) { if (getBrowserWindow().location.search.includes('legacy')) { @@ -17,8 +20,41 @@ function proxyColumnStore(client: any, endpoint: string) { ? 'genie-public-beta1.cbioportal.org' : getLoadConfig().baseUrl; + const oldRequest = this.request; + + const endpoints = [ + 'ClinicalDataCounts', + 'MutatedGenes', + 'CaseList', + 'ClinicalDataBin', + 'MolecularProfileSample', + 'CNAGenes', + 'StructuralVariantGenes', + 'FilteredSamples', + 'ClinicalDataDensity', + ]; + + const matchedMethod = method.match(new RegExp(endpoints.join('|'))); + if (localStorage.validateClickhouse && matchedMethod) { + this.request = function() { + const params = toJS(arguments[2]); + + oldRequest.apply(this, arguments); + + const url = + arguments[1].replace(/column-store\/api/, 'column-store') + + '?' + + _.map(arguments[4], (v, k) => `${k}=${v}&`).join(''); + + validate(url, params, matchedMethod[0]); + }; + } + params.$domain = `//${host}/api/column-store`; const url = old.apply(this, [params]); + + this.request = oldRequest; + return url; }; } diff --git a/src/shared/api/validation.ts b/src/shared/api/validation.ts new file mode 100644 index 00000000000..8485da9a754 --- /dev/null +++ b/src/shared/api/validation.ts @@ -0,0 +1,123 @@ +import _ from 'lodash'; + +export const isObject = (value: any) => { + return ( + typeof value === 'object' && + value !== null && + !Array.isArray(value) && + !(value instanceof RegExp) && + !(value instanceof Date) && + !(value instanceof Set) && + !(value instanceof Map) + ); +}; + +export function dynamicSort(property: string) { + var sortOrder = 1; + if (property[0] === '-') { + sortOrder = -1; + property = property.substr(1); + } + return function(a: any, b: any) { + /* next line works with strings and numbers, + * and you may want to customize it to your needs + */ + var result = + a[property] < b[property] ? -1 : a[property] > b[property] ? 1 : 0; + return result * sortOrder; + }; +} + +export function getArrays(inp: any, output: Array) { + if (inp instanceof Array) { + output.push(inp); + inp.forEach(n => getArrays(n, output)); + } else if (isObject(inp)) { + // do nothing + Object.values(inp).forEach(nn => getArrays(nn, output)); + } + return output; +} + +export function deepSort(inp: any) { + const arrs = getArrays(inp, []); + + arrs.forEach(arr => { + if (!arr.length) return; + if (!isObject(arr[0])) { + arr.sort(); + } else { + const fields = [ + 'attributeId', + 'value', + 'hugoGeneSymbol', + 'uniqueSampleKey', + ]; + fields.forEach(f => attemptSort(f, arr)); + } + }); + + return inp; +} + +function attemptSort(key: string, arr: any) { + if (key in arr[0]) arr.sort(dynamicSort(key)); +} + +export function compareCounts(clData: any, legacyData: any, label: string) { + const clDataSorted = deepSort(clData); + const legacyDataSorted = deepSort(legacyData); + + const result = + JSON.stringify(clDataSorted) === JSON.stringify(legacyDataSorted); + + if (result === false) { + _.forEach(clDataSorted, (cl: any, i: number) => { + if (JSON.stringify(cl) !== JSON.stringify(legacyDataSorted[i])) { + console.log( + `first invalid item (${label})`, + 'Clickhouse:', + cl, + 'Legacy:', + legacyDataSorted[i] + ); + return false; + } + }); + } + + return { + status: result, + }; +} + +export function validate(url: string, params: any, label: string) { + const clStart = performance.now(); + let chDuration: number, legacyDuration: number; + $.ajax({ + method: 'post', + url: url, + data: JSON.stringify(params), + contentType: 'application/json', + }).then(chResult => { + const legacyUrl = url.replace(/column-store\//, ''); + chDuration = performance.now() - clStart; + const legacyStart = performance.now(); + + $.ajax({ + method: 'post', + url: legacyUrl, + data: JSON.stringify(params), + contentType: 'application/json', + }).then(legacyResult => { + legacyDuration = performance.now() - legacyStart; + const result = compareCounts(chResult, legacyResult, label); + console.log({ + url, + legacyDuration, + chDuration: chDuration, + equal: result.status, + }); + }); + }); +} From 42d71437ae942ca056ad94102881611616647ec4 Mon Sep 17 00:00:00 2001 From: lismana Date: Thu, 1 Aug 2024 15:10:41 -0400 Subject: [PATCH 06/48] Adjust patient treatments --- .../generated/CBioPortalAPIInternal-docs.json | 247 ++++++++++++++++ .../src/generated/CBioPortalAPIInternal.ts | 279 +++++++++++++++++- .../cbioportal-ts-api-client/src/index.tsx | 2 + src/pages/studyView/StudyViewPageStore.ts | 52 ++-- src/pages/studyView/StudyViewUtils.tsx | 14 +- .../treatments/PatientTreatmentsTable.tsx | 31 +- .../table/treatments/treatmentsTableUtil.tsx | 5 +- .../api/cbioportalInternalClientInstance.ts | 1 + 8 files changed, 580 insertions(+), 51 deletions(-) diff --git a/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal-docs.json b/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal-docs.json index a8616dca66f..322c76aed3f 100644 --- a/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal-docs.json +++ b/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal-docs.json @@ -558,6 +558,41 @@ "operationId": "getClinicalEventTypeCountsUsingPOST" } }, + "/api/clinical-events-meta/fetch": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "clinicalEventAttributeRequest", + "schema": { + "$ref": "#/definitions/ClinicalEventAttributeRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/ClinicalEvent" + }, + "type": "array" + } + } + }, + "tags": [ + "Clinical Events" + ], + "description": "Fetch clinical events meta", + "operationId": "fetchClinicalEventsMetaUsingPOST" + } + }, "/api/cna-genes/fetch": { "post": { "consumes": [ @@ -593,6 +628,50 @@ "operationId": "fetchCNAGenesUsingPOST" } }, + "/api/column-store/treatments/patient-counts/fetch": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "default": "Agent", + "enum": [ + "Agent", + "AgentClass", + "AgentTarget" + ], + "in": "query", + "name": "tier", + "required": false, + "type": "string" + }, + { + "in": "body", + "name": "studyViewFilter", + "schema": { + "$ref": "#/definitions/StudyViewFilter" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PatientTreatmentReport" + } + } + }, + "tags": [ + "study-view-column-store-controller" + ], + "description": "Get all patient level treatments", + "operationId": "fetchPatientTreatmentCountsUsing" + } + }, "/api/cosmic-counts/fetch": { "post": { "consumes": [ @@ -3219,6 +3298,41 @@ "operationId": "getSignificantlyMutatedGenesUsingGET" } }, + "/api/survival-data/fetch": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "survivalRequest", + "schema": { + "$ref": "#/definitions/SurvivalRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/ClinicalData" + }, + "type": "array" + } + } + }, + "tags": [ + "Survival" + ], + "description": "Fetch survival data", + "operationId": "fetchSurvivalDataUsingPOST" + } + }, "/api/timestamps": { "get": { "produces": [ @@ -3958,6 +4072,27 @@ ], "type": "object" }, + "ClinicalEventAttributeRequest": { + "description": "clinical events Request", + "properties": { + "clinicalEventRequests": { + "items": { + "$ref": "#/definitions/ClinicalEventRequest" + }, + "type": "array", + "uniqueItems": true + }, + "patientIdentifiers": { + "items": { + "$ref": "#/definitions/PatientIdentifier" + }, + "maxItems": 10000000, + "minItems": 1, + "type": "array" + } + }, + "type": "object" + }, "ClinicalEventData": { "properties": { "key": { @@ -3973,6 +4108,47 @@ ], "type": "object" }, + "ClinicalEventRequest": { + "properties": { + "attributes": { + "items": { + "$ref": "#/definitions/ClinicalEventData" + }, + "type": "array" + }, + "eventType": { + "type": "string" + } + }, + "required": [ + "eventType" + ], + "type": "object" + }, + "ClinicalEventRequestIdentifier": { + "properties": { + "clinicalEventRequests": { + "items": { + "$ref": "#/definitions/ClinicalEventRequest" + }, + "maxItems": 10000000, + "minItems": 0, + "type": "array", + "uniqueItems": true + }, + "position": { + "enum": [ + "FIRST", + "LAST" + ], + "type": "string" + } + }, + "required": [ + "position" + ], + "type": "object" + }, "ClinicalEventSample": { "properties": { "patientId": { @@ -5464,6 +5640,29 @@ }, "type": "object" }, + "PatientIdentifier": { + "properties": { + "patientId": { + "type": "string" + }, + "studyId": { + "type": "string" + } + }, + "type": "object" + }, + "PatientTreatment": { + "properties": { + "count": { + "format": "int32", + "type": "integer" + }, + "treatment": { + "type": "string" + } + }, + "type": "object" + }, "PatientTreatmentFilter": { "properties": { "treatment": { @@ -5472,6 +5671,25 @@ }, "type": "object" }, + "PatientTreatmentReport": { + "properties": { + "patientTreatments": { + "items": { + "$ref": "#/definitions/PatientTreatment" + }, + "type": "array" + }, + "totalPatients": { + "format": "int32", + "type": "integer" + }, + "totalSamples": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "PatientTreatmentRow": { "properties": { "count": { @@ -6126,6 +6344,35 @@ }, "type": "object" }, + "SurvivalRequest": { + "description": "Survival Data Request", + "properties": { + "attributeIdPrefix": { + "type": "string" + }, + "censoredEventRequestIdentifier": { + "$ref": "#/definitions/ClinicalEventRequestIdentifier" + }, + "endEventRequestIdentifier": { + "$ref": "#/definitions/ClinicalEventRequestIdentifier" + }, + "patientIdentifiers": { + "items": { + "$ref": "#/definitions/PatientIdentifier" + }, + "maxItems": 10000000, + "minItems": 1, + "type": "array" + }, + "startEventRequestIdentifier": { + "$ref": "#/definitions/ClinicalEventRequestIdentifier" + } + }, + "required": [ + "attributeIdPrefix" + ], + "type": "object" + }, "VariantCount": { "properties": { "entrezGeneId": { diff --git a/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal.ts b/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal.ts index 02610206a86..22ab735b872 100644 --- a/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal.ts +++ b/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal.ts @@ -238,12 +238,30 @@ export type ClinicalEvent = { 'uniqueSampleKey': string +}; +export type ClinicalEventAttributeRequest = { + 'clinicalEventRequests': Array < ClinicalEventRequest > + + 'patientIdentifiers': Array < PatientIdentifier > + }; export type ClinicalEventData = { 'key': string 'value': string +}; +export type ClinicalEventRequest = { + 'attributes': Array < ClinicalEventData > + + 'eventType': string + +}; +export type ClinicalEventRequestIdentifier = { + 'clinicalEventRequests': Array < ClinicalEventRequest > + + 'position': "FIRST" | "LAST" + }; export type ClinicalEventSample = { 'patientId': string @@ -896,15 +914,35 @@ export type OredPatientTreatmentFilters = { export type OredSampleTreatmentFilters = { 'filters': Array < SampleTreatmentFilter > +}; +export type PatientIdentifier = { + 'patientId': string + + 'studyId': string + +}; +export type PatientTreatment = { + 'count': number + + 'treatment': string + }; export type PatientTreatmentFilter = { 'treatment': string +}; +export type PatientTreatmentReport = { + 'patientTreatments': Array < PatientTreatment > + + 'totalPatients': number + + 'totalSamples': number + }; export type PatientTreatmentRow = { 'count': number - 'samples': Array < ClinicalEventSample > + //'samples': Array < ClinicalEventSample > 'treatment': string @@ -1203,6 +1241,18 @@ export type StudyViewStructuralVariantFilter = { 'structVarQueries': Array < Array < StructuralVariantFilterQuery > > +}; +export type SurvivalRequest = { + 'attributeIdPrefix': string + + 'censoredEventRequestIdentifier': ClinicalEventRequestIdentifier + + 'endEventRequestIdentifier': ClinicalEventRequestIdentifier + + 'patientIdentifiers': Array < PatientIdentifier > + + 'startEventRequestIdentifier': ClinicalEventRequestIdentifier + }; export type VariantCount = { 'entrezGeneId': number @@ -2339,6 +2389,78 @@ export default class CBioPortalAPIInternal { return response.body; }); }; + fetchClinicalEventsMetaUsingPOSTURL(parameters: { + 'clinicalEventAttributeRequest' ? : ClinicalEventAttributeRequest, + $queryParameters ? : any + }): string { + let queryParameters: any = {}; + let path = '/api/clinical-events-meta/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 clinical events meta + * @method + * @name CBioPortalAPIInternal#fetchClinicalEventsMetaUsingPOST + * @param {} clinicalEventAttributeRequest - A web service for supplying JSON formatted data to cBioPortal clients. Please note that this API is currently in beta and subject to change. + */ + fetchClinicalEventsMetaUsingPOSTWithHttpInfo(parameters: { + 'clinicalEventAttributeRequest' ? : ClinicalEventAttributeRequest, + $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/clinical-events-meta/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['clinicalEventAttributeRequest'] !== undefined) { + body = parameters['clinicalEventAttributeRequest']; + } + + 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 clinical events meta + * @method + * @name CBioPortalAPIInternal#fetchClinicalEventsMetaUsingPOST + * @param {} clinicalEventAttributeRequest - A web service for supplying JSON formatted data to cBioPortal clients. Please note that this API is currently in beta and subject to change. + */ + fetchClinicalEventsMetaUsingPOST(parameters: { + 'clinicalEventAttributeRequest' ? : ClinicalEventAttributeRequest, + $queryParameters ? : any, + $domain ? : string + }): Promise < Array < ClinicalEvent > + > { + return this.fetchClinicalEventsMetaUsingPOSTWithHttpInfo(parameters).then(function(response: request.Response) { + return response.body; + }); + }; fetchCNAGenesUsingPOSTURL(parameters: { 'studyViewFilter' ? : StudyViewFilter, $queryParameters ? : any @@ -2411,6 +2533,89 @@ export default class CBioPortalAPIInternal { return response.body; }); }; + fetchPatientTreatmentCountsUsingURL(parameters: { + 'tier' ? : "Agent" | "AgentClass" | "AgentTarget", + 'studyViewFilter' ? : StudyViewFilter, + $queryParameters ? : any + }): string { + let queryParameters: any = {}; + let path = '/api/column-store/treatments/patient-counts/fetch'; + if (parameters['tier'] !== undefined) { + queryParameters['tier'] = parameters['tier']; + } + + 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('&')) : ''); + }; + + /** + * Get all patient level treatments + * @method + * @name CBioPortalAPIInternal#fetchPatientTreatmentCountsUsing + * @param {string} tier - A web service for supplying JSON formatted data to cBioPortal clients. Please note that this API is currently in beta and subject to change. + * @param {} studyViewFilter - A web service for supplying JSON formatted data to cBioPortal clients. Please note that this API is currently in beta and subject to change. + */ + fetchPatientTreatmentCountsUsingWithHttpInfo(parameters: { + 'tier' ? : "Agent" | "AgentClass" | "AgentTarget", + 'studyViewFilter' ? : StudyViewFilter, + $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/column-store/treatments/patient-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['tier'] !== undefined) { + queryParameters['tier'] = parameters['tier']; + } + + if (parameters['studyViewFilter'] !== undefined) { + body = parameters['studyViewFilter']; + } + + 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); + + }); + }; + + /** + * Get all patient level treatments + * @method + * @name CBioPortalAPIInternal#fetchPatientTreatmentCountsUsing + * @param {string} tier - A web service for supplying JSON formatted data to cBioPortal clients. Please note that this API is currently in beta and subject to change. + * @param {} studyViewFilter - A web service for supplying JSON formatted data to cBioPortal clients. Please note that this API is currently in beta and subject to change. + */ + fetchPatientTreatmentCountsUsing(parameters: { + 'tier' ? : "Agent" | "AgentClass" | "AgentTarget", + 'studyViewFilter' ? : StudyViewFilter, + $queryParameters ? : any, + $domain ? : string + }): Promise < PatientTreatmentReport > { + return this.fetchPatientTreatmentCountsUsingWithHttpInfo(parameters).then(function(response: request.Response) { + return response.body; + }); + }; fetchCosmicCountsUsingPOSTURL(parameters: { 'keywords': Array < string > , $queryParameters ? : any @@ -7314,6 +7519,78 @@ export default class CBioPortalAPIInternal { return response.body; }); }; + fetchSurvivalDataUsingPOSTURL(parameters: { + 'survivalRequest' ? : SurvivalRequest, + $queryParameters ? : any + }): string { + let queryParameters: any = {}; + let path = '/api/survival-data/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 survival data + * @method + * @name CBioPortalAPIInternal#fetchSurvivalDataUsingPOST + * @param {} survivalRequest - A web service for supplying JSON formatted data to cBioPortal clients. Please note that this API is currently in beta and subject to change. + */ + fetchSurvivalDataUsingPOSTWithHttpInfo(parameters: { + 'survivalRequest' ? : SurvivalRequest, + $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/survival-data/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['survivalRequest'] !== undefined) { + body = parameters['survivalRequest']; + } + + 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 survival data + * @method + * @name CBioPortalAPIInternal#fetchSurvivalDataUsingPOST + * @param {} survivalRequest - A web service for supplying JSON formatted data to cBioPortal clients. Please note that this API is currently in beta and subject to change. + */ + fetchSurvivalDataUsingPOST(parameters: { + 'survivalRequest' ? : SurvivalRequest, + $queryParameters ? : any, + $domain ? : string + }): Promise < Array < ClinicalData > + > { + return this.fetchSurvivalDataUsingPOSTWithHttpInfo(parameters).then(function(response: request.Response) { + return response.body; + }); + }; getAllTimestampsUsingGETURL(parameters: { $queryParameters ? : any }): string { diff --git a/packages/cbioportal-ts-api-client/src/index.tsx b/packages/cbioportal-ts-api-client/src/index.tsx index 5965c0a825d..aef9661da5e 100644 --- a/packages/cbioportal-ts-api-client/src/index.tsx +++ b/packages/cbioportal-ts-api-client/src/index.tsx @@ -89,6 +89,8 @@ export { SampleTreatmentFilter, PatientTreatmentFilter, PatientTreatmentRow, + PatientTreatmentReport, + PatientTreatment, MutationDataFilter, GenericAssayDataFilter, AlterationFilter, diff --git a/src/pages/studyView/StudyViewPageStore.ts b/src/pages/studyView/StudyViewPageStore.ts index 9d65aa8825a..2412523f896 100644 --- a/src/pages/studyView/StudyViewPageStore.ts +++ b/src/pages/studyView/StudyViewPageStore.ts @@ -9461,9 +9461,7 @@ export class StudyViewPageStore } const calculateSampleCount = ( - result: - | (SampleTreatmentRow | PatientTreatmentRow)[] - | undefined + result: SampleTreatmentRow[] | undefined ) => { if (!result) { return 0; @@ -9484,9 +9482,9 @@ export class StudyViewPageStore ); } if (!_.isEmpty(this.patientTreatments.result)) { - ret['PATIENT_TREATMENTS'] = calculateSampleCount( - this.patientTreatments.result - ); + ret[ + 'PATIENT_TREATMENTS' + ] = this.patientTreatments.result!.totalPatients; } if (!_.isEmpty(this.sampleTreatmentGroups.result)) { ret['SAMPLE_TREATMENT_GROUPS'] = calculateSampleCount( @@ -9494,9 +9492,9 @@ export class StudyViewPageStore ); } if (!_.isEmpty(this.patientTreatmentGroups.result)) { - ret['PATIENT_TREATMENT_GROUPS'] = calculateSampleCount( - this.patientTreatmentGroups.result - ); + ret[ + 'PATIENT_TREATMENT_GROUPS' + ] = this.patientTreatmentGroups.result!.totalPatients; } if (!_.isEmpty(this.sampleTreatmentTarget.result)) { ret['SAMPLE_TREATMENT_TARGET'] = calculateSampleCount( @@ -9504,9 +9502,9 @@ export class StudyViewPageStore ); } if (!_.isEmpty(this.patientTreatmentTarget.result)) { - ret['PATIENT_TREATMENT_TARGET'] = calculateSampleCount( - this.patientTreatmentTarget.result - ); + ret[ + 'PATIENT_TREATMENT_TARGET' + ] = this.patientTreatmentTarget.result!.totalPatients; } if (!_.isEmpty(this.structuralVariantProfiles.result)) { const structVarGenesUniqueKey = getUniqueKeyFromMolecularProfileIds( @@ -10465,12 +10463,15 @@ export class StudyViewPageStore public readonly patientTreatments = remoteData({ await: () => [this.shouldDisplayPatientTreatments], invoke: () => { - if (this.shouldDisplayPatientTreatments.result) { - return this.internalClient.getAllPatientTreatmentsUsingPOST({ - studyViewFilter: this.filters, - }); - } - return Promise.resolve([]); + return this.internalClient.fetchPatientTreatmentCountsUsing({ + studyViewFilter: this.filters, + }); + // + // return this.internalClient.getAllPatientTreatmentsUsingPOST({ + // studyViewFilter: this.filters, + // }); + + //return Promise.resolve({}); }, }); @@ -10519,12 +10520,12 @@ export class StudyViewPageStore await: () => [this.shouldDisplayPatientTreatmentGroups], invoke: () => { if (this.shouldDisplayPatientTreatmentGroups.result) { - return this.internalClient.getAllPatientTreatmentsUsingPOST({ + return this.internalClient.fetchPatientTreatmentCountsUsing({ studyViewFilter: this.filters, tier: 'AgentClass', }); } - return Promise.resolve([]); + return Promise.resolve(undefined); }, }); @@ -10572,13 +10573,10 @@ export class StudyViewPageStore public readonly patientTreatmentTarget = remoteData({ await: () => [this.shouldDisplayPatientTreatmentTarget], invoke: () => { - if (this.shouldDisplayPatientTreatmentTarget.result) { - return this.internalClient.getAllPatientTreatmentsUsingPOST({ - studyViewFilter: this.filters, - tier: 'AgentTarget', - }); - } - return Promise.resolve([]); + return this.internalClient.fetchPatientTreatmentCountsUsing({ + studyViewFilter: this.filters, + tier: 'AgentTarget', + }); }, }); diff --git a/src/pages/studyView/StudyViewUtils.tsx b/src/pages/studyView/StudyViewUtils.tsx index e2e8b78bc78..8ace194d2cc 100644 --- a/src/pages/studyView/StudyViewUtils.tsx +++ b/src/pages/studyView/StudyViewUtils.tsx @@ -25,6 +25,7 @@ import { NumericGeneMolecularData, Patient, PatientIdentifier, + PatientTreatmentReport, PatientTreatmentRow, Sample, SampleClinicalDataCollection, @@ -4536,15 +4537,18 @@ export async function getGenesCNADownloadData( } export async function getPatientTreatmentDownloadData( - promise: MobxPromise + promise: MobxPromise ): Promise { if (promise.result) { const header = ['Treatment', '#']; let data = [header.join('\t')]; - _.each(promise.result, (record: PatientTreatmentRow) => { - let rowData = [record.treatment, record.count]; - data.push(rowData.join('\t')); - }); + _.each( + promise.result.patientTreatments, + (record: PatientTreatmentRow) => { + let rowData = [record.treatment, record.count]; + data.push(rowData.join('\t')); + } + ); return data.join('\n'); } else return ''; } diff --git a/src/pages/studyView/table/treatments/PatientTreatmentsTable.tsx b/src/pages/studyView/table/treatments/PatientTreatmentsTable.tsx index 8a5a335c95a..4c9cc9c1f2e 100644 --- a/src/pages/studyView/table/treatments/PatientTreatmentsTable.tsx +++ b/src/pages/studyView/table/treatments/PatientTreatmentsTable.tsx @@ -7,7 +7,10 @@ import { Column, SortDirection, } from '../../../../shared/components/lazyMobXTable/LazyMobXTable'; -import { PatientTreatmentRow } from 'cbioportal-ts-api-client'; +import { + PatientTreatmentReport, + PatientTreatment, +} from 'cbioportal-ts-api-client'; import { correctColumnWidth } from 'pages/studyView/StudyViewUtils'; import LabeledCheckbox from 'shared/components/labeledCheckbox/LabeledCheckbox'; import styles from 'pages/studyView/table/tables.module.scss'; @@ -36,7 +39,7 @@ export type PatientTreatmentsTableColumn = { export type PatientTreatmentsTableProps = { tableType: TreatmentTableType; - promise: MobxPromise; + promise: MobxPromise; width: number; height: number; filters: string[][]; @@ -59,9 +62,7 @@ const DEFAULT_COLUMN_WIDTH_RATIO: { [PatientTreatmentsTableColumnKey.COUNT]: 0.2, }; -class MultiSelectionTableComponent extends FixedHeaderTable< - PatientTreatmentRow -> {} +class MultiSelectionTableComponent extends FixedHeaderTable {} @observer export class PatientTreatmentsTable extends TreatmentsTable< @@ -80,7 +81,7 @@ export class PatientTreatmentsTable extends TreatmentsTable< } createNubmerColumnCell( - row: PatientTreatmentRow, + row: PatientTreatment, cellMargin: number ): JSX.Element { return ( @@ -111,9 +112,7 @@ export class PatientTreatmentsTable extends TreatmentsTable< cellMargin: number ) => { const defaults: { - [key in PatientTreatmentsTableColumnKey]: Column< - PatientTreatmentRow - >; + [key in PatientTreatmentsTableColumnKey]: Column; } = { [PatientTreatmentsTableColumnKey.TREATMENT]: { name: columnKey, @@ -123,10 +122,10 @@ export class PatientTreatmentsTable extends TreatmentsTable< headerName={columnKey} /> ), - render: (data: PatientTreatmentRow) => ( + render: (data: PatientTreatment) => ( ), - sortBy: (data: PatientTreatmentRow) => data.treatment, + sortBy: (data: PatientTreatment) => data.treatment, defaultSortDirection: 'asc' as 'asc', filter: filterTreatmentCell, width: columnWidth, @@ -140,9 +139,9 @@ export class PatientTreatmentsTable extends TreatmentsTable< headerName={columnKey} /> ), - render: (data: PatientTreatmentRow) => + render: (data: PatientTreatment) => this.createNubmerColumnCell(data, 28), - sortBy: (data: PatientTreatmentRow) => + sortBy: (data: PatientTreatment) => data.count + toNumericValue(data.treatment), defaultSortDirection: 'desc' as 'desc', filter: filterTreatmentCell, @@ -181,8 +180,8 @@ export class PatientTreatmentsTable extends TreatmentsTable< ); } - @computed get tableData(): PatientTreatmentRow[] { - return this.props.promise.result || []; + @computed get tableData(): PatientTreatment[] { + return this.props.promise.result?.patientTreatments || []; } @computed @@ -206,7 +205,7 @@ export class PatientTreatmentsTable extends TreatmentsTable< .filter(data => this.flattenedFilters.includes(treatmentUniqueKey(data)) ) - .sortBy(data => + .sortBy(data => ifNotDefined( order[treatmentUniqueKey(data)], Number.POSITIVE_INFINITY diff --git a/src/pages/studyView/table/treatments/treatmentsTableUtil.tsx b/src/pages/studyView/table/treatments/treatmentsTableUtil.tsx index d18e2694bf4..af38c602b92 100644 --- a/src/pages/studyView/table/treatments/treatmentsTableUtil.tsx +++ b/src/pages/studyView/table/treatments/treatmentsTableUtil.tsx @@ -3,6 +3,7 @@ import { SampleTreatmentFilter, PatientTreatmentFilter, PatientTreatmentRow, + PatientTreatment, } from 'cbioportal-ts-api-client'; import { ChartMeta } from 'pages/studyView/StudyViewUtils'; import styles from 'pages/studyView/table/tables.module.scss'; @@ -90,7 +91,7 @@ export const TreatmentGenericColumnHeader = class GenericColumnHeader extends Re }; export const TreatmentColumnCell = class TreatmentColumnCell extends React.Component< - { row: PatientTreatmentRow | SampleTreatmentRow }, + { row: PatientTreatment | SampleTreatmentRow }, {} > { render() { @@ -99,7 +100,7 @@ export const TreatmentColumnCell = class TreatmentColumnCell extends React.Compo }; export function filterTreatmentCell( - cell: PatientTreatmentRow | SampleTreatmentRow, + cell: PatientTreatment | SampleTreatmentRow, filter: string ): boolean { return cell.treatment.toUpperCase().includes(filter.toUpperCase()); diff --git a/src/shared/api/cbioportalInternalClientInstance.ts b/src/shared/api/cbioportalInternalClientInstance.ts index e2ff8109cbd..44d39834c31 100644 --- a/src/shared/api/cbioportalInternalClientInstance.ts +++ b/src/shared/api/cbioportalInternalClientInstance.ts @@ -81,5 +81,6 @@ proxyColumnStore(internalClientColumnStore, 'fetchFilteredSamples'); proxyColumnStore(internalClientColumnStore, 'fetchClinicalDataCounts'); proxyColumnStore(internalClientColumnStore, 'fetchClinicalDataBinCounts'); proxyColumnStore(internalClientColumnStore, 'fetchClinicalDataDensityPlot'); +proxyColumnStore(internalClientColumnStore, 'fetchMutationDataCounts'); export default internalClient; From 8c6baf193a125d1479c8932a0a997779b11a47ee Mon Sep 17 00:00:00 2001 From: Charles Haynes Date: Tue, 6 Aug 2024 09:06:07 -0400 Subject: [PATCH 07/48] Add Sample Treatments endpoint --- package.json | 2 +- .../generated/CBioPortalAPIInternal-docs.json | 58 ++++++++++++ .../src/generated/CBioPortalAPIInternal.ts | 91 ++++++++++++++++++- .../cbioportal-ts-api-client/src/index.tsx | 1 + src/pages/studyView/StudyViewPageStore.ts | 23 +++-- src/pages/studyView/StudyViewUtils.tsx | 5 +- .../treatments/SampleTreatmentsTable.tsx | 9 +- .../api/cbioportalInternalClientInstance.ts | 2 + 8 files changed, 172 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index a538ce59d69..e47997fff66 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "heroku-postbuild": "yarn run build && yarn add pushstate-server@3.0.1 -g", "updateAPI": "yarn run fetchAPI && yarn run buildAPI && yarn run updateOncoKbAPI && yarn run updateGenomeNexusAPI", "convertToSwagger2": "./scripts/convert_to_swagger2.sh && yarn run extendSwagger2Converter", - "fetchAPILocal": "export CBIOPORTAL_URL=http://localhost:8090 && curl -s -L -k ${CBIOPORTAL_URL}/api/v3/api-docs/public | json | grep -v basePath | grep -v termsOfService | grep -v host > packages/cbioportal-ts-api-client/src/generated/CBioPortalAPI-docs.json && curl -s -L -k ${CBIOPORTAL_URL}/api/v3/api-docs/internal | json | grep -v host | grep -v basePath | grep -v termsOfService > packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal-docs.json", + "fetchAPILocal": "export CBIOPORTAL_URL=http://localhost:8082 && curl -s -L -k ${CBIOPORTAL_URL}/api/v3/api-docs/public > packages/cbioportal-ts-api-client/src/generated/CBioPortalAPI-docs.json && curl -s -L -k ${CBIOPORTAL_URL}/api/v3/api-docs/internal | json > packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal-docs.json && yarn run convertToSwagger2", "fetchAPI": "./scripts/env_vars.sh && eval \"$(./scripts/env_vars.sh)\" && curl -s -L -k ${CBIOPORTAL_URL}/api/v3/api-docs/public > packages/cbioportal-ts-api-client/src/generated/CBioPortalAPI-docs.json && curl -s -L -k ${CBIOPORTAL_URL}/api/v3/api-docs/internal | json > packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal-docs.json && yarn run convertToSwagger2", "extendSwagger2Converter": "node scripts/extend_converter.js packages/cbioportal-ts-api-client/src/generated CBioPortalAPI CBioPortalAPIInternal", "buildAPI": "node scripts/generate-api.js packages/cbioportal-ts-api-client/src/generated CBioPortalAPI CBioPortalAPIInternal", diff --git a/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal-docs.json b/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal-docs.json index 322c76aed3f..15f51e83d39 100644 --- a/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal-docs.json +++ b/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal-docs.json @@ -672,6 +672,49 @@ "operationId": "fetchPatientTreatmentCountsUsing" } }, + "/api/column-store/treatments/sample-counts/fetch": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "default": "Agent", + "enum": [ + "Agent", + "AgentClass", + "AgentTarget" + ], + "in": "query", + "name": "tier", + "required": false, + "type": "string" + }, + { + "in": "body", + "name": "studyViewFilter", + "schema": { + "$ref": "#/definitions/StudyViewFilter" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SampleTreatmentReport" + } + } + }, + "tags": [ + "study-view-column-store-controller" + ], + "operationId": "fetchSampleTreatmentCountsUsing" + } + }, "/api/cosmic-counts/fetch": { "post": { "consumes": [ @@ -5908,6 +5951,21 @@ }, "type": "object" }, + "SampleTreatmentReport": { + "properties": { + "totalSamples": { + "format": "int32", + "type": "integer" + }, + "treatments": { + "items": { + "$ref": "#/definitions/SampleTreatmentRow" + }, + "type": "array" + } + }, + "type": "object" + }, "SampleTreatmentRow": { "properties": { "count": { diff --git a/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal.ts b/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal.ts index 22ab735b872..ca9bc28d658 100644 --- a/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal.ts +++ b/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal.ts @@ -942,7 +942,7 @@ export type PatientTreatmentReport = { export type PatientTreatmentRow = { 'count': number - //'samples': Array < ClinicalEventSample > + 'samples': Array < ClinicalEventSample > 'treatment': string @@ -1036,6 +1036,12 @@ export type SampleTreatmentFilter = { 'treatment': string +}; +export type SampleTreatmentReport = { + 'totalSamples': number + + 'treatments': Array < SampleTreatmentRow > + }; export type SampleTreatmentRow = { 'count': number @@ -2616,6 +2622,89 @@ export default class CBioPortalAPIInternal { return response.body; }); }; + fetchSampleTreatmentCountsUsingURL(parameters: { + 'tier' ? : "Agent" | "AgentClass" | "AgentTarget", + 'studyViewFilter' ? : StudyViewFilter, + $queryParameters ? : any + }): string { + let queryParameters: any = {}; + let path = '/api/column-store/treatments/sample-counts/fetch'; + if (parameters['tier'] !== undefined) { + queryParameters['tier'] = parameters['tier']; + } + + 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('&')) : ''); + }; + + /** + * + * @method + * @name CBioPortalAPIInternal#fetchSampleTreatmentCountsUsing + * @param {string} tier - A web service for supplying JSON formatted data to cBioPortal clients. Please note that this API is currently in beta and subject to change. + * @param {} studyViewFilter - A web service for supplying JSON formatted data to cBioPortal clients. Please note that this API is currently in beta and subject to change. + */ + fetchSampleTreatmentCountsUsingWithHttpInfo(parameters: { + 'tier' ? : "Agent" | "AgentClass" | "AgentTarget", + 'studyViewFilter' ? : StudyViewFilter, + $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/column-store/treatments/sample-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['tier'] !== undefined) { + queryParameters['tier'] = parameters['tier']; + } + + if (parameters['studyViewFilter'] !== undefined) { + body = parameters['studyViewFilter']; + } + + 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); + + }); + }; + + /** + * + * @method + * @name CBioPortalAPIInternal#fetchSampleTreatmentCountsUsing + * @param {string} tier - A web service for supplying JSON formatted data to cBioPortal clients. Please note that this API is currently in beta and subject to change. + * @param {} studyViewFilter - A web service for supplying JSON formatted data to cBioPortal clients. Please note that this API is currently in beta and subject to change. + */ + fetchSampleTreatmentCountsUsing(parameters: { + 'tier' ? : "Agent" | "AgentClass" | "AgentTarget", + 'studyViewFilter' ? : StudyViewFilter, + $queryParameters ? : any, + $domain ? : string + }): Promise < SampleTreatmentReport > { + return this.fetchSampleTreatmentCountsUsingWithHttpInfo(parameters).then(function(response: request.Response) { + return response.body; + }); + }; fetchCosmicCountsUsingPOSTURL(parameters: { 'keywords': Array < string > , $queryParameters ? : any diff --git a/packages/cbioportal-ts-api-client/src/index.tsx b/packages/cbioportal-ts-api-client/src/index.tsx index aef9661da5e..7472a08a5f1 100644 --- a/packages/cbioportal-ts-api-client/src/index.tsx +++ b/packages/cbioportal-ts-api-client/src/index.tsx @@ -90,6 +90,7 @@ export { PatientTreatmentFilter, PatientTreatmentRow, PatientTreatmentReport, + SampleTreatmentReport, PatientTreatment, MutationDataFilter, GenericAssayDataFilter, diff --git a/src/pages/studyView/StudyViewPageStore.ts b/src/pages/studyView/StudyViewPageStore.ts index 2412523f896..b33d8be3f4c 100644 --- a/src/pages/studyView/StudyViewPageStore.ts +++ b/src/pages/studyView/StudyViewPageStore.ts @@ -64,7 +64,6 @@ import { OredPatientTreatmentFilters, OredSampleTreatmentFilters, Patient, - PatientTreatmentRow, ResourceData, Sample, SampleFilter, @@ -9477,9 +9476,9 @@ export class StudyViewPageStore }, new Set()).size; }; if (!_.isEmpty(this.sampleTreatments.result)) { - ret['SAMPLE_TREATMENTS'] = calculateSampleCount( - this.sampleTreatments.result - ); + ret[ + 'SAMPLE_TREATMENTS' + ] = this.sampleTreatments.result!.totalSamples; } if (!_.isEmpty(this.patientTreatments.result)) { ret[ @@ -9487,9 +9486,9 @@ export class StudyViewPageStore ] = this.patientTreatments.result!.totalPatients; } if (!_.isEmpty(this.sampleTreatmentGroups.result)) { - ret['SAMPLE_TREATMENT_GROUPS'] = calculateSampleCount( - this.sampleTreatmentGroups.result - ); + ret[ + 'SAMPLE_TREATMENT_GROUPS' + ] = this.sampleTreatments.result!.totalSamples; } if (!_.isEmpty(this.patientTreatmentGroups.result)) { ret[ @@ -9497,9 +9496,9 @@ export class StudyViewPageStore ] = this.patientTreatmentGroups.result!.totalPatients; } if (!_.isEmpty(this.sampleTreatmentTarget.result)) { - ret['SAMPLE_TREATMENT_TARGET'] = calculateSampleCount( - this.sampleTreatmentTarget.result - ); + ret[ + 'SAMPLE_TREATMENT_TARGET' + ] = this.sampleTreatments.result!.totalSamples; } if (!_.isEmpty(this.patientTreatmentTarget.result)) { ret[ @@ -10432,11 +10431,11 @@ export class StudyViewPageStore await: () => [this.shouldDisplaySampleTreatments], invoke: () => { if (this.shouldDisplaySampleTreatments.result) { - return this.internalClient.getAllSampleTreatmentsUsingPOST({ + return this.internalClient.fetchSampleTreatmentCountsUsing({ studyViewFilter: this.filters, }); } - return Promise.resolve([]); + return Promise.resolve(undefined); }, }); diff --git a/src/pages/studyView/StudyViewUtils.tsx b/src/pages/studyView/StudyViewUtils.tsx index 8ace194d2cc..eaf02d124a4 100644 --- a/src/pages/studyView/StudyViewUtils.tsx +++ b/src/pages/studyView/StudyViewUtils.tsx @@ -30,6 +30,7 @@ import { Sample, SampleClinicalDataCollection, SampleIdentifier, + SampleTreatmentReport, SampleTreatmentRow, StructuralVariantFilterQuery, StudyViewFilter, @@ -4554,12 +4555,12 @@ export async function getPatientTreatmentDownloadData( } export async function getSampleTreatmentDownloadData( - promise: MobxPromise + promise: MobxPromise ): Promise { if (promise.result) { const header = ['Treatment', 'Pre/Post', '#']; let data = [header.join('\t')]; - _.each(promise.result, (record: SampleTreatmentRow) => { + _.each(promise.result.treatments, (record: SampleTreatmentRow) => { let rowData = [record.treatment, record.time, record.count]; data.push(rowData.join('\t')); }); diff --git a/src/pages/studyView/table/treatments/SampleTreatmentsTable.tsx b/src/pages/studyView/table/treatments/SampleTreatmentsTable.tsx index 43070757afe..025fff9d7b8 100644 --- a/src/pages/studyView/table/treatments/SampleTreatmentsTable.tsx +++ b/src/pages/studyView/table/treatments/SampleTreatmentsTable.tsx @@ -7,7 +7,10 @@ import { Column, SortDirection, } from '../../../../shared/components/lazyMobXTable/LazyMobXTable'; -import { SampleTreatmentRow } from 'cbioportal-ts-api-client'; +import { + SampleTreatmentReport, + SampleTreatmentRow, +} from 'cbioportal-ts-api-client'; import { correctColumnWidth } from 'pages/studyView/StudyViewUtils'; import LabeledCheckbox from 'shared/components/labeledCheckbox/LabeledCheckbox'; import styles from 'pages/studyView/table/tables.module.scss'; @@ -37,7 +40,7 @@ export type SampleTreatmentsTableColumn = { export type SampleTreatmentsTableProps = { tableType: TreatmentTableType; - promise: MobxPromise; + promise: MobxPromise; width: number; height: number; filters: string[][]; @@ -214,7 +217,7 @@ export class SampleTreatmentsTable extends TreatmentsTable< } @computed get tableData(): SampleTreatmentRow[] { - return this.props.promise.result || []; + return this.props.promise.result?.treatments || []; } @computed get selectableTableData() { diff --git a/src/shared/api/cbioportalInternalClientInstance.ts b/src/shared/api/cbioportalInternalClientInstance.ts index 44d39834c31..916ed36a001 100644 --- a/src/shared/api/cbioportalInternalClientInstance.ts +++ b/src/shared/api/cbioportalInternalClientInstance.ts @@ -82,5 +82,7 @@ proxyColumnStore(internalClientColumnStore, 'fetchClinicalDataCounts'); proxyColumnStore(internalClientColumnStore, 'fetchClinicalDataBinCounts'); proxyColumnStore(internalClientColumnStore, 'fetchClinicalDataDensityPlot'); proxyColumnStore(internalClientColumnStore, 'fetchMutationDataCounts'); +proxyColumnStore(internalClientColumnStore, 'fetchPatientTreatmentCounts'); +proxyColumnStore(internalClientColumnStore, 'fetchSampleTreatmentCounts'); export default internalClient; From 2a74c4ea717d0a0b361b7f909f6b00cd9c16f2f2 Mon Sep 17 00:00:00 2001 From: lismana Date: Tue, 13 Aug 2024 12:23:03 -0400 Subject: [PATCH 08/48] add stuff --- src/shared/api/cbioportalInternalClientInstance.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shared/api/cbioportalInternalClientInstance.ts b/src/shared/api/cbioportalInternalClientInstance.ts index 916ed36a001..4368c1055a5 100644 --- a/src/shared/api/cbioportalInternalClientInstance.ts +++ b/src/shared/api/cbioportalInternalClientInstance.ts @@ -84,5 +84,7 @@ proxyColumnStore(internalClientColumnStore, 'fetchClinicalDataDensityPlot'); proxyColumnStore(internalClientColumnStore, 'fetchMutationDataCounts'); proxyColumnStore(internalClientColumnStore, 'fetchPatientTreatmentCounts'); proxyColumnStore(internalClientColumnStore, 'fetchSampleTreatmentCounts'); +proxyColumnStore(internalClientColumnStore, 'fetchClinicalDataDensityPlot'); +proxyColumnStore(internalClientColumnStore, 'getClinicalEventTypeCounts'); export default internalClient; From 6e3ec5a0b141d17239c22ef64d1b4f5fe31aac2c Mon Sep 17 00:00:00 2001 From: lismana Date: Tue, 13 Aug 2024 17:29:28 -0400 Subject: [PATCH 09/48] Improve validation --- src/shared/api/validation.ts | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/shared/api/validation.ts b/src/shared/api/validation.ts index 8485da9a754..041aa9dc110 100644 --- a/src/shared/api/validation.ts +++ b/src/shared/api/validation.ts @@ -33,6 +33,16 @@ export function getArrays(inp: any, output: Array) { output.push(inp); inp.forEach(n => getArrays(n, output)); } else if (isObject(inp)) { + // this is to get rid of discrepancy deep in decimals + _.forEach(inp, (v, k) => { + if (/\d\.\d{10,}$/.test(v)) { + inp[k] = inp[k].toFixed(5); + } + }); + + // this is get rid + delete inp.matchingGenePanelIds; + // do nothing Object.values(inp).forEach(nn => getArrays(nn, output)); } @@ -112,12 +122,15 @@ export function validate(url: string, params: any, label: string) { }).then(legacyResult => { legacyDuration = performance.now() - legacyStart; const result = compareCounts(chResult, legacyResult, label); - console.log({ - url, - legacyDuration, - chDuration: chDuration, - equal: result.status, - }); + !result.status && + console.log({ + url, + legacyDuration, + chDuration: chDuration, + equal: result.status, + }); + + result.status && console.log(`${label} passed!`); }); }); } From 3ec5d8753550228c1c0ca73c6d7bc7f00ece69e4 Mon Sep 17 00:00:00 2001 From: lismana Date: Wed, 14 Aug 2024 13:45:38 -0400 Subject: [PATCH 10/48] Improve validation and use CH endpoints on all --- src/pages/studyView/StudyViewUtils.tsx | 20 ++++++++++++------- .../api/cbioportalInternalClientInstance.ts | 8 ++++++++ src/shared/api/validation.ts | 2 ++ 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/pages/studyView/StudyViewUtils.tsx b/src/pages/studyView/StudyViewUtils.tsx index eaf02d124a4..a9faf19ac1b 100644 --- a/src/pages/studyView/StudyViewUtils.tsx +++ b/src/pages/studyView/StudyViewUtils.tsx @@ -49,7 +49,9 @@ import { } from './StudyViewPageStore'; import { StudyViewPageTabKeyEnum } from 'pages/studyView/StudyViewPageTabs'; import { Layout } from 'react-grid-layout'; -import internalClient from 'shared/api/cbioportalInternalClientInstance'; +import internalClient, { + getInteralClient, +} from 'shared/api/cbioportalInternalClientInstance'; import defaultClient from 'shared/api/cbioportalClientInstance'; import client from 'shared/api/cbioportalClientInstance'; import { @@ -2541,7 +2543,7 @@ export function getSamplesByExcludingFiltersOnChart( updatedFilter.sampleIdentifiers = queriedSampleIdentifiers; } } - return internalClient.fetchFilteredSamplesUsingPOST({ + return getInteralClient().fetchFilteredSamplesUsingPOST({ studyViewFilter: updatedFilter, }); } @@ -3184,7 +3186,7 @@ export async function getAllClinicalDataByStudyViewFilter( const [remoteClinicalDataCollection, totalItems]: [ SampleClinicalDataCollection, number - ] = await internalClient + ] = await getInteralClient() .fetchClinicalDataClinicalTableUsingPOSTWithHttpInfo({ studyViewFilter, pageSize: pageSize | 500, @@ -4075,7 +4077,7 @@ export async function invokeGenericAssayDataCount( chartInfo: GenericAssayChart, filters: StudyViewFilter ) { - const result: GenericAssayDataCountItem[] = await internalClient.fetchGenericAssayDataCountsUsingPOST( + const result: GenericAssayDataCountItem[] = await getInteralClient().fetchGenericAssayDataCountsUsingPOST( { genericAssayDataCountFilter: { genericAssayDataFilters: [ @@ -4137,12 +4139,16 @@ export async function invokeGenomicDataCount( projection: 'SUMMARY', }, }; - result = await internalClient.fetchMutationDataCountsUsingPOST(params); + result = await getInteralClient().fetchMutationDataCountsUsingPOST( + params + ); getDisplayedValue = transformMutatedType; getDisplayedColor = (value: string) => getMutationColorByCategorization(transformMutatedType(value)); } else { - result = await internalClient.fetchGenomicDataCountsUsingPOST(params); + result = await getInteralClient().fetchGenomicDataCountsUsingPOST( + params + ); getDisplayedValue = getCNAByAlteration; getDisplayedColor = (value: string | number) => getCNAColorByAlteration(getCNAByAlteration(value)); @@ -4196,7 +4202,7 @@ export async function invokeMutationDataCount( }, } as any; - const result = await internalClient.fetchMutationDataCountsUsingPOST( + const result = await getInteralClient().fetchMutationDataCountsUsingPOST( params ); diff --git a/src/shared/api/cbioportalInternalClientInstance.ts b/src/shared/api/cbioportalInternalClientInstance.ts index 4368c1055a5..45b63f10b6c 100644 --- a/src/shared/api/cbioportalInternalClientInstance.ts +++ b/src/shared/api/cbioportalInternalClientInstance.ts @@ -32,6 +32,8 @@ function proxyColumnStore(client: any, endpoint: string) { 'StructuralVariantGenes', 'FilteredSamples', 'ClinicalDataDensity', + 'MutationDataCounts', + 'GenomicDataCounts', ]; const matchedMethod = method.match(new RegExp(endpoints.join('|'))); @@ -86,5 +88,11 @@ proxyColumnStore(internalClientColumnStore, 'fetchPatientTreatmentCounts'); proxyColumnStore(internalClientColumnStore, 'fetchSampleTreatmentCounts'); proxyColumnStore(internalClientColumnStore, 'fetchClinicalDataDensityPlot'); proxyColumnStore(internalClientColumnStore, 'getClinicalEventTypeCounts'); +proxyColumnStore(internalClientColumnStore, 'fetchMutationDataCounts'); +proxyColumnStore(internalClientColumnStore, 'fetchGenomicDataCounts'); export default internalClient; + +export function getInteralClient() { + return internalClientColumnStore; +} diff --git a/src/shared/api/validation.ts b/src/shared/api/validation.ts index 041aa9dc110..35707991513 100644 --- a/src/shared/api/validation.ts +++ b/src/shared/api/validation.ts @@ -42,6 +42,7 @@ export function getArrays(inp: any, output: Array) { // this is get rid delete inp.matchingGenePanelIds; + delete inp.cytoband; // do nothing Object.values(inp).forEach(nn => getArrays(nn, output)); @@ -62,6 +63,7 @@ export function deepSort(inp: any) { 'value', 'hugoGeneSymbol', 'uniqueSampleKey', + 'alteration', ]; fields.forEach(f => attemptSort(f, arr)); } From 9d8cee8f373d40bde98412abfebcabfcf193b4cd Mon Sep 17 00:00:00 2001 From: lismana Date: Thu, 15 Aug 2024 14:58:07 -0400 Subject: [PATCH 11/48] Fix sorting and improve console report --- src/appBootstrapper.tsx | 4 +- src/pages/studyView/StudyViewPage.tsx | 2 +- .../api/cbioportalInternalClientInstance.ts | 2 +- src/shared/api/validation.ts | 112 +++++++++++++----- 4 files changed, 87 insertions(+), 33 deletions(-) diff --git a/src/appBootstrapper.tsx b/src/appBootstrapper.tsx index 901a49bff29..8f2f2981a0a 100755 --- a/src/appBootstrapper.tsx +++ b/src/appBootstrapper.tsx @@ -144,7 +144,9 @@ browserWindow.postLoadForMskCIS = () => {}; (browserWindow as any).$3Dmol = { notrack: true }; // make sure lodash doesn't overwrite (or set) global underscore -_.noConflict(); +//_.noConflict(); + +getBrowserWindow()._ = _; const routingStore = new ExtendedRoutingStore(); diff --git a/src/pages/studyView/StudyViewPage.tsx b/src/pages/studyView/StudyViewPage.tsx index e975b3e389b..8ea8b12872b 100644 --- a/src/pages/studyView/StudyViewPage.tsx +++ b/src/pages/studyView/StudyViewPage.tsx @@ -183,7 +183,7 @@ export default class StudyViewPage extends React.Component< const query = props.routing.query; const hash = props.routing.location.hash; // clear hash if any - props.routing.location.hash = ''; + //props.routing.location.hash = ''; const newStudyViewFilter: StudyViewURLQuery = _.pick(query, [ 'id', 'studyId', diff --git a/src/shared/api/cbioportalInternalClientInstance.ts b/src/shared/api/cbioportalInternalClientInstance.ts index 45b63f10b6c..db5d2d1f7db 100644 --- a/src/shared/api/cbioportalInternalClientInstance.ts +++ b/src/shared/api/cbioportalInternalClientInstance.ts @@ -25,7 +25,7 @@ function proxyColumnStore(client: any, endpoint: string) { const endpoints = [ 'ClinicalDataCounts', 'MutatedGenes', - 'CaseList', + //'CaseList', 'ClinicalDataBin', 'MolecularProfileSample', 'CNAGenes', diff --git a/src/shared/api/validation.ts b/src/shared/api/validation.ts index 35707991513..cc6962b90ff 100644 --- a/src/shared/api/validation.ts +++ b/src/shared/api/validation.ts @@ -12,7 +12,7 @@ export const isObject = (value: any) => { ); }; -export function dynamicSort(property: string) { +export function dynamicSortSingle(property: string) { var sortOrder = 1; if (property[0] === '-') { sortOrder = -1; @@ -28,6 +28,31 @@ export function dynamicSort(property: string) { }; } +export function dynamicSort(property: string[]) { + if (property.length === 1) { + return dynamicSortSingle(property[0]); + } else { + const prop1 = property[0]; + const prop2 = property[1]; + return function(a: any, b: any) { + /* next line works with strings and numbers, + * and you may want to customize it to your needs + */ + let af = a[prop1]; + let bf = b[prop1]; + let as = a[prop2]; + let bs = b[prop2]; + + // If first value is same + if (af == bf) { + return as < bs ? -1 : as > bs ? 1 : 0; + } else { + return af < bf ? -1 : 1; + } + }; + } +} + export function getArrays(inp: any, output: Array) { if (inp instanceof Array) { output.push(inp); @@ -43,6 +68,7 @@ export function getArrays(inp: any, output: Array) { // this is get rid delete inp.matchingGenePanelIds; delete inp.cytoband; + delete inp.numberOfProfiledCases; // do nothing Object.values(inp).forEach(nn => getArrays(nn, output)); @@ -50,7 +76,12 @@ export function getArrays(inp: any, output: Array) { return output; } -export function deepSort(inp: any) { +const sortFields: Record = { + ClinicalDataBin: 'attributeId,specialValue', + FilteredSamples: 'patientId,sampleId', +}; + +export function deepSort(inp: any, label: string) { const arrs = getArrays(inp, []); arrs.forEach(arr => { @@ -58,47 +89,38 @@ export function deepSort(inp: any) { if (!isObject(arr[0])) { arr.sort(); } else { - const fields = [ - 'attributeId', - 'value', - 'hugoGeneSymbol', - 'uniqueSampleKey', - 'alteration', - ]; - fields.forEach(f => attemptSort(f, arr)); + if (sortFields[label]) { + attemptSort(sortFields[label].split(','), arr); + } else { + const fields = [ + 'attributeId', + 'value', + 'hugoGeneSymbol', + 'uniqueSampleKey', + 'alteration', + ]; + fields.forEach(f => attemptSort([f], arr)); + } } }); return inp; } -function attemptSort(key: string, arr: any) { - if (key in arr[0]) arr.sort(dynamicSort(key)); +function attemptSort(keys: string[], arr: any) { + arr.sort(dynamicSort(keys)); } export function compareCounts(clData: any, legacyData: any, label: string) { - const clDataSorted = deepSort(clData); - const legacyDataSorted = deepSort(legacyData); + const clDataSorted = deepSort(clData, label); + const legacyDataSorted = deepSort(legacyData, label); const result = JSON.stringify(clDataSorted) === JSON.stringify(legacyDataSorted); - if (result === false) { - _.forEach(clDataSorted, (cl: any, i: number) => { - if (JSON.stringify(cl) !== JSON.stringify(legacyDataSorted[i])) { - console.log( - `first invalid item (${label})`, - 'Clickhouse:', - cl, - 'Legacy:', - legacyDataSorted[i] - ); - return false; - } - }); - } - return { + clDataSorted, + legacyDataSorted, status: result, }; } @@ -124,6 +146,9 @@ export function validate(url: string, params: any, label: string) { }).then(legacyResult => { legacyDuration = performance.now() - legacyStart; const result = compareCounts(chResult, legacyResult, label); + + !result.status && console.group(`${label} failed :(`); + !result.status && console.log({ url, @@ -132,7 +157,34 @@ export function validate(url: string, params: any, label: string) { equal: result.status, }); - result.status && console.log(`${label} passed!`); + result.status && + console.log( + `${label} passed :) ch: ${chDuration.toFixed( + 0 + )} legacy: ${legacyDuration.toFixed(0)}` + ); + + if (!result.status) { + _.forEach(result.clDataSorted, (cl: any, i: number) => { + if ( + JSON.stringify(cl) !== + JSON.stringify(result.legacyDataSorted[i]) + ) { + console.log( + `First invalid item (${label})`, + 'Clickhouse:', + cl, + 'Legacy:', + result.legacyDataSorted[i] + ); + return false; + } + }); + console.log('legacy', result.legacyDataSorted); + console.log('CH', result.clDataSorted); + } + + !result.status && console.groupEnd(); }); }); } From 9183de0f0b5db3da86a36ab245ecdefb18c3bcfd Mon Sep 17 00:00:00 2001 From: alisman Date: Thu, 22 Aug 2024 10:27:47 -0400 Subject: [PATCH 12/48] Clickhouse tests (#4970) * Add rfc80 test generator UI and test runner --- .gitignore | 1 + apiTests/index.js | 29 ++++ apiTests/specs/genie-public.json | 87 +++++++++++ apiTests/specs/two-tcga.json | 30 ++++ src/pages/studyView/StudyViewPage.tsx | 2 + src/pages/studyView/rfc80Tester.tsx | 144 ++++++++++++++++++ .../api/cbioportalInternalClientInstance.ts | 15 +- src/shared/api/testMaker.ts | 65 ++++++++ src/shared/api/validation.ts | 97 +++++++----- webpack.config.js | 36 +++++ 10 files changed, 464 insertions(+), 42 deletions(-) create mode 100644 apiTests/index.js create mode 100644 apiTests/specs/genie-public.json create mode 100644 apiTests/specs/two-tcga.json create mode 100644 src/pages/studyView/rfc80Tester.tsx create mode 100644 src/shared/api/testMaker.ts diff --git a/.gitignore b/.gitignore index e6aca5b2ff4..20cbfcd1e0d 100755 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,7 @@ end-to-end-test/results-0-0..xml end-to-end-test/customReport.json end-to-end-test/customReportJSONP.js end-to-end-test/shared/results +apiTests/merged-tests.json wdio/browserstack.txt env/custom.sh image-compare/errors.js diff --git a/apiTests/index.js b/apiTests/index.js new file mode 100644 index 00000000000..054612f8a9a --- /dev/null +++ b/apiTests/index.js @@ -0,0 +1,29 @@ +const fs = require('fs/promises'); +const watch = require('fs').watch; +const path = require('path'); + +watch('./apiTests/specs', async function(event, filename) { + if (event === 'change') { + const files = (await fs.readdir('./apiTests/specs')).map(fileName => { + return path.join('./apiTests/specs', fileName); + }); + + const jsons = files.map(path => { + return fs.readFile(path).then(data => { + try { + const json = JSON.parse(data); + return { file: path, suites: json }; + } catch (ex) { + console.log('invalid apiTest json spec'); + return []; + } + }); + }); + + Promise.all(jsons) + .then(d => { + fs.writeFile('./apiTests/merged-tests.json', JSON.stringify(d)); + }) + .then(r => console.log('merged-tests.json written')); + } +}); diff --git a/apiTests/specs/genie-public.json b/apiTests/specs/genie-public.json new file mode 100644 index 00000000000..7db9996af4e --- /dev/null +++ b/apiTests/specs/genie-public.json @@ -0,0 +1,87 @@ +[ + { + "name":"genie-public", + "note":"unfiltered", + "studies":["genie_public"], + "tests":[ + {"hash":140868719,"filterString":"","data":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":190356866,"filterString":"","data":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":251665166,"filterString":"","data":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":510907133,"filterString":"","data":{"studyIds":["genie_public"]},"url":"//genie-public-beta1.cbioportal.org/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":804271271,"filterString":"","data":{"attributes":[{"attributeId":"CANCER_TYPE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"SAMPLE_COUNT"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"SAMPLE_TYPE"},{"attributeId":"CENTER"},{"attributeId":"ONCOTREE_CODE"},{"attributeId":"PRIMARY_RACE"},{"attributeId":"SAMPLE_TYPE_DETAILED"},{"attributeId":"SEQ_ASSAY_ID"},{"attributeId":"DEAD"}],"studyViewFilter":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1027347862,"filterString":"","data":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1659847505,"filterString":"","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE_AT_SEQ_REPORT","disableLogScale":false,"showNA":false},{"attributeId":"INT_CONTACT","disableLogScale":false,"showNA":false},{"attributeId":"INT_DOD","disableLogScale":false,"showNA":false},{"attributeId":"YEAR_DEATH","disableLogScale":false,"showNA":false},{"attributeId":"YEAR_CONTACT","disableLogScale":false,"showNA":false}],"studyViewFilter":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1217488228,"filterString":"","data":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1699611002,"filterString":"","data":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + + + { + "name":"genie-public NSCLC", + "note":"filtered for non small cell lung cancer", + "studies":[], + "tests":[ + {"hash":510502347,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":651980249,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"attributes":[{"attributeId":"CENTER"},{"attributeId":"SEQ_ASSAY_ID"},{"attributeId":"SAMPLE_TYPE_DETAILED"},{"attributeId":"SAMPLE_COUNT"},{"attributeId":"SAMPLE_TYPE"},{"attributeId":"SEX"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"PRIMARY_RACE"},{"attributeId":"DEAD"},{"attributeId":"ETHNICITY"},{"attributeId":"ONCOTREE_CODE"}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1277158099,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE_AT_SEQ_REPORT","disableLogScale":false,"showNA":false},{"attributeId":"INT_CONTACT","disableLogScale":false,"showNA":false},{"attributeId":"INT_DOD","disableLogScale":false,"showNA":false},{"attributeId":"YEAR_DEATH","disableLogScale":false,"showNA":false},{"attributeId":"YEAR_CONTACT","disableLogScale":false,"showNA":false}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1744035832,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":2134662426,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1152478474,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1112863066,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-932029193,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"attributes":[{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1307416334,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1772738221,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"attributes":[{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1607880342,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1238300958,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + + { + "name":"genie-public KRAS", + "note":"filtered for KRAS", + "studies":["genie-public"], + "tests":[ + {"hash":40441743,"filterString":"KRAS","data":{"geneFilters":[{"molecularProfileIds":["genie_public_mutations"],"geneQueries":[[{"hugoGeneSymbol":"KRAS","entrezGeneId":0,"alterations":[],"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"tiersBooleanMap":{},"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true}]]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":510907133,"filterString":"","data":{"studyIds":["genie_public"]},"url":"//genie-public-beta1.cbioportal.org/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":866628144,"filterString":"KRAS","data":{"geneFilters":[{"molecularProfileIds":["genie_public_mutations"],"geneQueries":[[{"hugoGeneSymbol":"KRAS","entrezGeneId":0,"alterations":[],"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"tiersBooleanMap":{},"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true}]]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":903357655,"filterString":"KRAS","data":{"geneFilters":[{"molecularProfileIds":["genie_public_mutations"],"geneQueries":[[{"hugoGeneSymbol":"KRAS","entrezGeneId":0,"alterations":[],"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"tiersBooleanMap":{},"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true}]]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1882675854,"filterString":"","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE_AT_SEQ_REPORT","disableLogScale":false,"showNA":false},{"attributeId":"INT_CONTACT","disableLogScale":false,"showNA":false},{"attributeId":"INT_DOD","disableLogScale":false,"showNA":false},{"attributeId":"YEAR_DEATH","disableLogScale":false,"showNA":false},{"attributeId":"YEAR_CONTACT","disableLogScale":false,"showNA":false}],"studyViewFilter":{"geneFilters":[{"molecularProfileIds":["genie_public_mutations"],"geneQueries":[[{"hugoGeneSymbol":"KRAS","entrezGeneId":0,"alterations":[],"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"tiersBooleanMap":{},"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true}]]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1725807704,"filterString":"","data":{"attributes":[{"attributeId":"CANCER_TYPE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"SAMPLE_COUNT"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"SAMPLE_TYPE"},{"attributeId":"CENTER"},{"attributeId":"ONCOTREE_CODE"},{"attributeId":"PRIMARY_RACE"},{"attributeId":"SAMPLE_TYPE_DETAILED"},{"attributeId":"SEQ_ASSAY_ID"},{"attributeId":"DEAD"}],"studyViewFilter":{"geneFilters":[{"molecularProfileIds":["genie_public_mutations"],"geneQueries":[[{"hugoGeneSymbol":"KRAS","entrezGeneId":0,"alterations":[],"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"tiersBooleanMap":{},"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true}]]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1551256747,"filterString":"KRAS","data":{"geneFilters":[{"molecularProfileIds":["genie_public_mutations"],"geneQueries":[[{"hugoGeneSymbol":"KRAS","entrezGeneId":0,"alterations":[],"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"tiersBooleanMap":{},"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true}]]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1678788063,"filterString":"KRAS","data":{"geneFilters":[{"molecularProfileIds":["genie_public_mutations"],"geneQueries":[[{"hugoGeneSymbol":"KRAS","entrezGeneId":0,"alterations":[],"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"tiersBooleanMap":{},"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true}]]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-654368419,"filterString":"KRAS","data":{"geneFilters":[{"molecularProfileIds":["genie_public_mutations"],"geneQueries":[[{"hugoGeneSymbol":"KRAS","entrezGeneId":0,"alterations":[],"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"tiersBooleanMap":{},"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true}]]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-2141793657,"filterString":"KRAS","data":{"geneFilters":[{"molecularProfileIds":["genie_public_mutations"],"geneQueries":[[{"hugoGeneSymbol":"KRAS","entrezGeneId":0,"alterations":[],"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"tiersBooleanMap":{},"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true}]]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + } +] \ No newline at end of file diff --git a/apiTests/specs/two-tcga.json b/apiTests/specs/two-tcga.json new file mode 100644 index 00000000000..39c99b19032 --- /dev/null +++ b/apiTests/specs/two-tcga.json @@ -0,0 +1,30 @@ +[ + { + "name":"two-tcga unfiltered", + "note":"two studies unfiltered", + "studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":199621622,"filterString":"","data":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":476143126,"filterString":"","data":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"]},"url":"//genie-public-beta1.cbioportal.org/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1410492317,"filterString":"","data":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1561600461,"filterString":"","data":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1222622073,"filterString":"","data":{"attributes":[{"attributeId":"CANCER_TYPE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"SAMPLE_COUNT"},{"attributeId":"OS_STATUS"},{"attributeId":"SAMPLE_TYPE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"RACE"},{"attributeId":"SUBTYPE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"PATH_T_STAGE"}],"studyViewFilter":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1997158862,"filterString":"","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-572446320,"filterString":"","data":{"attributes":[{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]}],"studyViewFilter":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1264472707,"filterString":"","data":{"attributes":[{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]}],"studyViewFilter":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-2051238245,"filterString":"","data":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-147943133,"filterString":"","data":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-200476203,"filterString":"","data":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + } +] \ No newline at end of file diff --git a/src/pages/studyView/StudyViewPage.tsx b/src/pages/studyView/StudyViewPage.tsx index 8ea8b12872b..f6de77ac145 100644 --- a/src/pages/studyView/StudyViewPage.tsx +++ b/src/pages/studyView/StudyViewPage.tsx @@ -81,6 +81,7 @@ import { } from 'shared/lib/customTabs/customTabHelpers'; import { VirtualStudyModal } from 'pages/studyView/virtualStudy/VirtualStudyModal'; import PlotsTab from 'shared/components/plots/PlotsTab'; +import { RFC80Test } from 'pages/studyView/rfc80Tester'; export interface IStudyViewPageProps { routing: any; @@ -1263,6 +1264,7 @@ export default class StudyViewPage extends React.Component< isLoggedIn={this.props.appStore.isLoggedIn} /> )} + ); } diff --git a/src/pages/studyView/rfc80Tester.tsx b/src/pages/studyView/rfc80Tester.tsx new file mode 100644 index 00000000000..8019220b157 --- /dev/null +++ b/src/pages/studyView/rfc80Tester.tsx @@ -0,0 +1,144 @@ +import * as React from 'react'; +import _ from 'lodash'; +import json from '../../../apiTests/merged-tests.json'; +import { useCallback, useEffect } from 'react'; +import { reportValidationResult, validate } from 'shared/api/validation'; +import { getBrowserWindow } from 'cbioportal-frontend-commons'; +import { observer } from 'mobx-react'; +import { useLocalObservable } from 'mobx-react-lite'; +import { SAVE_TEST_KEY } from 'shared/api/testMaker'; + +getBrowserWindow().showTest = function() {}; + +const CACHE_KEY: string = 'testCache'; + +function getCache() { + return getBrowserWindow()[CACHE_KEY] || {}; + //return localStorage.getItem(CACHE_KEY); +} + +function clearCache() { + getBrowserWindow()[CACHE_KEY] = {}; + //localStorage.removeItem(CACHE_KEY); +} + +export const RFC80Test = observer(function() { + const store = useLocalObservable(() => ({ + tests: [], + })); + + const clearCacheCallback = useCallback(() => { + clearCache(); + }, []); + + const toggleListener = useCallback(() => { + if (getBrowserWindow().localStorage.getItem(SAVE_TEST_KEY)) { + getBrowserWindow().localStorage.removeItem(SAVE_TEST_KEY); + } else { + getBrowserWindow().localStorage.setItem(SAVE_TEST_KEY, 'true'); + } + }, []); + + const runTests = useCallback(() => { + const totalCount = _(json) + .flatMap('suites') + .flatMap('tests') + .value().length; + + console.group(`Running specs (${totalCount})`); + + let place = 0; + + const promises: Promise[] = []; + json.map((f: any) => f.suites).forEach((suite: any) => { + suite.forEach((col: any) => + col.tests.forEach((test: any) => { + test.url = test.url.replace( + /column-store\/api/, + 'column-store' + ); + + promises.push( + // @ts-ignore + validate( + test.url, + test.data, + test.label, + test.hash + ).then((report: any) => { + report.test = test; + place = place + 1; + const prefix = `${place} of ${totalCount}`; + reportValidationResult(report, prefix); + }) + ); + }) + ); + }); + + Promise.all(promises).then(() => { + console.groupEnd(); + }); + }, []); + + useEffect(() => { + if (getCache()) { + const tests = getCache(); + const parsed = _.values(tests).map((j: any) => j); + store.tests = parsed; + } + + const checker = setInterval(() => { + if (getCache()) { + const tests = getCache(); + const parsed = _.values(tests); + store.tests = parsed; + } else { + store.tests = []; + } + }, 1000); + + return () => { + clearInterval(checker); + }; + }, []); + + const txt = ` + { + "name":"", + "note":"", + "studies":[], + "tests":[ + ${store.tests.map((t: any) => JSON.stringify(t)).join(',\n\n')} + ] + }`; + + return ( +
+ + + + { + + } +
+ ); +}); diff --git a/src/shared/api/cbioportalInternalClientInstance.ts b/src/shared/api/cbioportalInternalClientInstance.ts index db5d2d1f7db..cf580fea677 100644 --- a/src/shared/api/cbioportalInternalClientInstance.ts +++ b/src/shared/api/cbioportalInternalClientInstance.ts @@ -2,8 +2,9 @@ import { CBioPortalAPIInternal } from 'cbioportal-ts-api-client'; import { getLoadConfig } from 'config/config'; import { getBrowserWindow } from 'cbioportal-frontend-commons'; import { toJS } from 'mobx'; -import { validate } from 'shared/api/validation'; +import { reportValidationResult, validate } from 'shared/api/validation'; import _ from 'lodash'; +import { makeTest } from 'shared/api/testMaker'; function proxyColumnStore(client: any, endpoint: string) { if (getBrowserWindow().location.search.includes('legacy')) { @@ -25,7 +26,7 @@ function proxyColumnStore(client: any, endpoint: string) { const endpoints = [ 'ClinicalDataCounts', 'MutatedGenes', - //'CaseList', + 'CaseList', 'ClinicalDataBin', 'MolecularProfileSample', 'CNAGenes', @@ -48,7 +49,15 @@ function proxyColumnStore(client: any, endpoint: string) { '?' + _.map(arguments[4], (v, k) => `${k}=${v}&`).join(''); - validate(url, params, matchedMethod[0]); + setTimeout(() => { + makeTest(params, url, matchedMethod[0]); + }, 1000); + + validate(url, params, matchedMethod[0], 0).then( + (result: any) => { + reportValidationResult(result); + } + ); }; } diff --git a/src/shared/api/testMaker.ts b/src/shared/api/testMaker.ts new file mode 100644 index 00000000000..a8b57eb2ef2 --- /dev/null +++ b/src/shared/api/testMaker.ts @@ -0,0 +1,65 @@ +import { getBrowserWindow, hashString } from 'cbioportal-frontend-commons'; +import { toJS } from 'mobx'; +import _ from 'lodash'; + +export const SAVE_TEST_KEY = 'save_test_enabled'; + +export async function makeTest(data: any, url: string, label: string) { + const hash = hashString(JSON.stringify({ data, url })); + + const filterString = $('.userSelections') + .find('*') + .contents() + .filter(function() { + return this.nodeType === 3; + }) + .toArray() + .map(n => n.textContent) + .slice(0, -1) + .reduce((acc, s) => { + switch (s) { + case null: + acc += ''; + break; + case '(': + acc += ' ('; + break; + case ')': + acc += ') '; + break; + case 'or': + acc += ' OR '; + break; + case 'and': + acc += ' AND '; + break; + default: + acc += s || ''; + break; + } + return acc; + }, ''); + + const entry = { + hash, + filterString, + data, + url, + label, + studies: toJS(getBrowserWindow().studyViewPageStore.studyIds), + filterUrl: (await getBrowserWindow().studyPage.getBookmarkUrl()) + .fullUrl, + }; + + if (getBrowserWindow().localStorage.getItem(SAVE_TEST_KEY)) + saveTest(hash, entry); +} + +function saveTest(hash: number, entry: any) { + const testCache = getBrowserWindow().testCache || {}; + + if (!(hash in testCache)) { + testCache[hash] = entry; + getBrowserWindow().testCache = testCache; + } +} diff --git a/src/shared/api/validation.ts b/src/shared/api/validation.ts index cc6962b90ff..8b135c9330f 100644 --- a/src/shared/api/validation.ts +++ b/src/shared/api/validation.ts @@ -122,13 +122,19 @@ export function compareCounts(clData: any, legacyData: any, label: string) { clDataSorted, legacyDataSorted, status: result, + label, }; } -export function validate(url: string, params: any, label: string) { +export function validate( + url: string, + params: any, + label: string, + hash: number +) { const clStart = performance.now(); let chDuration: number, legacyDuration: number; - $.ajax({ + return $.ajax({ method: 'post', url: url, data: JSON.stringify(params), @@ -138,53 +144,66 @@ export function validate(url: string, params: any, label: string) { chDuration = performance.now() - clStart; const legacyStart = performance.now(); - $.ajax({ + return $.ajax({ method: 'post', url: legacyUrl, data: JSON.stringify(params), contentType: 'application/json', }).then(legacyResult => { legacyDuration = performance.now() - legacyStart; - const result = compareCounts(chResult, legacyResult, label); - - !result.status && console.group(`${label} failed :(`); + const result: any = compareCounts(chResult, legacyResult, label); + result.url = url; + result.hash = hash; + result.data = params; + result.chDuration = chDuration; + result.legacyDuration = legacyDuration; + return result; + }); + }); +} - !result.status && - console.log({ - url, - legacyDuration, - chDuration: chDuration, - equal: result.status, - }); +export function reportValidationResult(result: any, prefix = '') { + !result.status && + console.group(`${prefix} ${result.label} ${result.hash} failed :(`); + + !result.status && + console.log({ + url: result.url, + test: result.test, + studies: result?.test?.studies, + legacyDuration: result.legacyDuration, + chDuration: result.chDuration, + equal: result.status, + }); - result.status && + result.status && + console.log( + `${prefix} ${result.label} (${ + result.hash + }) passed :) ch: ${result.chDuration.toFixed( + 0 + )} legacy: ${result.legacyDuration.toFixed(0)}` + ); + + if (!result.status) { + _.forEach(result.clDataSorted, (cl: any, i: number) => { + if ( + JSON.stringify(cl) !== + JSON.stringify(result.legacyDataSorted[i]) + ) { console.log( - `${label} passed :) ch: ${chDuration.toFixed( - 0 - )} legacy: ${legacyDuration.toFixed(0)}` + `First invalid item (${result.label})`, + 'Clickhouse:', + cl, + 'Legacy:', + result.legacyDataSorted[i] ); - - if (!result.status) { - _.forEach(result.clDataSorted, (cl: any, i: number) => { - if ( - JSON.stringify(cl) !== - JSON.stringify(result.legacyDataSorted[i]) - ) { - console.log( - `First invalid item (${label})`, - 'Clickhouse:', - cl, - 'Legacy:', - result.legacyDataSorted[i] - ); - return false; - } - }); - console.log('legacy', result.legacyDataSorted); - console.log('CH', result.clDataSorted); + return false; } - - !result.status && console.groupEnd(); }); - }); + console.log('legacy', result.legacyDataSorted); + console.log('CH', result.clDataSorted); + } + + !result.status && console.groupEnd(); } diff --git a/webpack.config.js b/webpack.config.js index 3580b03db73..d1f16bf837a 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,6 +6,8 @@ var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); var TerserPlugin = require('terser-webpack-plugin'); var { TypedCssModulesPlugin } = require('typed-css-modules-webpack-plugin'); +const fsProm = require('fs/promises'); + var commit = '"unknown"'; var version = '"unknown"'; // Don't show COMMIT/VERSION on Heroku (crashes, because no git dir) @@ -41,6 +43,8 @@ const dotenv = require('dotenv'); const webpack = require('webpack'); const path = require('path'); +const { watch } = require('fs'); +const fs = require('fs/promises'); const join = path.join; const resolve = path.resolve; @@ -593,4 +597,36 @@ if (isTest) { } // End Testing +async function mergeApiTestJson() { + const files = (await fsProm.readdir('./apiTests/specs')).map(fileName => { + return path.join('./apiTests/specs', fileName); + }); + + const jsons = files.map(path => { + return fsProm.readFile(path).then(data => { + try { + const json = JSON.parse(data); + return { file: path, suites: json }; + } catch (ex) { + console.log('invalid apiTest json spec'); + return []; + } + }); + }); + + Promise.all(jsons) + .then(d => { + fsProm.writeFile('./apiTests/merged-tests.json', JSON.stringify(d)); + }) + .then(r => console.log('merged-tests.json written')); +} + +mergeApiTestJson(); + +watch('./apiTests/specs', async function(event, filename) { + if (event === 'change') { + mergeApiTestJson(); + } +}); + module.exports = config; From 01d5883ea6d469fcaa0fed4f8a3550fdf3f90fd9 Mon Sep 17 00:00:00 2001 From: alisman Date: Thu, 22 Aug 2024 12:32:49 -0400 Subject: [PATCH 13/48] Clickhouse fix (#4971) * fix production build after webpack.config changes --- apiTests/mergeJson.js | 28 ++++++++++++++++++++++++++++ webpack.config.js | 35 +++++++---------------------------- 2 files changed, 35 insertions(+), 28 deletions(-) create mode 100644 apiTests/mergeJson.js diff --git a/apiTests/mergeJson.js b/apiTests/mergeJson.js new file mode 100644 index 00000000000..3a07ebc5e02 --- /dev/null +++ b/apiTests/mergeJson.js @@ -0,0 +1,28 @@ +const fsProm = require('fs/promises'); +const path = require('path'); + +async function mergeApiTestJson() { + const files = (await fsProm.readdir('./apiTests/specs')).map(fileName => { + return path.join('./apiTests/specs', fileName); + }); + + const jsons = files.map(path => { + return fsProm.readFile(path).then(data => { + try { + const json = JSON.parse(data); + return { file: path, suites: json }; + } catch (ex) { + console.log('invalid apiTest json spec'); + return []; + } + }); + }); + + Promise.all(jsons) + .then(d => { + fsProm.writeFile('./apiTests/merged-tests.json', JSON.stringify(d)); + }) + .then(r => console.log('merged-tests.json written')); +} + +exports.mergeApiTestJson = mergeApiTestJson; diff --git a/webpack.config.js b/webpack.config.js index d1f16bf837a..cd8cb25249a 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -45,6 +45,7 @@ const webpack = require('webpack'); const path = require('path'); const { watch } = require('fs'); const fs = require('fs/promises'); +const { mergeApiTestJson } = require('./apiTests/mergeJson'); const join = path.join; const resolve = path.resolve; @@ -597,36 +598,14 @@ if (isTest) { } // End Testing -async function mergeApiTestJson() { - const files = (await fsProm.readdir('./apiTests/specs')).map(fileName => { - return path.join('./apiTests/specs', fileName); - }); +mergeApiTestJson(); - const jsons = files.map(path => { - return fsProm.readFile(path).then(data => { - try { - const json = JSON.parse(data); - return { file: path, suites: json }; - } catch (ex) { - console.log('invalid apiTest json spec'); - return []; - } - }); +if (isDev) { + watch('./apiTests/specs', async function(event, filename) { + if (event === 'change') { + mergeApiTestJson(); + } }); - - Promise.all(jsons) - .then(d => { - fsProm.writeFile('./apiTests/merged-tests.json', JSON.stringify(d)); - }) - .then(r => console.log('merged-tests.json written')); } -mergeApiTestJson(); - -watch('./apiTests/specs', async function(event, filename) { - if (event === 'change') { - mergeApiTestJson(); - } -}); - module.exports = config; From 69dde84768abfdd1cb865d459edd2718efa82d42 Mon Sep 17 00:00:00 2001 From: alisman Date: Thu, 22 Aug 2024 14:33:59 -0400 Subject: [PATCH 14/48] fix test maker filterUrl (#4972) --- src/shared/api/testMaker.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/shared/api/testMaker.ts b/src/shared/api/testMaker.ts index a8b57eb2ef2..8651be14c33 100644 --- a/src/shared/api/testMaker.ts +++ b/src/shared/api/testMaker.ts @@ -47,8 +47,7 @@ export async function makeTest(data: any, url: string, label: string) { url, label, studies: toJS(getBrowserWindow().studyViewPageStore.studyIds), - filterUrl: (await getBrowserWindow().studyPage.getBookmarkUrl()) - .fullUrl, + filterUrl: getBrowserWindow().studyPage.studyViewFullUrlWithFilter, }; if (getBrowserWindow().localStorage.getItem(SAVE_TEST_KEY)) From 8e591892ff9332038bcc0383aea975ea04c6eb07 Mon Sep 17 00:00:00 2001 From: alisman Date: Thu, 22 Aug 2024 15:50:48 -0400 Subject: [PATCH 15/48] more fixes for test maker (#4973) --- src/shared/api/cbioportalInternalClientInstance.ts | 6 +++--- src/shared/api/testMaker.ts | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/shared/api/cbioportalInternalClientInstance.ts b/src/shared/api/cbioportalInternalClientInstance.ts index cf580fea677..282dd786846 100644 --- a/src/shared/api/cbioportalInternalClientInstance.ts +++ b/src/shared/api/cbioportalInternalClientInstance.ts @@ -1,6 +1,6 @@ import { CBioPortalAPIInternal } from 'cbioportal-ts-api-client'; import { getLoadConfig } from 'config/config'; -import { getBrowserWindow } from 'cbioportal-frontend-commons'; +import { getBrowserWindow, hashString } from 'cbioportal-frontend-commons'; import { toJS } from 'mobx'; import { reportValidationResult, validate } from 'shared/api/validation'; import _ from 'lodash'; @@ -52,8 +52,8 @@ function proxyColumnStore(client: any, endpoint: string) { setTimeout(() => { makeTest(params, url, matchedMethod[0]); }, 1000); - - validate(url, params, matchedMethod[0], 0).then( + const hash = hashString(JSON.stringify({ data: params, url })); + validate(url, params, matchedMethod[0], hash).then( (result: any) => { reportValidationResult(result); } diff --git a/src/shared/api/testMaker.ts b/src/shared/api/testMaker.ts index 8651be14c33..e82150bbdf9 100644 --- a/src/shared/api/testMaker.ts +++ b/src/shared/api/testMaker.ts @@ -52,6 +52,8 @@ export async function makeTest(data: any, url: string, label: string) { if (getBrowserWindow().localStorage.getItem(SAVE_TEST_KEY)) saveTest(hash, entry); + + return entry; } function saveTest(hash: number, entry: any) { From b94ce4d9928ee86dfb8c6ad4921c455ec6f99b17 Mon Sep 17 00:00:00 2001 From: alisman Date: Thu, 22 Aug 2024 16:25:25 -0400 Subject: [PATCH 16/48] Clickhouse test generation fix (#4975) * fix has generation based on url * add back all endpoints --- apiTests/specs/genie-public.json | 83 +------------------ apiTests/specs/two-tcga.json | 30 ------- .../api/cbioportalInternalClientInstance.ts | 9 +- src/shared/api/testMaker.ts | 18 +++- 4 files changed, 25 insertions(+), 115 deletions(-) delete mode 100644 apiTests/specs/two-tcga.json diff --git a/apiTests/specs/genie-public.json b/apiTests/specs/genie-public.json index 7db9996af4e..bde93511d5e 100644 --- a/apiTests/specs/genie-public.json +++ b/apiTests/specs/genie-public.json @@ -1,87 +1,10 @@ [ { - "name":"genie-public", - "note":"unfiltered", - "studies":["genie_public"], - "tests":[ - {"hash":140868719,"filterString":"","data":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":190356866,"filterString":"","data":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":251665166,"filterString":"","data":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":510907133,"filterString":"","data":{"studyIds":["genie_public"]},"url":"//genie-public-beta1.cbioportal.org/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":804271271,"filterString":"","data":{"attributes":[{"attributeId":"CANCER_TYPE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"SAMPLE_COUNT"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"SAMPLE_TYPE"},{"attributeId":"CENTER"},{"attributeId":"ONCOTREE_CODE"},{"attributeId":"PRIMARY_RACE"},{"attributeId":"SAMPLE_TYPE_DETAILED"},{"attributeId":"SEQ_ASSAY_ID"},{"attributeId":"DEAD"}],"studyViewFilter":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":1027347862,"filterString":"","data":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-1659847505,"filterString":"","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE_AT_SEQ_REPORT","disableLogScale":false,"showNA":false},{"attributeId":"INT_CONTACT","disableLogScale":false,"showNA":false},{"attributeId":"INT_DOD","disableLogScale":false,"showNA":false},{"attributeId":"YEAR_DEATH","disableLogScale":false,"showNA":false},{"attributeId":"YEAR_CONTACT","disableLogScale":false,"showNA":false}],"studyViewFilter":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-1217488228,"filterString":"","data":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-1699611002,"filterString":"","data":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} - ] - }, - - - - { - "name":"genie-public NSCLC", - "note":"filtered for non small cell lung cancer", + "name":"", + "note":"", "studies":[], "tests":[ - {"hash":510502347,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":651980249,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"attributes":[{"attributeId":"CENTER"},{"attributeId":"SEQ_ASSAY_ID"},{"attributeId":"SAMPLE_TYPE_DETAILED"},{"attributeId":"SAMPLE_COUNT"},{"attributeId":"SAMPLE_TYPE"},{"attributeId":"SEX"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"PRIMARY_RACE"},{"attributeId":"DEAD"},{"attributeId":"ETHNICITY"},{"attributeId":"ONCOTREE_CODE"}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":1277158099,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE_AT_SEQ_REPORT","disableLogScale":false,"showNA":false},{"attributeId":"INT_CONTACT","disableLogScale":false,"showNA":false},{"attributeId":"INT_DOD","disableLogScale":false,"showNA":false},{"attributeId":"YEAR_DEATH","disableLogScale":false,"showNA":false},{"attributeId":"YEAR_CONTACT","disableLogScale":false,"showNA":false}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":1744035832,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":2134662426,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-1152478474,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-1112863066,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-932029193,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"attributes":[{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-1307416334,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-1772738221,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"attributes":[{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-1607880342,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-1238300958,"filterString":"Cancer Type:Non-Small Cell Lung Cancer","data":{"clinicalDataFilters":[{"attributeId":"CANCER_TYPE","values":[{"value":"Non-Small Cell Lung Cancer"}]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"CANCER_TYPE\",\"values\":[{\"value\":\"Non-Small Cell Lung Cancer\"}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} - ] - }, - - - { - "name":"genie-public KRAS", - "note":"filtered for KRAS", - "studies":["genie-public"], - "tests":[ - {"hash":40441743,"filterString":"KRAS","data":{"geneFilters":[{"molecularProfileIds":["genie_public_mutations"],"geneQueries":[[{"hugoGeneSymbol":"KRAS","entrezGeneId":0,"alterations":[],"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"tiersBooleanMap":{},"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true}]]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":510907133,"filterString":"","data":{"studyIds":["genie_public"]},"url":"//genie-public-beta1.cbioportal.org/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":866628144,"filterString":"KRAS","data":{"geneFilters":[{"molecularProfileIds":["genie_public_mutations"],"geneQueries":[[{"hugoGeneSymbol":"KRAS","entrezGeneId":0,"alterations":[],"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"tiersBooleanMap":{},"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true}]]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":903357655,"filterString":"KRAS","data":{"geneFilters":[{"molecularProfileIds":["genie_public_mutations"],"geneQueries":[[{"hugoGeneSymbol":"KRAS","entrezGeneId":0,"alterations":[],"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"tiersBooleanMap":{},"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true}]]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":1882675854,"filterString":"","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE_AT_SEQ_REPORT","disableLogScale":false,"showNA":false},{"attributeId":"INT_CONTACT","disableLogScale":false,"showNA":false},{"attributeId":"INT_DOD","disableLogScale":false,"showNA":false},{"attributeId":"YEAR_DEATH","disableLogScale":false,"showNA":false},{"attributeId":"YEAR_CONTACT","disableLogScale":false,"showNA":false}],"studyViewFilter":{"geneFilters":[{"molecularProfileIds":["genie_public_mutations"],"geneQueries":[[{"hugoGeneSymbol":"KRAS","entrezGeneId":0,"alterations":[],"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"tiersBooleanMap":{},"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true}]]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-1725807704,"filterString":"","data":{"attributes":[{"attributeId":"CANCER_TYPE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"SAMPLE_COUNT"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"SAMPLE_TYPE"},{"attributeId":"CENTER"},{"attributeId":"ONCOTREE_CODE"},{"attributeId":"PRIMARY_RACE"},{"attributeId":"SAMPLE_TYPE_DETAILED"},{"attributeId":"SEQ_ASSAY_ID"},{"attributeId":"DEAD"}],"studyViewFilter":{"geneFilters":[{"molecularProfileIds":["genie_public_mutations"],"geneQueries":[[{"hugoGeneSymbol":"KRAS","entrezGeneId":0,"alterations":[],"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"tiersBooleanMap":{},"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true}]]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-1551256747,"filterString":"KRAS","data":{"geneFilters":[{"molecularProfileIds":["genie_public_mutations"],"geneQueries":[[{"hugoGeneSymbol":"KRAS","entrezGeneId":0,"alterations":[],"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"tiersBooleanMap":{},"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true}]]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-1678788063,"filterString":"KRAS","data":{"geneFilters":[{"molecularProfileIds":["genie_public_mutations"],"geneQueries":[[{"hugoGeneSymbol":"KRAS","entrezGeneId":0,"alterations":[],"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"tiersBooleanMap":{},"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true}]]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-654368419,"filterString":"KRAS","data":{"geneFilters":[{"molecularProfileIds":["genie_public_mutations"],"geneQueries":[[{"hugoGeneSymbol":"KRAS","entrezGeneId":0,"alterations":[],"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"tiersBooleanMap":{},"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true}]]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-2141793657,"filterString":"KRAS","data":{"geneFilters":[{"molecularProfileIds":["genie_public_mutations"],"geneQueries":[[{"hugoGeneSymbol":"KRAS","entrezGeneId":0,"alterations":[],"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"tiersBooleanMap":{},"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true}]]}],"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["genie_public"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=genie_public#filterJson={\"geneFilters\":[{\"molecularProfileIds\":[\"genie_public_mutations\"],\"geneQueries\":[[{\"hugoGeneSymbol\":\"KRAS\",\"entrezGeneId\":0,\"alterations\":[],\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"tiersBooleanMap\":{},\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true}]]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + {"hash":788956100,"filterString":"","data":{"attributes":[{"attributeId":"CANCER_TYPE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"SAMPLE_COUNT"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"SAMPLE_TYPE"},{"attributeId":"CENTER"},{"attributeId":"ONCOTREE_CODE"},{"attributeId":"PRIMARY_RACE"},{"attributeId":"SAMPLE_TYPE_DETAILED"},{"attributeId":"SEQ_ASSAY_ID"},{"attributeId":"DEAD"}],"studyViewFilter":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["genie_public"],"filterUrl":"/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} ] } ] \ No newline at end of file diff --git a/apiTests/specs/two-tcga.json b/apiTests/specs/two-tcga.json deleted file mode 100644 index 39c99b19032..00000000000 --- a/apiTests/specs/two-tcga.json +++ /dev/null @@ -1,30 +0,0 @@ -[ - { - "name":"two-tcga unfiltered", - "note":"two studies unfiltered", - "studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"], - "tests":[ - {"hash":199621622,"filterString":"","data":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":476143126,"filterString":"","data":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"]},"url":"//genie-public-beta1.cbioportal.org/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":1410492317,"filterString":"","data":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":1561600461,"filterString":"","data":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-1222622073,"filterString":"","data":{"attributes":[{"attributeId":"CANCER_TYPE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"SAMPLE_COUNT"},{"attributeId":"OS_STATUS"},{"attributeId":"SAMPLE_TYPE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"RACE"},{"attributeId":"SUBTYPE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"PATH_T_STAGE"}],"studyViewFilter":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-1997158862,"filterString":"","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-572446320,"filterString":"","data":{"attributes":[{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]}],"studyViewFilter":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-1264472707,"filterString":"","data":{"attributes":[{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]}],"studyViewFilter":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-2051238245,"filterString":"","data":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-147943133,"filterString":"","data":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, - - {"hash":-200476203,"filterString":"","data":{"studyIds":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"//genie-public-beta1.cbioportal.org/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["acc_tcga_pan_can_atlas_2018","esca_tcga_pan_can_atlas_2018"],"filterUrl":"https://genie-public-beta.cbioportal.org/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018#filterJson={\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"esca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} - ] - } -] \ No newline at end of file diff --git a/src/shared/api/cbioportalInternalClientInstance.ts b/src/shared/api/cbioportalInternalClientInstance.ts index 282dd786846..b43073c99cd 100644 --- a/src/shared/api/cbioportalInternalClientInstance.ts +++ b/src/shared/api/cbioportalInternalClientInstance.ts @@ -4,7 +4,7 @@ import { getBrowserWindow, hashString } from 'cbioportal-frontend-commons'; import { toJS } from 'mobx'; import { reportValidationResult, validate } from 'shared/api/validation'; import _ from 'lodash'; -import { makeTest } from 'shared/api/testMaker'; +import { makeTest, urlChopper } from 'shared/api/testMaker'; function proxyColumnStore(client: any, endpoint: string) { if (getBrowserWindow().location.search.includes('legacy')) { @@ -50,9 +50,12 @@ function proxyColumnStore(client: any, endpoint: string) { _.map(arguments[4], (v, k) => `${k}=${v}&`).join(''); setTimeout(() => { - makeTest(params, url, matchedMethod[0]); + makeTest(params, urlChopper(url), matchedMethod[0]); }, 1000); - const hash = hashString(JSON.stringify({ data: params, url })); + + const hash = hashString( + JSON.stringify({ data: params, url: urlChopper(url) }) + ); validate(url, params, matchedMethod[0], hash).then( (result: any) => { reportValidationResult(result); diff --git a/src/shared/api/testMaker.ts b/src/shared/api/testMaker.ts index e82150bbdf9..758b157808d 100644 --- a/src/shared/api/testMaker.ts +++ b/src/shared/api/testMaker.ts @@ -4,8 +4,20 @@ import _ from 'lodash'; export const SAVE_TEST_KEY = 'save_test_enabled'; +export function urlChopper(url: string) { + try { + if (typeof url === 'string') { + return url.match(/[^\/]*\/\/[^\/]*(\/.*)/)![1]; + } else { + return url; + } + } catch (ex) { + return url; + } +} + export async function makeTest(data: any, url: string, label: string) { - const hash = hashString(JSON.stringify({ data, url })); + const hash = hashString(JSON.stringify({ data, url: urlChopper(url) })); const filterString = $('.userSelections') .find('*') @@ -47,7 +59,9 @@ export async function makeTest(data: any, url: string, label: string) { url, label, studies: toJS(getBrowserWindow().studyViewPageStore.studyIds), - filterUrl: getBrowserWindow().studyPage.studyViewFullUrlWithFilter, + filterUrl: urlChopper( + getBrowserWindow().studyPage.studyViewFullUrlWithFilter + ), }; if (getBrowserWindow().localStorage.getItem(SAVE_TEST_KEY)) From 44aef62663505f5d8437b19521d20377c5dfe11b Mon Sep 17 00:00:00 2001 From: lismana Date: Thu, 22 Aug 2024 18:08:25 -0400 Subject: [PATCH 17/48] Fix show/hide button --- src/pages/studyView/rfc80Tester.tsx | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/pages/studyView/rfc80Tester.tsx b/src/pages/studyView/rfc80Tester.tsx index 8019220b157..1a935943655 100644 --- a/src/pages/studyView/rfc80Tester.tsx +++ b/src/pages/studyView/rfc80Tester.tsx @@ -12,6 +12,8 @@ getBrowserWindow().showTest = function() {}; const CACHE_KEY: string = 'testCache'; +const RFC_TEST_SHOW: string = 'RFC_TEST_SHOW'; + function getCache() { return getBrowserWindow()[CACHE_KEY] || {}; //return localStorage.getItem(CACHE_KEY); @@ -25,6 +27,7 @@ function clearCache() { export const RFC80Test = observer(function() { const store = useLocalObservable(() => ({ tests: [], + show: !!localStorage.getItem(RFC_TEST_SHOW), })); const clearCacheCallback = useCallback(() => { @@ -39,6 +42,13 @@ export const RFC80Test = observer(function() { } }, []); + const toggleShow = useCallback(() => { + !!localStorage.getItem(RFC_TEST_SHOW) + ? localStorage.removeItem(RFC_TEST_SHOW) + : localStorage.setItem(RFC_TEST_SHOW, 'true'); + store.show = !store.show; + }, []); + const runTests = useCallback(() => { const totalCount = _(json) .flatMap('suites') @@ -113,6 +123,24 @@ export const RFC80Test = observer(function() { ] }`; + if (!store.show) { + return ( +
+ +
+ ); + } + return (
+ From 00a695da9f2f13a4caf8768daaf180e2af329703 Mon Sep 17 00:00:00 2001 From: lismana Date: Thu, 22 Aug 2024 18:12:21 -0400 Subject: [PATCH 18/48] Add stop listening button --- src/pages/studyView/rfc80Tester.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/studyView/rfc80Tester.tsx b/src/pages/studyView/rfc80Tester.tsx index 1a935943655..b7dffc0928d 100644 --- a/src/pages/studyView/rfc80Tester.tsx +++ b/src/pages/studyView/rfc80Tester.tsx @@ -28,6 +28,7 @@ export const RFC80Test = observer(function() { const store = useLocalObservable(() => ({ tests: [], show: !!localStorage.getItem(RFC_TEST_SHOW), + listening: !!localStorage.getItem(SAVE_TEST_KEY), })); const clearCacheCallback = useCallback(() => { @@ -35,6 +36,7 @@ export const RFC80Test = observer(function() { }, []); const toggleListener = useCallback(() => { + store.listening = !store.listening; if (getBrowserWindow().localStorage.getItem(SAVE_TEST_KEY)) { getBrowserWindow().localStorage.removeItem(SAVE_TEST_KEY); } else { @@ -160,7 +162,9 @@ export const RFC80Test = observer(function() { - + {