From 1cafda1211eb34e9e804dc82ef2fcf96ee710b00 Mon Sep 17 00:00:00 2001 From: Mitch Miller Date: Tue, 21 May 2024 21:33:33 -0400 Subject: [PATCH] changed config of example module to allow it to start up independently --- gsrs-module-substance-example/pom.xml | 28 + .../src/main/resources/application.conf | 2 +- .../resources/substances-core-example.conf | 958 ++++++++++++++++++ 3 files changed, 987 insertions(+), 1 deletion(-) create mode 100644 gsrs-module-substance-example/src/main/resources/substances-core-example.conf diff --git a/gsrs-module-substance-example/pom.xml b/gsrs-module-substance-example/pom.xml index 73384fe10..dce49b1fe 100644 --- a/gsrs-module-substance-example/pom.xml +++ b/gsrs-module-substance-example/pom.xml @@ -157,6 +157,34 @@ gsrs-core-entities ${gsrs.version} + + gov.nih.ncats + gsrs-module-substances-data-exchange + ${gsrs.substance.version} + + + org.apache.logging.log4j + log4j + + + org.apache.logging.log4j + log4j-api + + + org.apache.logging.log4j + log4j-slf4j-impl + + + org.apache.logging.log4j + log4j-to-slf4j + + + log4j + log4j + + + + org.mockito mockito-junit-jupiter diff --git a/gsrs-module-substance-example/src/main/resources/application.conf b/gsrs-module-substance-example/src/main/resources/application.conf index 478c572db..60aa21679 100644 --- a/gsrs-module-substance-example/src/main/resources/application.conf +++ b/gsrs-module-substance-example/src/main/resources/application.conf @@ -1,4 +1,4 @@ -include "substances-core.conf" +include "substances-core-example.conf" include "gsrs-h2-local.conf" diff --git a/gsrs-module-substance-example/src/main/resources/substances-core-example.conf b/gsrs-module-substance-example/src/main/resources/substances-core-example.conf new file mode 100644 index 000000000..b9e43e97a --- /dev/null +++ b/gsrs-module-substance-example/src/main/resources/substances-core-example.conf @@ -0,0 +1,958 @@ +include "gsrs-core.conf" +spring.jackson.deserialization.fail-on-unknown-properties=false +springfox.documentation.enabled=false + +spring.main.allow-circular-references=true +spring.mvc.pathmatch.matching-strategy=ANT_PATH_MATCHER + +spring.servlet.multipart.max-file-size=100MB +spring.servlet.multipart.max-request-size=100MB +#Disable Eureka Client by Default - change to true to turn eureka client on +#if no eureka server is found and client is enabled it will spam the console with errors every few seconds as it polls. +eureka.client.enabled= false + +#Allows deep analysis of fields to do suggestions + +ix.index.deepfields = ["ix.ginas.models.v1.Substance"] +ix.index.deepfieldsraw = "ix.ginas.models.v1.Substance" + +# When an unspecified search happens, promote all +# exact matches that match specific fields over +# the rest of the matches. In other words, +# you can prioritize exact matches of "NAME" +# over exact matches of other fields + +ix.core.exactsearchfields=[ + { + "class":"ix.ginas.models.v1.Substance", + "fields":[ + "root_names_name", + "root_approvalID", + "root_codes_CAS", + "root_names_stdName", + "root_uuid", + "root_structure_hash", + "root_structure_formula", + "root_structure_inchikey", + "root_moieties_structure_inchikey", + "root_structure_properties_term", + "root_moieties_properties_term", + "root_codes_BDNUM" + ] + } +] + + +gsrs.field-name-decorator.substances={ + "root_approvalID" = "Approval ID", + "root_approved" = "Record Approved", + "root_approvedBy" = "Record Approved By", + "root_codes_comments" = "Code Comments", + "root_codes_createdBy" = "Code Created By", + "root_codes_lastEditedBy" = "Code Last Edited By", + "root_codes_code" = "Code Literal", + "root_codes_codeSystem" = "Code System", + "root_codes_type" = "Code Type", + "root_codes_url" = "Code URL", + "root_names_name" = "Any Name", + "root_uuid" = "Substance UUID", + "root_structure_inchikey" = "InChIKey", + "root_structure_properties_term" = "Structure Property", + "root_structure_properties" = "Structure Property", + "root_moieties_properties_term" = "Moiety Structure Property", + "root_moieties_properties" = "Moiety Structure Property", + "root_structure_properties_STEREO_INSENSITIVE_HASH" = "Structure Insensitive Hash", + "root_structure_properties_EXACT_HASH" = "Structure Exact Hash", + "root_moieties_properties_STEREO_INSENSITIVE_HASH" = "Moiety Structure Insensitive Hash", + "root_moieties_properties_EXACT_HASH" = "Moiety Structure Exact Hash", + "root_names_stdName" = "Standardized Name", + "root_Display Name"="Display Name", + "root_names_languages_GInAS Language"="Language Code", + "root_mixture_components_substance_approvalID" = "Mixture Component ApprovalID", + "root_mixture_components_substance_refPname" = "Mixture Component Name", + "root_mixture_components_type" = "Mixture Component Type", + "root_moieties_structure_stereoChemistry" = "Moeity Stereochemistry", + "root_moieties_structure_createdBy" = "Moiety Created By", + "root_moieties_structure_formula" = "Moiety Formula", + "root_moieties_structure_atropisomerism" = "Moiety Has Atropisomerism", + "root_moieties_structure_lastEditedBy" = "Moiety Last Edited By", + "root_moieties_structure_properties_LyChI_L1" = "Moiety LyChI Level 1", + "root_moieties_structure_properties_LyChI_L2" = "Moiety LyChI Level 2", + "root_moieties_structure_properties_LyChI_L3" = "Moiety LyChI Level 3", + "root_moieties_structure_properties_LyChI_L4" = "Moiety LyChI Level 4", + "root_moieties_structure_opticalActivity" = "Moiety Optical Activity", + "root_moieties_structure_stereoComments" = "Moiety Stereo Comments", + "root_structure_formula" = "Mol Formua", + "root_polymer_monomers_amount_nonNumericValue" = "Monomer Amount Non-Numeric Value", + "root_polymer_monomers_amount_type" = "Monomer Amount Type", + "root_polymer_monomers_amount_units" = "Monomer Amount Units", + "root_polymer_monomers_monomerSubstance_approvalID" = "Monomer Approval ID", + "root_polymer_monomers_defining" = "Monomer Defining", + "root_polymer_monomers_monomerSubstance_refPname" = "Monomer Substance Name", + "root_polymer_monomers_type" = "Monomer Type", + "root_names_createdBy" = "Name Created By", + "root_names_domains_GInAS Domain"="Name Domain", + "root_names_lastEditedBy" = "Name Last Edited By", + "root_names_type" = "Name Type Code", + "root_names_nameOrgs_nameOrg" = "Naming Organization", + "root_notes_note" = "Note", + "root_notes_createdBy" = "Note Created By", + "root_notes_lastEditedBy" = "Note Last Edited By", + "root_structurallyDiverse_organismAuthor" = "Organism Author", + "root_structurallyDiverse_organismFamily" = "Organism Family", + "root_structurallyDiverse_organismGenus" = "Organism Genus", + "root_structurallyDiverse_organismSpecies" = "Organism Species", + "root_polymer_classification_polymerClass" = "Polymer Class", + "root_polymer_classification_polymerGeometry" = "Polymer Geometry", + "root_polymer_classification_polymerSubclass_GInAS Subclass"="Polymer Subclass", + "root_properties_createdBy" = "Property Created By", + "root_properties_lastEditedBy" = "Property Last Edited By", + "root_protein_glycosylation_glycosylationType" = "Protein Glycosylation Type", + "root_protein_subunits_sequence" = "Protein Sequence", + "root_protein_sequenceType" = "Protein Sequence Type", + "root_protein_subunits_createdBy" = "Protein Subunit Created By", + "root_protein_subunits_lastEditedBy" = "Protein Subunit Last Edited By", + "root_createdBy" = "Record Created By", + "root_definitionLevel" = "Record Definition Level", + "root_definitionType" = "Record Definition Type", + "root_lastEditedBy" = "Record Last Edited By", + "root_status" = "Record Status", + "root_tags_GInAS Tag"="Record Tag", + "root_version" = "Record Version", + "root_references_tags_GInAS Document Tag" = "Reference Collection", + "root_references_createdBy" = "Reference Created By", + "root_references_id" = "Reference ID", + "root_references_lastEditedBy" = "Reference Last Edited By", + "root_references_citation" = "Reference Text / Citation", + "root_references_docType" = "Reference Type", + "root_references_url" = "Reference URL", + "root_relationships_relatedSubstance_approvalID" = "Related Substance Approval ID", + "root_relationships_relatedSubstance_refPname" = "Related Substance Name", + "root_relationships_comments" = "Relationship Comments", + "root_relationships_createdBy" = "Relationship Created By", + "root_relationships_interactionType" = "Relationship Interaction Type", + "root_relationships_lastEditedBy" = "Relationship Last Edited By", + "root_relationships_qualification" = "Relationship Qualification", + "root_relationships_type" = "Relationship Type", + "root_structurallyDiverse_sourceMaterialClass" = "Source Material Class", + "root_structurallyDiverse_sourceMaterialType" = "Source Material Type", + "root_polymer_structuralUnits_amount_nonNumericValue" = "SRU Amount Non-Numeric Value", + "root_polymer_structuralUnits_amount_type" = "SRU Amount Type", + "root_polymer_structuralUnits_amount_units" = "SRU Amount Units", + "root_polymer_structuralUnits_label" = "SRU Label", + "root_polymer_structuralUnits_type" = "SRU Type", + "root_SubstanceStereochemistry" = "Stereochemistry Type", + "root_protein_modifications_structuralModifications_molecularFragment_approvalID" = "Structural Modification Approval ID", + "root_protein_modifications_structuralModifications_extent" = "Structural Modification Extent", + "root_protein_modifications_structuralModifications_extentAmount_nonNumericValue" = "Structural Modification Extent Amount Non-numeric Value", + "root_protein_modifications_structuralModifications_extentAmount_type" = "Structural Modification Extent Amount Type", + "root_protein_modifications_structuralModifications_extentAmount_units" = "Structural Modification Extent Amount Units", + "root_protein_modifications_structuralModifications_residueModified" = "Structural Modification Residue", + "root_protein_modifications_structuralModifications_molecularFragment_refPname" = "Structural Modification Substance Name", + "root_protein_modifications_structuralModifications_structuralModificationType" = "Structural Modification Type", + "root_structurallyDiverse_parentSubstance_approvalID" = "St. Div. Parent Approval ID", + "root_structurallyDiverse_parentSubstance_refPname" = "St. Div. Parent Substance Name", + "root_structurallyDiverse_hybridSpeciesPaternalOrganism_approvalID" = "St. Div. Hybrid Parent (p) Approval ID", + "root_structurallyDiverse_hybridSpeciesPaternalOrganism_refPname" = "St. Div. Hybrid Parent (p) Substance Name", + "root_structurallyDiverse_hybridSpeciesMaternalOrganism_approvalID" = "St. Div. Hybrid Parent (m) Approval ID", + "root_structurallyDiverse_hybridSpeciesMaternalOrganism_refPname" = "St. Div. Hybrid Parent (m) Substance Name", + "root_structurallyDiverse_part_Parts" = "Structurally Diverse Part", + "root_moieties_structure_properties_text" = "Structure Created By", + "root_structure_createdBy" = "Structure Created By", + "root_structure_atropisomerism" = "Structure Has Atropisomerism", + "root_structure_lastEditedBy" = "Structure Last Edited By", + "root_structure_properties_LyChI_L1" = "Structure LyChI Level 1", + "root_structure_properties_LyChI_L2" = "Structure LyChI Level 2", + "root_structure_properties_LyChI_L3" = "Structure LyChI Level 3", + "root_structure_properties_LyChI_L4" = "Structure LyChI Level 4", + "root_structure_opticalActivity" = "Structure Optical Activity", + "root_structure_stereoComments" = "Structure Stereo Comments", + "root_substanceClass" = "Substance Class", + "root_specifiedSubstance_constituents_substance_refPname" = "G1 Specified Substance Constituent Name" +} + + +ix.structure{ + base = ${ix.home}/structure +} +ix.sequence{ + base = ${ix.home}/sequence +} +gsrs.rabbitmq.enabled = false + + +#server.servlet.session.cookie.name= "ix.session" + +ix.core.structureIndex.atomLimit = 240 + +ix.structure-hasher = "ix.core.chem.InchiStructureHasher" +ix.structure-standardizer = "ix.core.chem.InchiStandardizer" + + +ix.json.typeIdResolvers = ["ix", "gsrs.module.substance"] + + +substance.hierarchyFinders.recipes=[ + { + "relationship" = "ACTIVE MOIETY", + #"renameChildLambda" = """ (p,c)->"HAS ACTIVE MOIETY:\"" + p.getName() + "\"" """ + "renameChildSpel" = "'HAS ACTIVE MOIETY:\"'+parent.getName() + '\"'" + }, + { + "relationship" = "SALT/SOLVATE->PARENT", + "invertible" = true, + "renameChildTo" = "IS SALT/SOLVATE OF" + }, + { + "relationship" = "SUB_CONCEPT->SUBSTANCE", + "invertible" = true, + "renameChildTo" = "IS SUBCONCEPT OF" + }, + +] + +gsrs.standardizers.substances = { + "name" = { + "standardizerClass" = "gsrs.module.substance.standardizer.HtmlNameStandardizer" + }, + "stdname" = { + "standardizerClass" = "gsrs.module.substance.standardizer.HtmlNameStandardizer" + } +} + +gsrs.validators.substances = [ + # public Class validatorClass; + # public Class substanceClass; + # public Substance.SubstanceDefinitionType type; + + { + "validatorClass" = "ix.ginas.utils.validation.validators.IgnoreValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "configClass" = "SubstanceValidatorConfig" + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.NullCheckValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.AutoGenerateUuidIfNeeded", + "newObjClass" = "ix.ginas.models.v1.Substance", + }, + { + #validates that any structural modifications are effectively non-null + "validatorClass" = "ix.ginas.utils.validation.validators.StructuralModificationsValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.SubstanceStatusValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.RemovePublicIndReferences", + "newObjClass" = "ix.ginas.models.v1.Substance", + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.NamesValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "type" = "PRIMARY" + "configClass" = "SubstanceValidatorConfig", + "parameters"= { + "caseSearchType": "Explicit" + } + }, + + { + "validatorClass" = "ix.ginas.utils.validation.validators.PrimaryRelationshipsValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "type" = "PRIMARY" + "configClass" = "SubstanceValidatorConfig" + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.NotesValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "type" = "PRIMARY" + "configClass" = "SubstanceValidatorConfig" + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.PrimaryDefinitionValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "type" = "PRIMARY" + "configClass" = "SubstanceValidatorConfig" + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.AlternateDefinitionValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "type" = "ALTERNATIVE" + "configClass" = "SubstanceValidatorConfig" + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.ChemicalValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "substanceClass" = "chemical", + #September 2020: additional parameter 'allow0AtomStructures' when true -> user can register blank structures; false -> no blank structures + "parameters"= {"allow0AtomStructures":false, "allowV3000Molfiles": false } + "configClass" = "SubstanceValidatorConfig" + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.MixtureValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "substanceClass" = "mixture" + "configClass" = "SubstanceValidatorConfig" + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.NucleicAcidValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "substanceClass" = "nucleicAcid", + "configClass" = "SubstanceValidatorConfig" + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.PolymerValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "substanceClass" = "polymer" + "configClass" = "SubstanceValidatorConfig" + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.ProteinValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "substanceClass" = "protein" + "configClass" = "SubstanceValidatorConfig" + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.StructurallyDiverseValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "substanceClass" = "structurallyDiverse" + "configClass" = "SubstanceValidatorConfig" + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.SSSG1Validator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "substanceClass" = "specifiedSubstanceG1", + "configClass" = "SubstanceValidatorConfig" + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.UnknownSubstanceClassValidator", + "newObjClass" = "ix.ginas.models.v1.Substance" + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.NewSubstanceNonBatchLoadValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.UpdateSubstanceNonBatchLoaderValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.PublicDomainRefValidator", + "newObjClass" = "ix.ginas.models.v1.Substance" + }, + { + "validatorClass" = "ix.ginas.utils.validation.validators.DefinitionalHashValidator", + "newObjClass" = "ix.ginas.models.v1.Substance" + }, + + # Added 9 November 2020 MAM + #make sure than a public substance has at least one public definitional reference + { + "validatorClass" = "ix.ginas.utils.validation.validators.DefinitionalReferenceValidator", + "newObjClass" = "ix.ginas.models.v1.Substance" + }, + # Validator for Relationship modifications (restrict to admins) + { + "validatorClass" = "ix.ginas.utils.validation.validators.RelationshipModificationValidator", + "newObjClass" = "ix.ginas.models.v1.Substance" + }, + #Make sure each property has a name + { + "validatorClass" = "ix.ginas.utils.validation.validators.PropertyValidator", + "newObjClass" = "ix.ginas.models.v1.Substance" + }, + + #check the mol files of chemical substances and throw errors if there are SUP s-groups. + #to remove this check comment out or delete this statement. + { + "validatorClass" = "ix.ginas.utils.validation.validators.SuperatomValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "substanceClass" = "chemical", + "configClass" = "SubstanceValidatorConfig" + } + +# #Standardize Names; Listed here for reference. Copy and paste into your application.conf and uncomment. +# { +# "validatorClass" = "ix.ginas.utils.validation.validators.StandardNameValidator", +# "newObjClass" = "ix.ginas.models.v1.Substance", +# "configClass" = "SubstanceValidatorConfig", +# "parameters"= { +# "behaviorOnInvalidStdName": "warn" +# } +# } + +] + +############################################## +# THIS IS IMPORTANT, ADDITION OF VALIDATORS! +############################################## + + +#gsrs.substance.validators +gsrs.validators.substances += { + "validatorClass" = "ix.ginas.utils.validation.validators.CodeFormatValidator", + "newObjClass" = "ix.ginas.models.v1.Substance" + } + +#TODO katzelda Feb 2021: remove for now +#Check that individual moieties of a multi-moiety chemical are registered separately +gsrs.validators.substances += { + "validatorClass" = "ix.ginas.utils.validation.validators.SaltValidator", + "newObjClass" = "ix.ginas.models.v1.ChemicalSubstance" + } +#check for uniqueness of several classes of substance based on definitional hashes +gsrs.validators.substances += { + "validatorClass" = "ix.ginas.utils.validation.validators.SubstanceUniquenessValidator", + "newObjClass" = "ix.ginas.models.v1.Substance" + } + +# add check for CAS RNs +gsrs.validators.substances += { + "validatorClass" = "ix.ginas.utils.validation.validators.CASCodeValidator", + "newObjClass" = "ix.ginas.models.v1.Substance" + } + + + +spring.application.name=substance + +#logging.level.org.springframework.web=DEBUG + +server.servlet-path=/loop-service + +server.use-forward-headers=true + +ix.api.registeredfunctions =${ix.api.registeredfunctions}[ + { + "class":"ix.core.util.pojopointer.extensions.InChIRegisteredFunction" + }, + { + "class":"ix.core.util.pojopointer.extensions.InChIFullRegisteredFunction" + } +] +substance.renderer.style="CONF" +substance.renderer.configPath="substances-default-renderer.json" + +server.tomcat.relaxed-path-chars="<,>,[,\\,],^,`,{,|,}" + + +ix.gsrs.delimitedreports.inchikeysforambiguousstereo=true +#List of ExportFactory classes that can export Substances +#the list of classes is ordered by priority +#if more than one Exporter supports the same file extension, +#the class in the list that supports it fist wins. + +ix.ginas.export.factories.substances = [ + #"gsrs.module.substance.ExtraColumnsSpreadsheetExporterFactory", + #"gsrs.module.substance.exporters.SdfExporterFactory", + "gsrs.module.substance.exporters.DefaultSubstanceSpreadsheetExporterFactory", + "gsrs.module.substance.exporters.JsonExporterFactory", + #"ix.ginas.exporters.FDANameExporterFactory", + #"ix.ginas.exporters.FDACodeExporterFactory", +# "ix.ginas.exporters.SPLValidatorXMLExporterFactory", + # "ix.ginas.exporters.SRSLegacyDictionaryExporterFactory" + +] + +ix.ginas.export.exporterfactories.substances = [ + { + "exporterFactoryClass" : "gsrs.module.substance.exporters.SdfExporterFactory", + "parameters":{ + "approvalIDName": "UNII" + } + } +] + +substance.definitional-elements.implementations =[ +{ +"implementationClass" : "gsrs.module.substance.definitional.ChemicalSubstanceDefinitionalElementImpl" +} +{ +"implementationClass" : "gsrs.module.substance.definitional.MixtureDefinitionalElementImpl" +}, +{ +"implementationClass" : "gsrs.module.substance.definitional.ModificationsDefintionalElementImpl" +}, +{ +"implementationClass" : "gsrs.module.substance.definitional.NonSubstanceConceptDefintionalElementImplementation" +}, +{ +"implementationClass" : "gsrs.module.substance.definitional.NucleicAcidDefinitionalElementImpl" +}, +{ +"implementationClass" : "gsrs.module.substance.definitional.PolymerDefinitionalElementImpl" +}, +{ +"implementationClass" : "gsrs.module.substance.definitional.ProteinSubstanceDefinitionalElementImpl" +}, +{ +"implementationClass" : "gsrs.module.substance.definitional.SSG1DefinitionalElementImpl" +}, +{ +"implementationClass" : "gsrs.module.substance.definitional.StructurallyDiverseDefinitionalElementImpl" +} +] + +gsrs.resolvers.implementations =[ + +{ +"resolverClass" : "ix.ncats.resolvers.OpsinResolver" +} +, +{ +"resolverClass" : "ix.ncats.resolvers.NCIStructureResolver" +}, +{ +"resolverClass" : "ix.ncats.resolvers.PubChemService" +} +] + +gsrs.entityProcessors=[ +{ +"entityClassName" = "ix.ginas.models.v1.Substance", +"processor" = "gsrs.module.substance.processors.SubstanceProcessor" +}, +#{ +#"entityClassName" = "ix.ginas.models.v1.Substance", +#"processor" = "gsrs.module.substance.processors.ChemicalStructurePropertiesProcessor" +#}, +{ +"entityClassName" = "ix.ginas.models.v1.Substance", +"processor" = "gsrs.module.substance.processors.PublicTagFlagger" +}, +{ +"entityClassName" = "ix.ginas.models.v1.Reference", +"processor" = "gsrs.module.substance.processors.ReferenceProcessor" +}, +{ +"entityClassName" = "ix.ginas.models.v1.Substance", +"processor" = "gsrs.module.substance.processors.RelationshipProcessor" +}, + +#{ +# "entityClassName" = "ix.ginas.models.v1.Substance", +# "processor" = "gsrs.module.substance.processors.ApprovalIdProcessor" +#}, +{ + "entityClassName" = "ix.ginas.models.v1.Substance", + "processor" = "gsrs.module.substance.processors.GroupProcessor" +} +] + + +gsrs.scheduled-tasks.list=[ + { + "scheduledTaskClass" : "gsrs.module.substance.tasks.DatabaseIndexSyncTaskInitializer", + "parameters" : { + "autorun": false, + "entityString" : "Code,ControlledVocabulary,Name,Reference,Substance" + } + }, + { + "scheduledTaskClass" : "gsrs.module.substance.tasks.ReindexTaskInitializer", + "parameters" : { + "autorun": false + } + }, + { + "scheduledTaskClass" : "gsrs.module.substance.tasks.StructureRecalcTaskInitializer", + "parameters" : { + "autorun": false + } + }, + { + "scheduledTaskClass" : "gsrs.module.substance.tasks.RebackupTaskInitializer", + "parameters" : { + "autorun": false, + "description" : "Re-backup all Substance entities", + "repositoryClass" : "gsrs.module.substance.repository.SubstanceRepository" + } + }, + { + "scheduledTaskClass" : "gsrs.module.substance.tasks.ChronicStackDumper", + "parameters" : { + "autorun": false, + "dateFormat" : "yyyy.MMMM.dd hh:mm:ss a", #any valid Java 8 DateTimeFormatter + "cron":"0 0/3 * * * ?", #every 3 mins + "outputPath" : "logs/all-running-stacktraces.log" + } + }, + { + "scheduledTaskClass" : "gsrs.module.substance.tasks.DataRecorder" + "parameters" : { + "autorun": false, + "dateFormat" : "yyyy.MMMM.dd hh:mm:ss a", #any valid Java 8 DateTimeFormatter + "cron":"0/10 * * * * ?", #every 10 seconds + "outputPath" : "logs/datarecorder.log" + } + }, + { + "scheduledTaskClass" : "gsrs.dataexchange.tasks.ImportMetadataReindexTask", + "parameters": { + "autorun": false + } + }, + { + #fixes + "scheduledTaskClass" : "gsrs.module.substance.tasks.SubstanceRefTaskInitializer", + "parameters" : { + "autorun": false, + "refUuidCodeSystem" :"UUID Code", + "reportFilePath" :"logs/substance_reference_report.txt", + "refApprovalIdCodeSystem" : "FDA UNII" + } + }, +# { +# "scheduledTaskClass" : "gsrs.dataexchange.tasks.CalculateMatchablesScheduledTask", +# "parameters" : { +# "autorun": false, +# "threadCount": 5 # Use max 5 threads, if null or <1 this will use all threads available +# } +# }, + { + "scheduledTaskClass" : "gsrs.tasks.CalculateStagingAreaMatchablesScheduledTask", + "parameters" : { + "autorun": false, + "threadCount": 5 # Use max 5 threads, if null or <1 this will use all threads available + } + } +] + + +# turn on polymer, mixture and modifcation searches for structure searches +# by default +ix.ginas.structure.search.includePolymers=true +ix.ginas.structure.search.includeModifications=true +ix.ginas.structure.search.includeMixtures=true + + + + + +# What does this do? +gsrs.indexers.includeDefaultIndexers = false + +gsrs.indexers.list=[ +{ +"indexer" = "gsrs.module.substance.indexers.DeprecatedIndexValueMaker", +"class" = "ix.ginas.models.v1.Substance", +}, +# This should be unnecessary right now. May be used later +#{ +# "indexer" = "gsrs.module.substance.indexers.ChemicalSubstanceStructureHashIndexValueMaker", +#}, +{ +"indexer" = "gsrs.module.substance.indexers.InchiKeyIndexValueMaker", +}, +{ +"indexer" = "gsrs.module.substance.indexers.SubstanceFacetStatusIndexValueMaker", +}, +{ +"indexer" = "gsrs.module.substance.indexers.SubstanceDefinitionalHashIndexer", +}, +{ +"indexer" = "gsrs.module.substance.indexers.RecordAccessIndexValueMaker", +}, +{ +"indexer" = "gsrs.module.substance.indexers.MolecularWeightPropertyIndexValueMaker", +}, +{ +"indexer" = "gsrs.module.substance.indexers.MoietyTypeIndexValueMaker", +}, +{ +"indexer" = "gsrs.module.substance.indexers.MixtureStructureHashIndexValueMaker" +}, +{ +"indexer" = "gsrs.module.substance.indexers.ATCIndexValueMaker", +}, +{ +"indexer" = "gsrs.module.substance.indexers.BracketTermIndexValueMaker", +}, +{ +"indexer" = "gsrs.module.substance.indexers.SDGIndexValueMaker", +}, +{ +"indexer" = "gsrs.module.substance.indexers.SubstanceBasicsIndexValueMaker", +}, +{ +"indexer" = "gsrs.module.substance.indexers.UserSavedListIndexValueMaker", +}, + {"indexer" = "gsrs.imports.indexers.MetadataSourceIndexValueMaker"}, + {"indexer" = "gsrs.imports.indexers.RawDataImportMetadataIndexValueMaker"}, + {"indexer" = "gsrs.imports.indexers.MetadataMatchCountIndexValueMaker"}, + {"indexer" = "gsrs.imports.indexers.MetadataStatusIndexValueMaker"}, + {"indexer" = "gsrs.imports.indexers.MetadataValidationIndexValueMaker"}, + {"indexer" = "gsrs.imports.indexers.ImportMetadataBasicsIndexValueMaker"} +] + +# Example report. Change the SQL and path to suit your needs +#gsrs.scheduled-tasks.list+= +# { +# "scheduledTaskClass" : "gsrs.module.substance.tasks.SQLReportScheduledTaskInitializer", +# "parameters" : { +# "autorun": true, +# "sql": "select s.uuid, dtype, s.current_version, s.created, c.code, c.code_system from ix_ginas_substance s, ix_ginas_code c where s.uuid = c.owner_uuid and c.type= 'PRIMARY'", +# "outputPath": "test_code_report_%DATE%_%TIME%.txt", +# "name": "Simple Code Report", +# "cron":"0 0/1 * * * ?", #every 1 mins +### Datasource qualifier can be specified if needed. This is typically of the form: +### "DataSource". For example, "defaultDataSource" or "productsDataSource"/ +### "dataSourceQualifier":"defaultDataSource", +# } +# } + +# Example SPL report. Change the SPL settings to suit your needs +#gsrs.scheduled-tasks.list+= +# { +# "scheduledTaskClass" : "gsrs.module.substance.tasks.SplExportInitializer", +# "parameters" : { +# "autorun": true, +# "username":"admin", +## You can set up an explicit export directory, but don't need to +## "outputPath": "tmpspl", +# "name": "SPL export", +# "cron":"0 0/10 * * * ?" #every 1 mins +# } +# } + +gsrs.search.substances.restrictDefaultToIdentifiers=true + +gsrs.validators.substances += { + "validatorClass" = "ix.ginas.utils.validation.validators.SetReferenceAccess", + "newObjClass" = "ix.ginas.models.v1.Substance", + "configClass" = "SubstanceValidatorConfig", + + "suggestedPublic": ["ACD", "ALANWOOD", "ALGAEBASE", "AMERICAN BOTANICAL COUNCIL", "ANNONBASE", +"ATC INN", "ATCC", "AUSTRALIAN PLANT NAME INDEX", "BAN", "BIOPHARMA", "BIOS", "BIOSYSTEMATIC DATABASE of WORLD DIPTERA", +"BLATTODEA SPECIES", "BOOK", "BRASSICACEAE", "BRITISH PHARMACOPOEIA", "CAS", "CATALOGUE OF LIFE CHINA", "CENTER FOR DISEASE CONTROL", "CFR", +"CHEBI", "CHEMBANK", "CHEMID", "CHEMSPIDER", "CHENOBASE", "CHINESE HERBAL MEDICINE", "CLINICAL PHARMACOLOGY", "CLINICAL_TRIALS.GOV", "CLINICALTRIALS", "CODEX Alimentarius", "COMBINED CHEMICAL DICTIONARY", "CONIFER DATABASE", "CTD_TOXICOGENOMICS", "CVM GREEN BOOK", "DAILYMED", "DOSE", "DOTHIDEOMYCETES", "DROSERACEAE DATABASE", "DRUG PRODUCT LABEL", "DRUGS@FDA", "EAFUS", "EC FLAVOURING SUBSTANCES", "ECHA (EC/EINECS)", "EMA LIST", "EMA REVIEW", "EP", "EPA", "EU CLINICAL TRIALS", "EUROPEAN PHARMACOPEIA", "EVMPD", "FACTS AND COMPARISIONS", "FADA BIVALVIA", "FDA APPROVED DRUG LABEL", "FDA GUIDANCE", "FEDERAL REGISTER", "FISHBASE", "FOOD LOVERS COMPANION", "GERANIUM TAXONOMIC INFORMATION SYSTEM", "GLOBAL BIODIVERSITY INFORMATION FACILITY", "GLOBAL COMPOSITAE CHECKLIST", "GLOMEROMYCOTA", "GREEN BOOK", "GRIN", "HANDBOOK OF FLAVOR INGREDIENTS", "HANDBOOK OF FLAVORS & FRAGRANCES", "HANDBOOK OF INORGANIC CHEMICALS", "HANDBOOK OF PHARMACEUTICAL ADDITIVES", "HANDBOOK OF PHARMACEUTICAL EXCIPIENTS", "HAWLEY CONDENSED CHEMICAL DICTIONARY", "HEALTH CANADA", "HERBAL MEDICINES", "HERBS OF COMMERCE", "HOMEOPATHIC PHARMACOPOEIA US", "HPE-KIBBE", "ICSAS", "ICTV", "ILDIS", "INCB", "INTELEOS", "INTERNATIONAL ORGANIZATION FOR PLANT INFORMATION", "INTERNATIONAL PLANT NAMES INDEX", "INVESTIGATOR BROCHURE", "ISO", "IT IS", "IUPHAR", "JA", "JAN", "JAPAN CHEMICAL SUBSTANCE DICTIONARY", "JAPANESE PHARMACOPOEIA", "JECFA", "JECFA: JOINT FAO/WHO COMMITTEE FOOD ADD", "KEGG", "KEW GARDENS (WCPS)", "KEW GARDENS FUNGI", "KNOVEL CONTENT", "LANDES MUSEUM BIOLOGIEZENTRUM", "LANGUAL", "LECYTHIDACEAE PAGES", "LEPINDEX", "LEUNG NATURAL INGREDIENTS", "LEUNGS ENCYLOPEDIA OF COMMON NATURAL INGREDIENTS 3RD ED.", "LEXI-COMP", "LIAS", "MANUFACTURER PRODUCT ", "MARTINDALE", "MATERIA MEDICA FOR CHINESE MEDICINE", "MDDR", "MEETING ABSTRACT", "MELASTOMATACEAE.NET", "MERCK INDEX", "MICROMEDEX", "MIRBASE", "MSDS", "MYCOBANK", "NCATS List", "NCBI", "NCI DRUG DICTIONARY", "NCI THESAURUS", "NCI_NDFRT", "NDA PUBLIC REVIEW", "NDF-RT", "NEW ZEALAND ORGANISMS REGISTER", "NIAID CHEMDB", "NIST WEBBOOK", "NLM", "NOMEN.EUMYCETOZOA.COM", "OMOP", "ORANGE BOOK", "ORPHAN DRUG", "ORTHOPTERA SPECIES FILE", "PARHOST", "PATENT", "PATTYS TOXICOLOGY", "PERSONAL CARE PRODUCTS COUNCIL", "PHARMACOPOEIA OF THE PEOPLE'S REPUBLIC OF CHINA", "PHARMAPROJECTS", "PLANT LIST", "PLANTS FOR A FUTURE", "PLOTKIN VACCINES", "PRODUCT PACKAGE INSERT", "RJB GERANIUM", "SAX DANGEROUS PROPERTIES", "SCALENET", "SIGMA-ALDRICH", "SITTIG HANDBOOK OF PESTICIDES", "SLOAN-KETT", "SOLANACEAE SOURCE", "SPECIALTY CHEMICALS", "SPIDCAT", "STN (SCIFINDER)", "SWEDISH SUBSTANCE LIST", "SWISS MEDIC", "SYSTEMA DIPTERORUM", "TIGR REPTILES", "TOBACCO KNOWLEDGE BASE", "TOX21", "TROPICOS", "UCSF-FDA TRANSPORTAL", "UNIPROT", "URMO", "USP", "USP DIETARY SUPPLEMENTS COMPENDIUM", "USP FOOD CHEMICALS CODEX", "USP HERBAL MEDICINES COMPENDIUM", "USP PHARMACOPOEIAL FORUM", "USP-MC", "USPNF", "VATC", +"WEBSITE", "WHO DRUG DICTIONARY", "WHO INTERNATIONAL PHARMACOPOEIA", +"WIKI", "WORLD BIODIVERSITY DATABASE", "WORLD PLANTS", "WORLD UMBELLIFER DATABASE", "WEB PAGE"], + + "alwaysPrivate" : ["ANDA", "BLA", "EU-NCA (CBG-MEB)", "IND", "INTEGRITY SERVICES", "NDA"], + "referenceCitationPatterns" : [".*[^A-Z]IND[^A-Z]*[0-9][0-9][0-9]*.*"] + + } +#removed from suggestedPublic but not yet added to alwaysPrivate: CTP and DMF + +gsrs.validators.substances += +{ + "validatorClass" = "ix.ginas.utils.validation.validators.CodesValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "configClass" = "SubstanceValidatorConfig" + +} + +gsrs.validators.substances += + { + "validatorClass" = "ix.ginas.utils.validation.validators.ChemicalUniquenessValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "configClass" = "SubstanceValidatorConfig", + "parameters"= {} +} + +#gsrs.validators.substances += +#{ +# "validatorClass" = "ix.ginas.utils.validation.validators.CodeUniquenessValidator", +# "newObjClass" = "ix.ginas.models.v1.Substance", +# "configClass" = "SubstanceValidatorConfig", +# "parameters"= {"singletonCodeSystems" =["CAS"]} +#} + +gsrs.scheduled-tasks.list+= { +"scheduledTaskClass" : "gsrs.module.substance.tasks.NameStandardizerTaskInitializer", + "parameters" : { + "nameStandardizerClassName": "gsrs.module.substance.standardizer.FDAFullNameStandardizer", + "autorun": false, + "regenerateNameValue":"[standardize me]", + "forceRecalculationOfAll": false, + "description" : "Regenerate standardized names, report on inconsistent standardized names without changing existing standardized names" + "cron":"0 0/0 0 1 * ?", #every + } +} + +gsrs.scheduled-tasks.list+= { +"scheduledTaskClass" : "gsrs.module.substance.tasks.NameStandardizerTaskInitializer", + "parameters" : { + "nameStandardizerClassName": "gsrs.module.substance.standardizer.FDAFullNameStandardizer", + "autorun": false, + "regenerateNameValue":"[standardize me]", + "forceRecalculationOfAll": true, + "disabledHistory": true, + "disabledHooks": true, + "threadCount": 5, + "description" : "Regenerate standardized names, force inconsistent standardized names to be regenerated" + "cron":"0 0/0 0 1 * ?", #every + } +} + +ix.ginas.export.settingsPresets.substances= { + "PUBLIC_DATA_ONLY": { + "owner":"admin", + "scrubberSettings": { + "removeAllLocked":true + } + }, + "ALL_DATA": { + "owner":"admin", + "scrubberSettings":null + } +} + + +gsrs.standardizers.substances = { + "name" = { + "standardizerClass" = "gsrs.module.substance.standardizer.HtmlNameStandardizer" + }, + "stdname" = { + "standardizerClass" = "gsrs.module.substance.standardizer.HtmlNameStandardizer" + } +} + +#gsrs.validators.substances += +#{ +# "validatorClass" = "ix.ginas.utils.validation.validators.CodeUniquenessValidator", +# "newObjClass" = "ix.ginas.models.v1.Substance", +# "configClass" = "SubstanceValidatorConfig", +# "parameters"= {"singletonCodeSystems" =["CAS"]} +#} + +# ix.gsrs.sdfActions={structure_and_moieties:'gsrs.module.substance.importers.StructureExtractorActionFactory', +# code_import:'gsrs.module.substance.importers.CodeExtractorActionFactory', +# common_name:'gsrs.module.substance.importers.NameExtractorActionFactory'} + +# gsrs.importAdapterFactories.substances = [] +# gsrs.importAdapterFactories.substances += { +# "importAdapterFactoryClass" = "gsrs.module.substance.importers.SDFImportAdapterFactory", +# "adapterName" = "NSRS SDF Adapter", +# "extensions" = ["sdf", "sd"], +# "parameters" = { +# "actions"=[ +# { +# "actionName" : "cas_import", +# "importActionFactoryClass" : "gsrs.module.substance.importers.importActionFactories.NSRSCustomCodeExtractorActionFactory", +# "fields" = [ +# { +# "fieldName" = "CASNumber", +# "fieldLabel" = "CAS Number", +# "fieldType" = "java.lang.String", +# "required" = true, +# "showInUi" = true +# }, +# { +# "fieldName" = "codeType", +# "fieldLabel" = "Primary or Alternative", +# "fieldType" = "java.lang.String", +# "required" = false, +# "defaultValue" = "PRIMARY", +# "showInUi" = true +# }, +# { +# "fieldName" = "url", +# "fieldLabel" = "URL", +# "fieldType" = "java.lang.String", +# "required" = false, +# "defaultValue" = "https://commonchemistry.cas.org/detail?cas_rn=", +# "showInUi" = false +# } +# ] +# } +# ] +# } +# } +# this is the length to expect the column to be +# for names after truncation +gsrs.substance.data.nameColumnLength=254 + + +# This feature allows one to filter on validation message ids or message texts to +# for example change a warning to a notice for users with a given role. +# OverrideRule(s) could look like this: +# {"regex": "W.*", "userRoles": ["Approver","Admin"], "newMessageType": "NOTICE"} +# In this sample rule, the regex determines if the messageId begins with W, implying +# a warning. +gsrs.processing-strategy = { + "defaultStrategy": "ACCEPT_APPLY_ALL", + "overrideRules": [ + # NamesValidator duplicateNameIsError + # {"regex": "W7431274", "newMessageType": "ERROR"}, + # {"regex": "W7439452", "newMessageType": "ERROR"}, + # SubstanceUniquenessValidator + {"regex": "E4562650", "userRoles": ["SuperUpdate", "SuperDataEntry"], "newMessageType": "WARNING"} + ] +} + + + + + + + + + + +# This shows how special render settings can be applied +# at a pretty deep explicit level. This is ported over largely from how +# it was done in GSRS 2.8 +# +# +# 1. Supports embedded JSON options definitions for the structure renderer +# 2. Supports naming styles for use +# 3. Supports using previously named styles and making variations of them +# +gsrs.renderers.list=[ +{ + "name" : "CLEAN", + "renderer" :{ + "preset": "USP", //Note this part + "options" : { + "PROP_KEY_DRAW_GREYSCALE" : false, + "ATOM_LABEL_FONT_FRACTION" : 0.47918, + "ATOM_LABEL_BOND_GAP_FRACTION" :1.02, + "BOND_STROKE_WIDTH_FRACTION" : 0.032, + "BOND_DOUBLE_GAP_FRACTION": 0.1995, + "BOND_STEREO_WEDGE_ANGLE" : 0.13659, + "BOND_STEREO_DASH_NUMBER" :8, + "SUBSCRIPT_Y_DISPLACEMENT_FRACTION" : 0.17, + "DRAW_WEDGE_AS_POINT" : false, + "DRAW_STEREO_WEDGE_JOIN" : true, + "DRAW_STEREO_LAST_DASH_ON_NON_SYMBOLS" : false, + "colorPalette" : { + "atomColors" : { + "C" : "FFFF0000" // red carbons (ugly) + } + } + }, + "add-shadow" : true, + "add-border" : false + } +}, +{ + "name" : "MONSTRUOUS", + "renderer" :{ + "preset": "CLEAN", //Note this part + "options" : { + "BOND_STROKE_WIDTH_FRACTION" : 0.64 + }, + "add-shadow" : false, + "add-border" : false + } +} +] + +# Here, you can specify the main renderer style to use, which can be one of the default supported cases +# or can be one of the specified cases in the list above. + +#gsrs.renderers.selected="CLEAN1" + +# for molwitch-cdk 1.0.18 and the associated changes in MolwitchLoader in this project: +gsrs.structure.chemical.molwitch.complexityCutoff=7 +gsrs.structure.chemical.molwitch.maxUndefinedStereoCenters=5