Skip to content
Snippets Groups Projects
Commit 00bc917f authored by David Mendez's avatar David Mendez
Browse files

EUbOPEN compounds: add field for molecule class and configure querystring examples

parent e58cc479
No related branches found
No related tags found
1 merge request!54EUbOPEN compounds: add field for molecule class and configure querystring examples
...@@ -37,7 +37,7 @@ export default { ...@@ -37,7 +37,7 @@ export default {
}, },
}), }),
mounted() { mounted() {
const docSource = ['pref_name'] const docSource = ['pref_name', '_metadata.eubopen.is_probe']
const entityID = EntityNames.EubopenCompound.entityID const entityID = EntityNames.EubopenCompound.entityID
const indexName = IndexNames.getIndexNameFromEntityID(entityID) const indexName = IndexNames.getIndexNameFromEntityID(entityID)
...@@ -51,9 +51,19 @@ export default { ...@@ -51,9 +51,19 @@ export default {
false false
) )
const isChemicalProbe = ObjectPropertyAccess.getPropertyPalue(
sourceObtained,
'_metadata.eubopen.is_probe',
false
)
const isNegativeControl = !isChemicalProbe
const reportCardStructure = CompoundReportCardGenerator.generateReportCardStructure( const reportCardStructure = CompoundReportCardGenerator.generateReportCardStructure(
this.itemID, this.itemID,
prefName prefName,
isChemicalProbe,
isNegativeControl
) )
this.$store.dispatch( this.$store.dispatch(
`${this.storeModuleName}/setReportCardStructure`, `${this.storeModuleName}/setReportCardStructure`,
......
...@@ -52,6 +52,13 @@ ...@@ -52,6 +52,13 @@
<v-divider /> <v-divider />
</div> </div>
</v-col> </v-col>
<v-col cols="12">
<div>
<b>Molecule Class:</b>
{{ moleculeClassText }}
<v-divider />
</div>
</v-col>
<v-col <v-col
v-if=" v-if="
getPropertyPalue( getPropertyPalue(
...@@ -146,6 +153,24 @@ export default { ...@@ -146,6 +153,24 @@ export default {
...mapState({ ...mapState({
dataLoaded: (state) => state.probe.probeSummary.dataLoaded, dataLoaded: (state) => state.probe.probeSummary.dataLoaded,
probeSummaryData: (state) => state.probe.probeSummary.probeSummaryData, probeSummaryData: (state) => state.probe.probeSummary.probeSummaryData,
moleculeClassText: (state) => {
const compoundData = state.probe.probeSummary.probeSummaryData
const isChemicalProbe = ObjectPropertyAccess.getPropertyPalue(
compoundData,
'_metadata.eubopen.is_probe',
false
)
const isNegativeControl = !isChemicalProbe
const allClasses = []
if (isChemicalProbe) {
allClasses.push('Chemical Probe')
}
if (isNegativeControl) {
allClasses.push('Negative Control')
}
return allClasses.join(', ')
},
}), }),
showStructureImgLaterally() { showStructureImgLaterally() {
switch (this.$vuetify.breakpoint.name) { switch (this.$vuetify.breakpoint.name) {
......
...@@ -8,7 +8,61 @@ import CalculatedProperties from '~/components/report_cards/chemical_probe/Calcu ...@@ -8,7 +8,61 @@ import CalculatedProperties from '~/components/report_cards/chemical_probe/Calcu
import EntityNames from '~/web-components-submodule/standardisation/EntityNames.js' import EntityNames from '~/web-components-submodule/standardisation/EntityNames.js'
const methods = { const methods = {
generateReportCardStructure(itemID, prefName) { generateReportCardStructure(
itemID,
prefName,
isChemicalProbe,
isNegativeControl
) {
if (isChemicalProbe) {
return {
title: prefName,
entityName: EntityNames.EubopenCompound.singularEntityName,
sections: [
{
id: 'Summary',
title: 'Summary',
component: Summary,
index: 0,
},
{
id: 'ProbeMechanism',
title: 'Probe Mechanism',
component: ProbeMechanism,
index: 1,
},
{
id: 'ControlStructuresAndUse',
title: 'Negative Controls',
component: ControlStructuresAndUse,
index: 2,
},
{
id: 'ProbeProfile',
title: 'Probe Profile',
component: ProbeProfile,
index: 3,
},
{
id: 'CalculatedProperties',
title: 'Calculated Properties',
component: CalculatedProperties,
componentParams: {
entityID: EntityNames.EubopenCompound.entityID,
},
index: 4,
},
{
id: 'CrystalStructures',
title: 'PBD Ligand Codes',
component: CompoundCrystalStructures,
index: 5,
},
],
}
}
return { return {
title: prefName, title: prefName,
entityName: EntityNames.EubopenCompound.singularEntityName, entityName: EntityNames.EubopenCompound.singularEntityName,
...@@ -37,12 +91,6 @@ const methods = { ...@@ -37,12 +91,6 @@ const methods = {
component: ProbesForThisCompound, component: ProbesForThisCompound,
index: 3, index: 3,
}, },
{
id: 'ProbeProfile',
title: 'Probe Profile',
component: ProbeProfile,
index: 4,
},
{ {
id: 'CalculatedProperties', id: 'CalculatedProperties',
title: 'Calculated Properties', title: 'Calculated Properties',
...@@ -51,13 +99,13 @@ const methods = { ...@@ -51,13 +99,13 @@ const methods = {
entityID: EntityNames.EubopenCompound.entityID, entityID: EntityNames.EubopenCompound.entityID,
}, },
index: 5, index: 4,
}, },
{ {
id: 'CrystalStructures', id: 'CrystalStructures',
title: 'PBD Ligand Codes', title: 'PBD Ligand Codes',
component: CompoundCrystalStructures, component: CompoundCrystalStructures,
index: 6, index: 5,
}, },
], ],
} }
......
...@@ -23,6 +23,7 @@ export const actions = { ...@@ -23,6 +23,7 @@ export const actions = {
'pref_name', 'pref_name',
'_metadata.compound_generated.image_file', '_metadata.compound_generated.image_file',
'_metadata.eubopen.in_vivo_use', '_metadata.eubopen.in_vivo_use',
'_metadata.eubopen.is_probe',
'molecule_structures.canonical_smiles', 'molecule_structures.canonical_smiles',
'molecule_structures.standard_inchi_key', 'molecule_structures.standard_inchi_key',
'_metadata.compound_records.src_id', '_metadata.compound_records.src_id',
......
Subproject commit 82b76ce15b04b0ace731e450c96da2749ef23719 Subproject commit ee979684c491e918e1f16e8a687fbca067323cdf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment