Skip to content

Commit

Permalink
Merge pull request #1596 from sennetconsortium/libpitt/1576-organize-…
Browse files Browse the repository at this point in the history
…facets

Libpitt/1576 organize facets
  • Loading branch information
maxsibilla authored Aug 16, 2024
2 parents fa5ad52 + 2e9c68f commit 3cb966a
Showing 1 changed file with 126 additions and 123 deletions.
249 changes: 126 additions & 123 deletions src/config/search/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,6 @@ export const SEARCH_METADATA = {
},

// Source Human
"source_mapped_metadata.sex.value": {
label: 'Sex',
type: 'value',
field: 'source_mapped_metadata.sex.value.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
},
"source_mapped_metadata.race.value": {
label: 'Race',
type: 'value',
field: 'source_mapped_metadata.race.value.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
},
"source_mapped_metadata.age.value": {
label: 'Age',
type: 'range',
Expand All @@ -103,20 +87,28 @@ export const SEARCH_METADATA = {
uiType: 'numrange',
uiInterval: 1,
},

// Source Mouse
"metadata.strain": {
label: 'Strain',
"source_mapped_metadata.race.value": {
label: 'Race',
type: 'value',
field: 'metadata.strain.keyword',
field: 'source_mapped_metadata.race.value.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
},
"metadata.sex": {
"source_mapped_metadata.sex.value": {
label: 'Sex',
type: 'value',
field: 'metadata.sex.keyword',
field: 'source_mapped_metadata.sex.value.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
},

// Source Mouse
"metadata.euthanization_method": {
label: 'Euthanization Method',
type: 'value',
field: 'metadata.euthanization_method.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
Expand All @@ -137,64 +129,25 @@ export const SEARCH_METADATA = {
filterType: 'any',
isFilterable: false,
},
"metadata.euthanization_method": {
label: 'Euthanization Method',
"metadata.sex": {
label: 'Sex',
type: 'value',
field: 'metadata.euthanization_method.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
},

// Sample Block
"metadata.volume_value": {
label: 'Volume',
type: 'range',
field: 'metadata.volume_value',
field: 'metadata.sex.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
uiType: 'numrange',
uiInterval: (filters) => {
if (filters.some((filter) => filter.values.includes('ml'))) {
return 0.1
}
return 1000
},
},
"metadata.volume_unit": {
label: 'Volume Unit',
"metadata.strain": {
label: 'Strain',
type: 'value',
field: 'metadata.volume_unit.keyword',
field: 'metadata.strain.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
},


// Sample Section
"metadata.thickness_value": {
label: 'Thickness',
type: 'range',
field: 'metadata.thickness_value',
isExpanded: false,
filterType: 'any',
isFilterable: false,
uiType: 'numrange',
uiInterval: (filters) => {
if (filters.some((filter) => filter.values.includes('um'))) {
return 1
}
return 0.1
},
},
"metadata.thickness_unit": {
label: 'Thickness Unit',
type: 'value',
field: 'metadata.thickness_unit.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
},
"metadata.area_value": {
label: 'Area',
type: 'range',
Expand All @@ -213,55 +166,48 @@ export const SEARCH_METADATA = {
isFilterable: false,
},

// Sample Suspension
"metadata.suspension_entity_type": {
label: 'Suspension Entity Type',
// Sample Shared
"metadata.preparation_condition": {
label: 'Preparation Condition',
type: 'value',
field: 'metadata.suspension_entity_type.keyword',
field: 'metadata.preparation_condition.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
},
"metadata.suspension_entity_count": {
label: 'Suspension Entity Number',
type: 'range',
field: 'metadata.suspension_entity_count',
"metadata.preparation_medium": {
label: 'Preparation Medium',
type: 'value',
field: 'metadata.preparation_medium.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
uiType: 'numrange',
uiInterval: 100000,
},
"metadata.is_suspension_enriched": {
label: 'Is Suspension Enriched',
"metadata.storage_method": {
label: 'Preparation Method',
type: 'value',
field: 'metadata.is_suspension_enriched.keyword',
field: 'metadata.storage_method.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
},

// Sample Block/Suspension Shared
"metadata.tissue_weight_value": {
label: 'Tissue Weight',
"metadata.processing_time_value": {
label: 'Processing Time',
type: 'range',
field: 'metadata.tissue_weight_value',
field: 'metadata.processing_time_value',
isExpanded: false,
filterType: 'any',
isFilterable: false,
uiType: 'numrange',
uiInterval: 5,
},
"metadata.tissue_weight_unit": {
label: 'Tissue Weight Unit',
"metadata.processing_time_unit": {
label: 'Processing Time Unit',
type: 'value',
field: 'metadata.tissue_weight_unit.keyword',
field: 'metadata.processing_time_unit.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
},

// Sample Shared
"metadata.source_storage_duration_value": {
label: 'Storage Duration',
type: 'range',
Expand All @@ -288,82 +234,114 @@ export const SEARCH_METADATA = {
filterType: 'any',
isFilterable: false,
},
"metadata.preparation_medium": {
label: 'Preparation Medium',
"metadata.storage_medium": {
label: 'Storage Medium',
type: 'value',
field: 'metadata.preparation_medium.keyword',
field: 'metadata.storage_medium.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
},
"metadata.preparation_condition": {
label: 'Preparation Condition',
type: 'value',
field: 'metadata.preparation_condition.keyword',

//Sample Section
"metadata.thickness_value": {
label: 'Thickness',
type: 'range',
field: 'metadata.thickness_value',
isExpanded: false,
filterType: 'any',
isFilterable: false,
uiType: 'numrange',
uiInterval: (filters) => {
if (filters.some((filter) => filter.values.includes('um'))) {
return 1
}
return 0.1
},
},
"metadata.storage_medium": {
label: 'Storage Medium',
"metadata.thickness_unit": {
label: 'Thickness Unit',
type: 'value',
field: 'metadata.storage_medium.keyword',
field: 'metadata.thickness_unit.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
},
"metadata.storage_method": {
label: 'Preparation Method',

// Sample Block/Suspension Shared
"metadata.tissue_weight_value": {
label: 'Tissue Weight',
type: 'range',
field: 'metadata.tissue_weight_value',
isExpanded: false,
filterType: 'any',
isFilterable: false,
uiType: 'numrange',
uiInterval: 5,
},
"metadata.tissue_weight_unit": {
label: 'Tissue Weight Unit',
type: 'value',
field: 'metadata.storage_method.keyword',
field: 'metadata.tissue_weight_unit.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
},

"metadata.processing_time_value": {
label: 'Processing Time',
// Sample Block
"metadata.volume_value": {
label: 'Volume',
type: 'range',
field: 'metadata.processing_time_value',
field: 'metadata.volume_value',
isExpanded: false,
filterType: 'any',
isFilterable: false,
uiType: 'numrange',
uiInterval: (filters) => {
if (filters.some((filter) => filter.values.includes('ml'))) {
return 0.1
}
return 1000
},
},
"metadata.processing_time_unit": {
label: 'Processing Time Unit',
"metadata.volume_unit": {
label: 'Volume Unit',
type: 'value',
field: 'metadata.processing_time_unit.keyword',
field: 'metadata.volume_unit.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
},

// Dataset
"ingest_metadata.metadata.assay_category": {
label: 'Assay Category',
// Sample Suspension
"metadata.suspension_entity_type": {
label: 'Suspension Entity Type',
type: 'value',
field: 'ingest_metadata.metadata.assay_category.keyword',
field: 'metadata.suspension_entity_type.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
},
"ingest_metadata.metadata.analyte_class": {
label: 'Analyte Class',
type: 'value',
field: 'ingest_metadata.metadata.analyte_class.keyword',
"metadata.suspension_entity_count": {
label: 'Suspension Entity Number',
type: 'range',
field: 'metadata.suspension_entity_count',
isExpanded: false,
filterType: 'any',
isFilterable: false,
uiType: 'numrange',
uiInterval: 100000,
},
"ingest_metadata.metadata.operator": {
label: 'Operator',
"metadata.is_suspension_enriched": {
label: 'Is Suspension Enriched',
type: 'value',
field: 'ingest_metadata.metadata.operator.keyword',
field: 'metadata.is_suspension_enriched.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
},

// Dataset
"ingest_metadata.metadata.acquisition_instrument_model": {
label: 'Acquisition Instrument Model',
type: 'value',
Expand All @@ -380,6 +358,31 @@ export const SEARCH_METADATA = {
filterType: 'any',
isFilterable: false,
},
"ingest_metadata.metadata.analyte_class": {
label: 'Analyte Class',
type: 'value',
field: 'ingest_metadata.metadata.analyte_class.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
},
"ingest_metadata.metadata.assay_category": {
label: 'Assay Category',
type: 'value',
field: 'ingest_metadata.metadata.assay_category.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
},
"ingest_metadata.metadata.operator": {
label: 'Operator',
type: 'value',
field: 'ingest_metadata.metadata.operator.keyword',
isExpanded: false,
filterType: 'any',
isFilterable: false,
},

},
disjunctiveFacets: [],
conditionalFacets: {
Expand Down

0 comments on commit 3cb966a

Please sign in to comment.