Skip to content

Commit

Permalink
fix: SKFP-1115 remove some problematic cavatica metadata (#4022)
Browse files Browse the repository at this point in the history
  • Loading branch information
aperron-ferlab authored May 29, 2024
1 parent aed46d9 commit b378394
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
17 changes: 8 additions & 9 deletions src/store/passport/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,23 @@ const extractParticipantMetaData = (participants: any[]) => {
return {
// Removed temporarily due to bug
// case_id: joinUniquely(participants.map((x) => x.participant_id)),
external_participant_ids: joinUniquely(participants.map((x) => x.external_id)),
proband: joinUniquely(participants.map((x) => `${x.participant_id}: ${x.is_proband}`)),
// Removed temporarily due to bug
// ethnicity: joinUniquely(participants.map((x) => x.ethnicity)),
// gender: joinUniquely(participants.map((x) => x.sex)),
// race: joinUniquely(participants.map((x) => x.race)),
// diagnosis_source_text: joinUniquely(diagnosis.map((d) => d.source_text)),
// diagnosis_mondo: joinUniquely(diagnosis.map((d) => d.mondo_display_term)),
// diagnosis_ncit: joinUniquely(diagnosis.map((d) => d.ncit_id_diagnosis)),
// observed_phenotype_hpo: joinUniquely(phenotype.map((p) => p.hpo_phenotype_observed)),
// not_observed_phenotype_hpo: joinUniquely(phenotype.map((p) => p.hpo_phenotype_not_observed)),
// observed_phenotype_source_text: joinUniquely(phenotype.map((p) => p.source_text)),
external_participant_ids: joinUniquely(participants.map((x) => x.external_id)),
proband: joinUniquely(participants.map((x) => `${x.participant_id}: ${x.is_proband}`)),
age_at_participant_diagnosis: joinUniquely(diagnosis.map((d) => d.age_at_event_days)),
age_at_vital_status: joinUniquely(outcomes.map((o) => o.age_at_event_days.value)),
age_at_observed_phenotype: joinUniquely(phenotype.map((p) => p.age_at_event_days)),
diagnosis_mondo: joinUniquely(diagnosis.map((d) => d.mondo_display_term)),
diagnosis_ncit: joinUniquely(diagnosis.map((d) => d.ncit_id_diagnosis)),
diagnosis_source_text: joinUniquely(diagnosis.map((d) => d.source_text)),
family_id: joinUniquely(participants.map((x) => x.families_id)),
family_composition: joinUniquely(participants.map((x) => x.family_type)),
family_role: joinUniquely(relation.map((r) => r.role)),
observed_phenotype_hpo: joinUniquely(phenotype.map((p) => p.hpo_phenotype_observed)),
not_observed_phenotype_hpo: joinUniquely(phenotype.map((p) => p.hpo_phenotype_not_observed)),
observed_phenotype_source_text: joinUniquely(phenotype.map((p) => p.source_text)),
vital_status: joinUniquely(outcomes.map((o) => o.vital_status)),
};
};
Expand Down
12 changes: 6 additions & 6 deletions src/store/passport/thunks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,18 +305,18 @@ describe(`${extractMetadata.name}()`, () => {
// ethnicity: 'Not Hispanic or Latino',
// gender: 'female',
// race: 'White',
// observed_phenotype_hpo: 'hpo_phenotype_observed',
// not_observed_phenotype_hpo: 'hpo_phenotype_not_observed',
// observed_phenotype_source_text: 'mySourceText',
// diagnosis_source_text: 'Neuroblastoma',
// diagnosis_mondo: 'neuroblastoma (MONDO:0005072)',
// diagnosis_ncit: 'NCIT:C3270',
age_at_participant_diagnosis: '174',
age_at_vital_status: '3137',
age_at_observed_phenotype: '31231',
diagnosis_mondo: 'neuroblastoma (MONDO:0005072)',
diagnosis_ncit: 'NCIT:C3270',
diagnosis_source_text: 'Neuroblastoma',
family_id: 'FM_5ED41H3V',
family_composition: 'trio',
family_role: 'mother,father,proband',
observed_phenotype_hpo: 'hpo_phenotype_observed',
not_observed_phenotype_hpo: 'hpo_phenotype_not_observed',
observed_phenotype_source_text: 'mySourceText',
vital_status: 'Alive',
sample_id: '595495',
sample_type: 'DNA',
Expand Down

0 comments on commit b378394

Please sign in to comment.