Skip to content

Commit

Permalink
Merge pull request #4202 from alisman/defBuild
Browse files Browse the repository at this point in the history
Restore default genome build for genomic overview
  • Loading branch information
alisman authored Mar 10, 2022
2 parents d1d93a9 + 8cf2054 commit dc0d20f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/pages/patientView/genomicOverview/tracksHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Mutation } from 'cbioportal-ts-api-client';
import { default as chromosomeSizes } from './chromosomeSizes.json';
import { IIconData } from './GenomicOverviewUtils.js';
import { GENOME_ID_TO_GENOME_BUILD } from 'shared/lib/referenceGenomeUtils';
import { DEFAULT_GENOME_BUILD } from 'pages/patientView/genomicOverview/Tracks';

export function GenomicOverviewConfig(
nRows: any,
Expand Down Expand Up @@ -94,7 +95,12 @@ export function getRelativeCoordinates(genomeBuild: string) {
// Code expects the 'genomeBuild' to reflect the NCBI build identifier (e.g., "GRCh37").
// For legacy reasons, we derive NCBI build identifier for incomplete build identifiers
// (e.g., "37") or from UCSC genome identifiers (e.g., 'hg19').
const genomeBuildTranslated = _.get(GENOME_ID_TO_GENOME_BUILD, genomeBuild);
const genomeBuildTranslated = _.get(
GENOME_ID_TO_GENOME_BUILD,
genomeBuild,
DEFAULT_GENOME_BUILD
);

const genomeSize = referenceGenomeSizes[genomeBuildTranslated];
if (genomeSize) {
sel.genomeRef = genomeSize;
Expand Down

0 comments on commit dc0d20f

Please sign in to comment.