Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions __tests__/utils/schemaOrg/hcaProjectDataset.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ describe("buildHcaProjectJsonLd", () => {
samples: [
{
disease: ["normal"],
id: ["s1"],
organ: ["brain"],
organPart: ["cortex"],
sampleEntityType: ["specimens"],
Expand All @@ -259,7 +258,6 @@ describe("buildHcaProjectJsonLd", () => {
specimens: [
{
disease: ["normal"],
id: ["s1"],
organ: ["brain"],
organPart: ["cortex"],
preservationMethod: [],
Expand Down
2 changes: 0 additions & 2 deletions app/apis/azul/hca-dcp/common/aggregatedEntities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ export interface AggregatedSampleResponse {
cellLineType?: string[];
disease?: (string | null)[];
effectiveOrgan?: (string | null)[];
id: string[];
modelOrgan?: (string | null)[];
modelOrganPart?: (string | null)[];
organ?: string[];
Expand All @@ -144,7 +143,6 @@ export interface AggregatedSamplesResponse {
*/
export interface AggregatedSpecimenResponse {
disease: (string | null)[];
id: string[];
organ: string[];
organPart: (string | null)[];
preservationMethod: (string | null)[];
Expand Down
1 change: 0 additions & 1 deletion app/apis/azul/hca-dcp/common/entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ export interface SampleResponse {
cellLineType?: string;
disease?: (string | null)[];
effectiveOrgan: string | null;
id: string;
modelOrgan?: string | null;
modelOrganPart?: string | null;
organ?: string;
Expand Down
2 changes: 0 additions & 2 deletions app/components/Index/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const {
PHENOTYPIC_SEX,
PLATFORM,
REPORTED_ETHNICITY,
SAMPLE_ID,
SAMPLE_TYPE,
SELECTED_CELL_TYPE,
STUDY,
Expand Down Expand Up @@ -118,7 +117,6 @@ export const PLURALIZED_METADATA_LABEL = {
[PHENOTYPIC_SEX]: "phenotypic sexes",
[PLATFORM]: "platforms",
[REPORTED_ETHNICITY]: "reported ethnicities",
[SAMPLE_ID]: "sample ids",
[SAMPLE_TYPE]: "sample types",
[SELECTED_CELL_TYPE]: "cell types",
[STUDY]: "studies",
Expand Down
1 change: 0 additions & 1 deletion app/components/Index/common/entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export enum METADATA_KEY {
PHENOTYPIC_SEX = "PHENOTYPIC_SEX",
PLATFORM = "PLATFORM",
REPORTED_ETHNICITY = "REPORTED_ETHNICITY",
SAMPLE_ID = "SAMPLE_ID",
SAMPLE_TYPE = "SAMPLE_TYPE",
SELECTED_CELL_TYPE = "SELECTED_CELL_TYPE",
SPECIES = "SPECIES",
Expand Down
27 changes: 0 additions & 27 deletions app/viewModelBuilders/azul/hca-dcp/common/viewModelBuilders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -404,20 +404,6 @@
};
};

/**
* Build props for the aggregated sample ID NTagCell component from the given entity response.
* @param entityResponse - Response model return from the entity response API.
* @returns model to be used as props for the NTagCell component.
*/
export const buildAggregatedSampleId = (
entityResponse: ProjectsResponse | FilesResponse
): React.ComponentProps<typeof C.NTagCell> => {
return {
label: getPluralizedMetadataLabel(METADATA_KEY.SAMPLE_ID),
values: processAggregatedOrArrayValue(entityResponse.samples, "id"),
};
};

/**
* Build props for the aggregated model organ NTagCell component from the given entity response.
* @param entityResponse - Response model return from the entity response API.
Expand Down Expand Up @@ -1392,19 +1378,6 @@
};
};

/**
* Build props for sample identifier BasicCell component from the given sample response.
* @param samplesResponse - Response model return from samples API.
* @returns model to be used as props for the BasicCell component.
*/
export const buildSampleId = (
samplesResponse: SamplesResponse
): React.ComponentProps<typeof C.BasicCell> => {
return {
value: processEntityValue(samplesResponse.samples, "id"),
};
};

/**
* Build props for the model organ BasicCell component from the given samples response.
* @param samplesResponse - Response model return from the samples API.
Expand Down Expand Up @@ -1953,7 +1926,7 @@
cell: ({ column, row }) => (
<C.NTagCell
{...getNTagCellProps(
row.original as unknown as ProjectMatrixTableView, // TODO revisit type assertion here

Check warning on line 1929 in app/viewModelBuilders/azul/hca-dcp/common/viewModelBuilders.tsx

View workflow job for this annotation

GitHub Actions / build

Complete the task associated to this "TODO" comment
column.id,
METADATA_KEY.ANATOMICAL_ENTITY
)}
Expand All @@ -1975,7 +1948,7 @@
cell: ({ column, row }) => (
<C.NTagCell
{...getNTagCellProps(
row.original as unknown as ProjectMatrixTableView, // TODO revisit type assertion here

Check warning on line 1951 in app/viewModelBuilders/azul/hca-dcp/common/viewModelBuilders.tsx

View workflow job for this annotation

GitHub Actions / build

Complete the task associated to this "TODO" comment
column.id,
METADATA_KEY.CONTENT_DESCRIPTION
)}
Expand Down
2 changes: 0 additions & 2 deletions site-config/hca-dcp/category.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export const HCA_DCP_CATEGORY_KEY = {
PROJECT_TITLE: "projectTitle",
PUBLICATION_TITLE: "publicationTitle",
SAMPLE_ENTITY_TYPE: "sampleEntityType",
SAMPLE_ID: "sampleId",
SAMPLE_TYPE: "sampleType",
SELECTED_CELL_TYPE: "selectedCellType",
SPECIMEN_DISEASE: "specimenDisease",
Expand Down Expand Up @@ -84,7 +83,6 @@ export const HCA_DCP_CATEGORY_LABEL = {
PROJECT_TITLE: "Project Title",
PUBLICATION_TITLE: "Publication Title",
SAMPLE_ENTITY_TYPE: "Sample Type",
SAMPLE_ID: "Sample Id",
SAMPLE_TYPE: "Sample Type",
SELECTED_CELL_TYPE: "Selected Cell Type",
SPECIMEN_DISEASE: "Specimen Disease",
Expand Down
11 changes: 0 additions & 11 deletions site-config/hca-dcp/ma-dev/entities/files/columns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,16 +214,6 @@ const SAMPLE_ENTITY_TYPE: ColumnConfig<FilesResponse> = {
width: { max: "1fr", min: "120px" },
};

const SAMPLE_ID: ColumnConfig<FilesResponse> = {
componentConfig: {
component: C.NTagCell,
viewBuilder: V.buildAggregatedSampleId,
} as ComponentConfig<typeof C.NTagCell, FilesResponse>,
header: HCA_DCP_CATEGORY_LABEL.SAMPLE_ID,
id: HCA_DCP_CATEGORY_KEY.SAMPLE_ID,
width: { max: "1fr", min: "120px" },
};

const SELECTED_CELL_TYPE: ColumnConfig<FilesResponse> = {
componentConfig: {
component: C.NTagCell,
Expand Down Expand Up @@ -274,7 +264,6 @@ export const COLUMNS: EntityConfig<FilesResponse>["list"]["columns"] = [
CONTENT_DESCRIPTION,
FILE_SOURCE,
PROJECT_TITLE,
SAMPLE_ID,
GENUS_SPECIES,
SAMPLE_ENTITY_TYPE,
SPECIMEN_ORGAN,
Expand Down
1 change: 0 additions & 1 deletion site-config/hca-dcp/ma-dev/entities/files/tableOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export const TABLE_OPTIONS: EntityConfig<FilesResponse>["list"]["tableOptions"]
columnVisibility: {
[HCA_DCP_CATEGORY_KEY.FILE_FORMAT]: false,
[HCA_DCP_CATEGORY_KEY.FILE_SOURCE]: false,
[HCA_DCP_CATEGORY_KEY.SAMPLE_ID]: false,
[HCA_DCP_CATEGORY_KEY.GENUS_SPECIES]: false,
[HCA_DCP_CATEGORY_KEY.SAMPLE_ENTITY_TYPE]: false,
[HCA_DCP_CATEGORY_KEY.SPECIMEN_ORGAN]: false,
Expand Down
11 changes: 0 additions & 11 deletions site-config/hca-dcp/ma-dev/entities/samples/columns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,6 @@ const SAMPLE_ENTITY_TYPE: ColumnConfig<SamplesResponse> = {
width: { max: "1fr", min: "124px" },
};

const SAMPLE_ID: ColumnConfig<SamplesResponse> = {
componentConfig: {
component: C.BasicCell,
viewBuilder: V.buildSampleId,
} as ComponentConfig<typeof C.BasicCell, SamplesResponse>,
header: HCA_DCP_CATEGORY_LABEL.SAMPLE_ID,
id: HCA_DCP_CATEGORY_KEY.SAMPLE_ID,
width: { max: "1fr", min: "120px" },
};

const SELECTED_CELL_TYPE: ColumnConfig<SamplesResponse> = {
componentConfig: {
component: C.NTagCell,
Expand Down Expand Up @@ -192,7 +182,6 @@ const WORKFLOW: ColumnConfig<SamplesResponse> = {
};

export const COLUMNS: EntityConfig<SamplesResponse>["list"]["columns"] = [
SAMPLE_ID,
PROJECT_TITLE,
GENUS_SPECIES,
SAMPLE_ENTITY_TYPE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const TABLE_OPTIONS: EntityConfig<SamplesResponse>["list"]["tableOptions"
sorting: [
{
desc: SORT_DIRECTION.ASCENDING,
id: HCA_DCP_CATEGORY_KEY.SAMPLE_ID,
id: HCA_DCP_CATEGORY_KEY.PROJECT_TITLE,
},
],
},
Expand Down
10 changes: 0 additions & 10 deletions site-config/lungmap/dev/index/filesEntityConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,6 @@ export const filesEntityConfig: EntityConfig = {
id: HCA_DCP_CATEGORY_KEY.PROJECT_TITLE,
width: { max: "2fr", min: "240px" },
},
{
componentConfig: {
component: C.NTagCell,
viewBuilder: V.buildAggregatedSampleId,
} as ComponentConfig<typeof C.NTagCell, FilesResponse>,
header: HCA_DCP_CATEGORY_LABEL.SAMPLE_ID,
id: HCA_DCP_CATEGORY_KEY.SAMPLE_ID,
width: { max: "1fr", min: "120px" },
},
{
componentConfig: {
component: C.NTagCell,
Expand Down Expand Up @@ -250,7 +241,6 @@ export const filesEntityConfig: EntityConfig = {
columnVisibility: {
[HCA_DCP_CATEGORY_KEY.FILE_FORMAT]: false,
[HCA_DCP_CATEGORY_KEY.FILE_SOURCE]: false,
[HCA_DCP_CATEGORY_KEY.SAMPLE_ID]: false,
[HCA_DCP_CATEGORY_KEY.GENUS_SPECIES]: false,
[HCA_DCP_CATEGORY_KEY.SAMPLE_ENTITY_TYPE]: false,
[HCA_DCP_CATEGORY_KEY.SPECIMEN_ORGAN]: false,
Expand Down
11 changes: 1 addition & 10 deletions site-config/lungmap/dev/index/samplesEntityConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@ export const samplesEntityConfig: EntityConfig = {
label: "Samples",
list: {
columns: [
{
componentConfig: {
component: C.BasicCell,
viewBuilder: V.buildSampleId,
} as ComponentConfig<typeof C.BasicCell, SamplesResponse>,
header: HCA_DCP_CATEGORY_LABEL.SAMPLE_ID,
id: HCA_DCP_CATEGORY_KEY.SAMPLE_ID,
width: { max: "1fr", min: "120px" },
},
{
componentConfig: {
component: C.Link,
Expand Down Expand Up @@ -207,7 +198,7 @@ export const samplesEntityConfig: EntityConfig = {
sorting: [
{
desc: SORT_DIRECTION.ASCENDING,
id: HCA_DCP_CATEGORY_KEY.SAMPLE_ID,
id: HCA_DCP_CATEGORY_KEY.PROJECT_TITLE,
},
],
},
Expand Down
Loading