From 215183af2c999b528296ba2017ce61c4e690c022 Mon Sep 17 00:00:00 2001 From: Colleen Xu Date: Thu, 7 Mar 2024 14:29:38 -0800 Subject: [PATCH] Revert "Merge branch 'master' into master" This reverts commit 69fb4904cb83d2158d759ce1ec5f16281173892f, reversing changes made to fa1f36e74d03ae4a96abee0e8ddda0b6b7b58b51. --- text_mining/smartapi.yaml | 69 ++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 38 deletions(-) diff --git a/text_mining/smartapi.yaml b/text_mining/smartapi.yaml index 6d82bd6c..ad7de002 100644 --- a/text_mining/smartapi.yaml +++ b/text_mining/smartapi.yaml @@ -10,14 +10,14 @@ info: query web services. termsOfService: https://biothings.io/about title: Text Mining Targeted Association API - version: '2024-03-07' + version: '2023-08-17' x-translator: infores: "infores:text-mining-provider-targeted" component: KP team: - Text Mining Provider - Service Provider - biolink-version: "4.1.6" + biolink-version: "3.5.0" servers: - description: Encrypted Production server url: https://biothings.ncats.io/text_mining_targeted_association @@ -309,10 +309,10 @@ paths: tags: - query x-bte-kgs-operations: - - "$ref": "#/components/x-bte-kgs-operations/drugbank-treats_or_applied_or_studied_to_treat-mondo" - - "$ref": "#/components/x-bte-kgs-operations/drugbank-treats_or_applied_or_studied_to_treat-mondo-rev" - - "$ref": "#/components/x-bte-kgs-operations/drugbank-treats_or_applied_or_studied_to_treat-hp" - - "$ref": "#/components/x-bte-kgs-operations/drugbank-treats_or_applied_or_studied_to_treat-hp-rev" + - "$ref": "#/components/x-bte-kgs-operations/drugbank-treats-mondo" + - "$ref": "#/components/x-bte-kgs-operations/drugbank-treats-mondo-rev" + - "$ref": "#/components/x-bte-kgs-operations/drugbank-treats-hp" + - "$ref": "#/components/x-bte-kgs-operations/drugbank-treats-hp-rev" - "$ref": "#/components/x-bte-kgs-operations/drugbank-positively_regulates-uniprotkb" - "$ref": "#/components/x-bte-kgs-operations/drugbank-positively_regulates-uniprotkb-rev" - "$ref": "#/components/x-bte-kgs-operations/drugbank-negatively_regulates-uniprotkb" @@ -605,14 +605,15 @@ components: ## - for reverse operations, some edge attributes may seem odd (reversed subj/obj) ## - don't use subject.type/object.type in q, that came from SRI ID resolver and differs a lot between IDs of same namespace ## - use heuristics to specify input / output type. BTE will handle any discrepancies w/ SRI ID resolver... + ## - DRUGBANK :SmallMolecule ## - MONDO: Disease ## - HP: PhenotypicFeaure ## - UniProtKB: Gene ## - currently, BTE handles prefix (MONDO / HP keep their prefixes, DRUGBANK / UniProtKB does not). ## in the future, could edit parser + queries to handle prefixes ## - joinSafe is only needed if the delimiter isn't a comma - drugbank-treats_or_applied_or_studied_to_treat-mondo: - ## https://biothings.ncats.io/text_mining_targeted_association/query?q=_exists_:subject.DRUGBANK AND association.edge_label:treats_or_applied_or_studied_to_treat AND _exists_:object.MONDO + drugbank-treats-mondo: + ## https://biothings.ncats.io/text_mining_targeted_association/query?q=_exists_:subject.DRUGBANK AND association.edge_label:treats AND _exists_:object.MONDO ## I find all records (249143) use object.type:Disease - supportBatch: true useTemplating: true ## flag to say templating is being used below @@ -620,11 +621,9 @@ components: - id: DRUGBANK semantic: SmallMolecule requestBody: - body: >- - { - "q": [ {{ queryInputs | wrap( '["' , '","treats_or_applied_or_studied_to_treat"]') }} ], - "scopes": ["subject.DRUGBANK", "association.edge_label"] - } + body: + q: "{{ queryInputs }}" + scopes: subject.DRUGBANK parameters: fields: object.MONDO,association.edge_attributes,association.sources size: 1000 @@ -632,14 +631,14 @@ components: outputs: - id: MONDO semantic: Disease - predicate: treats_or_applied_or_studied_to_treat + predicate: treats response_mapping: "$ref": "#/components/x-bte-response-mapping/mondo-object" ## Examples: ## - DRUGBANK:DB00537 (Ciprofloxacin) -> MONDO:0024314 (parasitemia) ## - DRUGBANK:DB00390 (Digoxin) -> MONDO:0000468 (third-degree atrioventricular block) - drugbank-treats_or_applied_or_studied_to_treat-mondo-rev: - ## https://biothings.ncats.io/text_mining_targeted_association/query?q=_exists_:subject.DRUGBANK AND association.edge_label:treats_or_applied_or_studied_to_treat AND _exists_:object.MONDO + drugbank-treats-mondo-rev: + ## https://biothings.ncats.io/text_mining_targeted_association/query?q=_exists_:subject.DRUGBANK AND association.edge_label:treats AND _exists_:object.MONDO ## Not going to specify subject.type since DRUGBANK IDs were mapped to SmallMolecule, NamedThing mostly (a little ChemicalEntity, MolecularMixture) - supportBatch: true useTemplating: true ## flag to say templating is being used below @@ -647,11 +646,9 @@ components: - id: MONDO semantic: Disease requestBody: - body: >- - { - "q": [ {{ queryInputs | wrap( '["' , '","treats_or_applied_or_studied_to_treat"]') }} ], - "scopes": ["object.MONDO", "association.edge_label"] - } + body: + q: "{{ queryInputs }}" + scopes: object.MONDO parameters: fields: subject.DRUGBANK,association.edge_attributes,association.sources size: 1000 @@ -659,14 +656,14 @@ components: outputs: - id: DRUGBANK semantic: SmallMolecule - predicate: subject_of_treatment_application_or_study_for_treatment_by + predicate: treated_by response_mapping: "$ref": "#/components/x-bte-response-mapping/drugbank-subject" ## Examples: ## - MONDO:0024314 (parasitemia) -> DRUGBANK:DB00537 (Ciprofloxacin) ## - MONDO:0000468 (third-degree atrioventricular block) -> DRUGBANK:DB00390 (Digoxin) - drugbank-treats_or_applied_or_studied_to_treat-hp: - ## https://biothings.ncats.io/text_mining_targeted_association/query?q=_exists_:subject.DRUGBANK AND association.edge_label:treats_or_applied_or_studied_to_treat AND _exists_:object.HP + drugbank-treats-hp: + ## https://biothings.ncats.io/text_mining_targeted_association/query?q=_exists_:subject.DRUGBANK AND association.edge_label:treats AND _exists_:object.HP ## I find only 5987 records (out of 18037) have object.type:PhenotypicFeature...most are Disease (12050) - supportBatch: true useTemplating: true ## flag to say templating is being used below @@ -674,11 +671,9 @@ components: - id: DRUGBANK semantic: SmallMolecule requestBody: - body: >- - { - "q": [ {{ queryInputs | wrap( '["' , '","treats_or_applied_or_studied_to_treat"]') }} ], - "scopes": ["subject.DRUGBANK", "association.edge_label"] - } + body: + q: "{{ queryInputs }}" + scopes: subject.DRUGBANK parameters: fields: object.HP,association.edge_attributes,association.sources size: 1000 @@ -686,14 +681,14 @@ components: outputs: - id: HP semantic: PhenotypicFeature - predicate: treats_or_applied_or_studied_to_treat + predicate: treats response_mapping: "$ref": "#/components/x-bte-response-mapping/hp-object" ## Examples: ## - DRUGBANK:DB00202 (Succinylcholine) -> HP:0002153 (Hyperkalemia) ## - DRUGBANK:DB00829 (Diazepam) -> HP:0020219 (Motor seizure) - drugbank-treats_or_applied_or_studied_to_treat-hp-rev: - ## https://biothings.ncats.io/text_mining_targeted_association/query?q=_exists_:subject.DRUGBANK AND association.edge_label:treats_or_applied_or_studied_to_treat AND _exists_:object.HP + drugbank-treats-hp-rev: + ## https://biothings.ncats.io/text_mining_targeted_association/query?q=_exists_:subject.DRUGBANK AND association.edge_label:treats AND _exists_:object.HP ## Not going to specify subject.type since DRUGBANK IDs were mapped to SmallMolecule, NamedThing mostly (a little ChemicalEntity, MolecularMixture) - supportBatch: true useTemplating: true ## flag to say templating is being used below @@ -701,11 +696,9 @@ components: - id: HP semantic: PhenotypicFeature requestBody: - body: >- - { - "q": [ {{ queryInputs | wrap( '["' , '","treats_or_applied_or_studied_to_treat"]') }} ], - "scopes": ["object.HP", "association.edge_label"] - } + body: + q: "{{ queryInputs }}" + scopes: object.HP parameters: fields: subject.DRUGBANK,association.edge_attributes,association.sources size: 1000 @@ -713,7 +706,7 @@ components: outputs: - id: DRUGBANK semantic: SmallMolecule - predicate: subject_of_treatment_application_or_study_for_treatment_by + predicate: treated_by response_mapping: "$ref": "#/components/x-bte-response-mapping/drugbank-subject" ## Examples: