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

Kludge to get lgggbm study overlap detection (other tcga studies are prefixed "lgg") #4455

Merged
merged 1 commit into from
Dec 16, 2022
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
13 changes: 9 additions & 4 deletions src/shared/lib/getOverlappingStudies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ export default function getOverlappingStudies(
(memo, study: CancerStudy) => {
if (/_tcga/.test(study.studyId)) {
// we need to find when root of study name is in duplicate, so strip out the modifiers (pub or pancan)
const initial = study.studyId.replace(
/(_\d\d\d\d|_pub|(_pub\d\d\d\d)|_pan_can_atlas_\d\d\d\d)$/g,
''
);
const initial = study.studyId
.replace(
/(_\d\d\d\d|_pub|(_pub\d\d\d\d)|_pan_can_atlas_\d\d\d\d)$/g,
''
)
// this is a cloodge for a tcga study which does not respect convention of it's siblings with
// which it overlaps
.replace('lgggbm_', 'lgg_');

if (initial) {
if (initial in memo) {
memo[initial].push(study);
Expand Down