Skip to content

Commit

Permalink
Add Investigator Sample ID column to WES Samples view
Browse files Browse the repository at this point in the history
  • Loading branch information
qu8n authored and ao508 committed Sep 30, 2024
1 parent 6dabcaa commit 611d453
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions frontend/src/pages/cohorts/CohortsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "../../generated/graphql";
import { Dispatch, SetStateAction, useState } from "react";
import {
CohortSampleDetailsColumns,
WesSampleDetailsColumns,
CohortsListColumns,
handleSearch,
prepareCohortDataForAgGrid,
Expand Down Expand Up @@ -165,7 +165,7 @@ export default function CohortsPage({
showDownloadModal={showDownloadModal}
setShowDownloadModal={setShowDownloadModal}
handleDownload={() => setShowDownloadModal(true)}
samplesColDefs={CohortSampleDetailsColumns}
samplesColDefs={WesSampleDetailsColumns}
sampleContext={
sampleQueryParamValue
? {
Expand Down
10 changes: 7 additions & 3 deletions frontend/src/shared/helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ export const CohortsListColumns: ColDef[] = [
},
];

export const CohortSampleDetailsColumns: ColDef[] = [
export const WesSampleDetailsColumns: ColDef[] = [
{
field: "primaryId",
headerName: "Primary ID",
Expand Down Expand Up @@ -783,14 +783,18 @@ export const CohortSampleDetailsColumns: ColDef[] = [
field: "cancerTypeDetailed",
headerName: "Cancer Type Detailed",
},
{
field: "investigatorSampleId",
headerName: "Investigator Sample ID",
},
];

export const ReadOnlyCohortSampleDetailsColumns = _.cloneDeep(
CohortSampleDetailsColumns
WesSampleDetailsColumns
);

setupEditableSampleFields(SampleMetadataDetailsColumns);
setupEditableSampleFields(CohortSampleDetailsColumns);
setupEditableSampleFields(WesSampleDetailsColumns);

export const combinedSampleDetailsColumns = _.uniqBy(
[...SampleMetadataDetailsColumns, ...ReadOnlyCohortSampleDetailsColumns],
Expand Down

0 comments on commit 611d453

Please sign in to comment.