-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug fix: case no meta data from mutational signatures endpoint #4692
bug fix: case no meta data from mutational signatures endpoint #4692
Conversation
@inodb I will test it with the pancan study locally before making this ready for review (just to be sure) |
export function formatLegendTopAxisPoints(data: IMutationalCounts[]) { | ||
/*export function formatLegendTopAxisPoints(data: IMutationalCounts[]) { | ||
const constant_value = _.max(data.map(item => item.value)) || 0; | ||
const groupedData = _.groupBy(getColorsForSignatures(data), g => g.group); | ||
return getColorsForSignatures(data).map(entry => ({ | ||
x: entry.mutationalSignatureLabel, | ||
y: constant_value + constant_value * 0.1, | ||
color: entry.colorValue, | ||
})); | ||
} | ||
}*/ | ||
|
||
export function transformMutationalSignatureData(dataset: IMutationalCounts[]) { | ||
/*export function transformMutationalSignatureData(dataset: IMutationalCounts[]) { | ||
const transformedDataSet = dataset.map((obj: IMutationalCounts) => { | ||
const transformedDataSet = dataset.map((obj: IMutationalCounts) => { | ||
let referenceTransformed = -Math.abs(obj.value); | ||
return { ...obj, referenceTransformed }; | ||
}); | ||
return transformedDataSet; | ||
}); | ||
} | ||
}*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what were these used for previously?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatLegendTopAxisPoints
is not needed anymore since this behavior is captured in the @computed formatLegendTopAxisPoints
. The second function transformMutationalSignatureData
is to show the reference counts but we will not show them in this chart. (I have a separate branch with the reference signature so the function is not lost)
Updated alternative name for missing labels Update PatientViewPageUtils.tsx updated label placement removed unused functions Prettier fix local
52b5948
to
5aaf030
Compare
Added an additional check when
fetchAllMutationalSignatureCountMetaData
does return an empty array.In this case, the stable ID (which should always be defined) is used the create the mutational signature label.