Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getting molecular profile ids from key #4899

Merged
merged 2 commits into from
May 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions src/pages/studyView/StudyViewUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -883,16 +883,12 @@ function startsWithSvChartType(chartType?: string) {
}

export function getMolecularProfileIdsFromUniqueKey(uniqueKey: string) {
const parts = uniqueKey.split(UNIQUE_KEY_SEPARATOR);
if (!startsWithSvChartType(parts[0])) {
return parts;
} else {
return _.map(
parts,
molecularProfileId =>
molecularProfileId.split(CHART_TYPE_SEPARATOR)[1]
);
}
// chartType is added to the uniqueKey for structural variant charts. Example: 'structural_variants;study1_structural_variants:study2_structural_variants'.
// and for other charts, it is not added. Example: 'study1_mutations:study2_mutations'.
return (startsWithSvChartType(uniqueKey)
kalletlak marked this conversation as resolved.
Show resolved Hide resolved
? uniqueKey.substring(uniqueKey.indexOf(CHART_TYPE_SEPARATOR) + 1)
: uniqueKey
).split(UNIQUE_KEY_SEPARATOR);
}

export function getCurrentDate() {
Expand Down
Loading