From 9751e8329f6407b73e1309fe66367ebc8e539952 Mon Sep 17 00:00:00 2001 From: Manuel Holtgrewe Date: Wed, 27 Dec 2023 11:50:37 +0100 Subject: [PATCH] feat: improve term search with full-text index (#109) (#112) --- Cargo.lock | 722 +++++++++++++- Cargo.toml | 3 + src/index.rs | 191 ++++ src/main.rs | 1 + src/server/actix_server/hpo_genes.rs | 2 + src/server/actix_server/hpo_omims.rs | 2 + src/server/actix_server/hpo_sim/term_gene.rs | 2 + src/server/actix_server/hpo_sim/term_term.rs | 2 + src/server/actix_server/hpo_terms.rs | 264 ++++-- src/server/actix_server/mod.rs | 10 +- ..._hpo_genes_gene_id_exact_no_hpo_terms.snap | 7 - ...po_genes_gene_id_exact_with_hpo_terms.snap | 18 - ...est__hpo_omims_name_contains_no_genes.snap | 7 - ...t__hpo_omims_name_contains_with_genes.snap | 7 - ...__test__hpo_omims_name_exact_no_genes.snap | 7 - ..._test__hpo_omims_name_prefix_no_genes.snap | 7 - ..._test__hpo_omims_name_suffix_no_genes.snap | 7 - ...est__hpo_terms_name_contains_no_genes.snap | 17 - ...t__hpo_terms_name_contains_with_genes.snap | 894 ------------------ ...__test__hpo_terms_name_exact_no_genes.snap | 18 +- ...test__hpo_terms_name_exact_with_genes.snap | 73 +- ...__test__hpo_terms_name_fuzzy_no_genes.snap | 33 + ...est__hpo_terms_name_fuzzy_with_genes.snap} | 75 +- ..._test__hpo_terms_name_prefix_no_genes.snap | 17 - ..._test__hpo_terms_name_suffix_no_genes.snap | 17 - ...est__hpo_terms_name_suffix_with_genes.snap | 894 ------------------ ...est__hpo_terms_term_id_exact_no_genes.snap | 8 +- ...t__hpo_terms_term_id_exact_with_genes.snap | 8 +- src/server/mod.rs | 20 +- 29 files changed, 1330 insertions(+), 2003 deletions(-) create mode 100644 src/index.rs delete mode 100644 src/server/actix_server/snapshots/viguno__server__actix_server__hpo_genes__test__hpo_genes_gene_id_exact_no_hpo_terms.snap delete mode 100644 src/server/actix_server/snapshots/viguno__server__actix_server__hpo_genes__test__hpo_genes_gene_id_exact_with_hpo_terms.snap delete mode 100644 src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_contains_no_genes.snap delete mode 100644 src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_contains_with_genes.snap delete mode 100644 src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_exact_no_genes.snap delete mode 100644 src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_prefix_no_genes.snap delete mode 100644 src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_suffix_no_genes.snap delete mode 100644 src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_contains_no_genes.snap delete mode 100644 src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_contains_with_genes.snap create mode 100644 src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_fuzzy_no_genes.snap rename src/server/actix_server/snapshots/{viguno__server__actix_server__hpo_terms__test__hpo_terms_name_prefix_with_genes.snap => viguno__server__actix_server__hpo_terms__test__hpo_terms_name_fuzzy_with_genes.snap} (91%) delete mode 100644 src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_prefix_no_genes.snap delete mode 100644 src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_suffix_no_genes.snap delete mode 100644 src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_suffix_with_genes.snap diff --git a/Cargo.lock b/Cargo.lock index d019904..83ba6c4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -49,7 +49,7 @@ dependencies = [ "mime", "percent-encoding", "pin-project-lite", - "rand", + "rand 0.8.5", "sha1", "smallvec", "tokio", @@ -233,6 +233,12 @@ dependencies = [ "alloc-no-stdlib", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + [[package]] name = "anstream" version = "0.6.5" @@ -309,6 +315,23 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "arc-swap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" + +[[package]] +name = "async-trait" +version = "0.1.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdf6721fb0140e4f897002dd086c06f6c27775df19cfe1fccb21181a48fd2c98" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.42", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -369,6 +392,26 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +[[package]] +name = "bitpacking" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8c7d2ac73c167c06af4a5f37e6e59d84148d57ccbe4480b76f0273eefea82d7" +dependencies = [ + "crunchy", +] + +[[package]] +name = "blanket" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b04ce3d2372d05d1ef4ea3fdf427da6ae3c17ca06d688a107b5344836276bc3" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "block-buffer" version = "0.10.4" @@ -399,12 +442,24 @@ dependencies = [ "alloc-stdlib", ] +[[package]] +name = "bumpalo" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" + [[package]] name = "bytemuck" version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + [[package]] name = "bytes" version = "1.5.0" @@ -441,6 +496,12 @@ dependencies = [ "libc", ] +[[package]] +name = "census" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fafee10a5dd1cffcb5cc560e0d0df8803d7355a2b12272e3557dee57314cb6e" + [[package]] name = "cexpr" version = "0.6.0" @@ -581,6 +642,16 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-channel" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c3242926edf34aec4ac3a77108ad4854bffaa2e4ddc1824124ce59231302d5" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + [[package]] name = "crossbeam-deque" version = "0.8.4" @@ -613,6 +684,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + [[package]] name = "crypto-common" version = "0.1.6" @@ -686,6 +763,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" dependencies = [ "powerfmt", + "serde", ] [[package]] @@ -732,6 +810,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + [[package]] name = "either" version = "1.9.0" @@ -782,6 +866,52 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "fastdivide" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25c7df09945d65ea8d70b3321547ed414bbc540aad5bac6883d021b970f35b04" + +[[package]] +name = "fastobo" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9de243accd087be3b3df74cf6dbb5192e5fef15363ddd16df6ba6c967fc4e92d" +dependencies = [ + "blanket", + "crossbeam-channel", + "fastobo-derive-internal", + "fastobo-syntax", + "lazy_static", + "memchr", + "num_cpus", + "ordered-float", + "smartstring", + "thiserror", +] + +[[package]] +name = "fastobo-derive-internal" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901b108f2cf5887d9c9477fb53670566621ea7b7bd82ebb3752389e0540ea69e" +dependencies = [ + "darling", + "heck", + "quote", + "syn 2.0.42", +] + +[[package]] +name = "fastobo-syntax" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f24834927e786bd7717cb3e8638297c29413d57e75accc83a18857f0266523cb" +dependencies = [ + "pest", + "pest_derive", +] + [[package]] name = "fastrand" version = "2.0.1" @@ -825,6 +955,22 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs4" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" +dependencies = [ + "rustix", + "windows-sys 0.48.0", +] + +[[package]] +name = "fuchsia-cprng" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" + [[package]] name = "futures-core" version = "0.3.29" @@ -855,6 +1001,19 @@ dependencies = [ "pin-utils", ] +[[package]] +name = "generator" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" +dependencies = [ + "cc", + "libc", + "log", + "rustversion", + "windows", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -912,6 +1071,10 @@ name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash", + "allocator-api2", +] [[package]] name = "heck" @@ -953,6 +1116,12 @@ dependencies = [ "tracing", ] +[[package]] +name = "htmlescape" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9025058dae765dee5070ec375f591e2ba14638c63feff74f13805a72e523163" + [[package]] name = "http" version = "0.2.11" @@ -1044,6 +1213,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", ] [[package]] @@ -1099,6 +1271,15 @@ dependencies = [ "libc", ] +[[package]] +name = "js-sys" +version = "0.3.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +dependencies = [ + "wasm-bindgen", +] + [[package]] name = "language-tags" version = "0.3.2" @@ -1117,6 +1298,12 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" +[[package]] +name = "levenshtein_automata" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c2cdeb66e45e9f36bfad5bbdb4d2384e70936afbee843c6f6543f0c551ebb25" + [[package]] name = "libc" version = "0.2.151" @@ -1222,6 +1409,29 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +[[package]] +name = "loom" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5" +dependencies = [ + "cfg-if", + "generator", + "pin-utils", + "scoped-tls", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "lru" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21" +dependencies = [ + "hashbrown", +] + [[package]] name = "lz4-sys" version = "1.9.4" @@ -1232,6 +1442,21 @@ dependencies = [ "libc", ] +[[package]] +name = "lz4_flex" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ea9b256699eda7b0387ffbc776dd625e28bde3918446381781245b7a50349d8" + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + [[package]] name = "matrixmultiply" version = "0.3.8" @@ -1242,12 +1467,31 @@ dependencies = [ "rawpointer", ] +[[package]] +name = "measure_time" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56220900f1a0923789ecd6bf25fbae8af3b2f1ff3e9e297fc9b6b8674dd4d852" +dependencies = [ + "instant", + "log", +] + [[package]] name = "memchr" version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +[[package]] +name = "memmap2" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.9.0" @@ -1296,6 +1540,12 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" +[[package]] +name = "murmurhash32" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9380db4c04d219ac5c51d14996bbf2c2e9a15229771b53f8671eb6c83cf44df" + [[package]] name = "nalgebra" version = "0.29.0" @@ -1308,7 +1558,7 @@ dependencies = [ "num-complex", "num-rational", "num-traits", - "rand", + "rand 0.8.5", "rand_distr", "simba", "typenum", @@ -1385,6 +1635,16 @@ dependencies = [ "libm", ] +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + [[package]] name = "number_prefix" version = "0.4.0" @@ -1406,18 +1666,45 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "oneshot" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f6640c6bda7731b1fdbab747981a0f896dd1fedaf9f4a53fa237a04a84431f4" +dependencies = [ + "loom", +] + [[package]] name = "option-ext" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "ordered-float" +version = "3.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1e1c390732d15f1d48471625cd92d154e66db2c56645e29a9cd26f4699f72dc" +dependencies = [ + "num-traits", +] + [[package]] name = "overload" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "ownedbytes" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e8a72b918ae8198abb3a18c190288123e1d442b6b9a7d709305fd194688b4b7" +dependencies = [ + "stable_deref_trait", +] + [[package]] name = "parking_lot" version = "0.12.1" @@ -1459,6 +1746,51 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "pest" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81d78524685f5ef2a3b3bd1cafbc9fcabb036253d9b1463e726a91cd16e2dfc2" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.42", +] + +[[package]] +name = "pest_meta" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6" +dependencies = [ + "once_cell", + "pest", + "sha2", +] + [[package]] name = "petgraph" version = "0.6.4" @@ -1611,6 +1943,19 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "rand" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" +dependencies = [ + "fuchsia-cprng", + "libc", + "rand_core 0.3.1", + "rdrand", + "winapi", +] + [[package]] name = "rand" version = "0.8.5" @@ -1619,7 +1964,7 @@ checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -1629,9 +1974,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +dependencies = [ + "rand_core 0.4.2", ] +[[package]] +name = "rand_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" + [[package]] name = "rand_core" version = "0.6.4" @@ -1648,7 +2008,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ "num-traits", - "rand", + "rand 0.8.5", ] [[package]] @@ -1677,6 +2037,15 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +dependencies = [ + "rand_core 0.3.1", +] + [[package]] name = "redox_syscall" version = "0.4.1" @@ -1705,8 +2074,17 @@ checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-automata", - "regex-syntax", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", ] [[package]] @@ -1717,15 +2095,30 @@ checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.8.2", ] +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + [[package]] name = "regex-syntax" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +[[package]] +name = "remove_dir_all" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +dependencies = [ + "winapi", +] + [[package]] name = "rocksdb" version = "0.21.0" @@ -1747,6 +2140,16 @@ dependencies = [ "tracing", ] +[[package]] +name = "rust-stemmers" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e46a2036019fdb888131db7a4c847a1063a7493f971ed94ea82c67eada63ca54" +dependencies = [ + "serde", + "serde_derive", +] + [[package]] name = "rustc-demangle" version = "0.1.23" @@ -1802,6 +2205,12 @@ dependencies = [ "bytemuck", ] +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scopeguard" version = "1.2.0" @@ -1905,6 +2314,17 @@ dependencies = [ "digest", ] +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "sharded-slab" version = "0.1.7" @@ -1957,6 +2377,15 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2aeaf503862c419d66959f5d7ca015337d864e9c49485d771b732e2a20453597" +[[package]] +name = "sketches-ddsketch" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68a406c1882ed7f29cd5e248c9848a80e7cb6ae0fea82346d2746f2f941c07e1" +dependencies = [ + "serde", +] + [[package]] name = "slab" version = "0.4.9" @@ -1972,6 +2401,17 @@ version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +[[package]] +name = "smartstring" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" +dependencies = [ + "autocfg", + "static_assertions", + "version_check", +] + [[package]] name = "socket2" version = "0.5.5" @@ -1982,6 +2422,18 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "statrs" version = "0.16.0" @@ -1992,7 +2444,7 @@ dependencies = [ "lazy_static", "nalgebra", "num-traits", - "rand", + "rand 0.8.5", ] [[package]] @@ -2045,12 +2497,162 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "tantivy" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6083cd777fa94271b8ce0fe4533772cb8110c3044bab048d20f70108329a1f2" +dependencies = [ + "aho-corasick", + "arc-swap", + "async-trait", + "base64", + "bitpacking", + "byteorder", + "census", + "crc32fast", + "crossbeam-channel", + "downcast-rs", + "fastdivide", + "fs4", + "htmlescape", + "itertools 0.11.0", + "levenshtein_automata", + "log", + "lru", + "lz4_flex", + "measure_time", + "memmap2", + "murmurhash32", + "num_cpus", + "once_cell", + "oneshot", + "rayon", + "regex", + "rust-stemmers", + "rustc-hash", + "serde", + "serde_json", + "sketches-ddsketch", + "smallvec", + "tantivy-bitpacker", + "tantivy-columnar", + "tantivy-common", + "tantivy-fst", + "tantivy-query-grammar", + "tantivy-stacker", + "tantivy-tokenizer-api", + "tempfile", + "thiserror", + "time", + "uuid", + "winapi", +] + +[[package]] +name = "tantivy-bitpacker" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cecb164321482301f514dd582264fa67f70da2d7eb01872ccd71e35e0d96655a" +dependencies = [ + "bitpacking", +] + +[[package]] +name = "tantivy-columnar" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d85f8019af9a78b3118c11298b36ffd21c2314bd76bbcd9d12e00124cbb7e70" +dependencies = [ + "fastdivide", + "fnv", + "itertools 0.11.0", + "serde", + "tantivy-bitpacker", + "tantivy-common", + "tantivy-sstable", + "tantivy-stacker", +] + +[[package]] +name = "tantivy-common" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af4a3a975e604a2aba6b1106a04505e1e7a025e6def477fab6e410b4126471e1" +dependencies = [ + "async-trait", + "byteorder", + "ownedbytes", + "serde", + "time", +] + +[[package]] +name = "tantivy-fst" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc3c506b1a8443a3a65352df6382a1fb6a7afe1a02e871cee0d25e2c3d5f3944" +dependencies = [ + "byteorder", + "regex-syntax 0.6.29", + "utf8-ranges", +] + +[[package]] +name = "tantivy-query-grammar" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d39c5a03100ac10c96e0c8b07538e2ab8b17da56434ab348309b31f23fada77" +dependencies = [ + "nom", +] + +[[package]] +name = "tantivy-sstable" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0c1bb43e5e8b8e05eb8009610344dbf285f06066c844032fbb3e546b3c71df" +dependencies = [ + "tantivy-common", + "tantivy-fst", + "zstd", +] + +[[package]] +name = "tantivy-stacker" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2c078595413f13f218cf6f97b23dcfd48936838f1d3d13a1016e05acd64ed6c" +dependencies = [ + "murmurhash32", + "tantivy-common", +] + +[[package]] +name = "tantivy-tokenizer-api" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "347b6fb212b26d3505d224f438e3c4b827ab8bd847fe9953ad5ac6b8f9443b66" +dependencies = [ + "serde", +] + [[package]] name = "temp_testdir" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "921f1e9c427802414907a48b21a6504ff6b3a15a1a3cf37e699590949ad9befc" +[[package]] +name = "tempdir" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" +dependencies = [ + "rand 0.4.6", + "remove_dir_all", +] + [[package]] name = "tempfile" version = "3.8.1" @@ -2228,10 +2830,14 @@ version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ + "matchers", "nu-ansi-term", + "once_cell", + "regex", "sharded-slab", "smallvec", "thread_local", + "tracing", "tracing-core", "tracing-log", ] @@ -2242,6 +2848,12 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + [[package]] name = "unicode-bidi" version = "0.3.14" @@ -2280,12 +2892,28 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf8-ranges" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcfc827f90e53a02eaef5e535ee14266c1d569214c6aa70133a624d8a3164ba" + [[package]] name = "utf8parse" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +[[package]] +name = "uuid" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +dependencies = [ + "getrandom", + "serde", +] + [[package]] name = "valuable" version = "0.1.0" @@ -2316,6 +2944,7 @@ dependencies = [ "csv", "derive_more", "env_logger", + "fastobo", "fastrand", "file_diff", "flate2", @@ -2340,7 +2969,9 @@ dependencies = [ "shellexpand", "strum", "strum_macros", + "tantivy", "temp_testdir", + "tempdir", "thiserror", "tracing", "tracing-subscriber", @@ -2352,6 +2983,70 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasm-bindgen" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.42", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.42", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" + +[[package]] +name = "web-sys" +version = "0.3.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "which" version = "4.4.2" @@ -2405,6 +3100,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets 0.48.5", +] + [[package]] name = "windows-sys" version = "0.45.0" diff --git a/Cargo.toml b/Cargo.toml index 10f6516..622dd17 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,7 @@ console = "0.15" csv = "1.3" derive_more = "0.99" env_logger = "0.10" +fastobo = "0.15.2" fastrand = "2.0" flate2 = "1.0" hpo = "0.8" @@ -37,6 +38,8 @@ serde_with = { version = "3.3", features=["alloc", "macros", "indexmap_2"], defa shellexpand = "3.0" strum = { version = "0.25", features = ["strum_macros", "derive"] } strum_macros = "0.25" +tantivy = "0.21.1" +tempdir = "0.3.7" thiserror = "1.0" tracing = "0.1" tracing-subscriber = "0.3" diff --git a/src/index.rs b/src/index.rs new file mode 100644 index 0000000..b23683c --- /dev/null +++ b/src/index.rs @@ -0,0 +1,191 @@ +//! Full text index for OBO documents using tantivy. + +use tantivy::schema::Schema; + +/// Encapsulation of a Tantivy index. +/// +/// The index lives in a directory and will only persist as long as the lifetime of this struct. +pub struct Index { + /// The index directory. + #[allow(dead_code)] + tmpdir: tempdir::TempDir, // keep around for RAII + /// The HPO document. + hpo_doc: fastobo::ast::OboDoc, + /// The index. + index: tantivy::Index, + /// The index schema. + schema: tantivy::schema::Schema, + /// The single reader. + reader: tantivy::IndexReader, +} + +/// Convert ident to String. +fn ident_to_string(ident: &fastobo::ast::Ident) -> String { + match ident { + fastobo::ast::Ident::Prefixed(val) => format!("{}:{}", val.prefix(), val.local()), + fastobo::ast::Ident::Unprefixed(val) => val.as_str().to_string(), + fastobo::ast::Ident::Url(val) => val.as_str().to_string(), + } +} + +// Code for creating an `Index`. +impl Index { + /// Create a new index from an OBO document. + /// + /// # Args + /// + /// * `hpo_doc` - The OBO document to index. + /// + /// # Errors + /// + /// In the case that the index cannot be created. + pub fn new(hpo_doc: fastobo::ast::OboDoc) -> Result { + let schema = Self::build_schema(); + let tmpdir = tempdir::TempDir::new("viguno")?; + let index = tantivy::Index::create_in_dir(tmpdir.path(), schema.clone())?; + + let mut index_writer = index.writer(100_000_000).map_err(|e| { + anyhow::anyhow!( + "Error creating tantivy index writer for directory {:?}: {}", + tmpdir.path(), + e + ) + })?; + Self::write_hpo_index(&hpo_doc, &schema, &mut index_writer).map_err(|e| { + anyhow::anyhow!( + "Error writing HPO index for directory {:?}: {}", + tmpdir.path(), + e + ) + })?; + + let reader = index + .reader_builder() + .reload_policy(tantivy::ReloadPolicy::Manual) + .try_into()?; + + Ok(Self { + tmpdir, + hpo_doc, + index, + schema, + reader, + }) + } + + /// Build the tantivy schema for the HPO. + fn build_schema() -> Schema { + use tantivy::schema::{STORED, STRING, TEXT}; + + let mut schema_builder = Schema::builder(); + schema_builder.add_text_field("term_id", STRING | STORED); + schema_builder.add_text_field("alt_id", STRING | STORED); + schema_builder.add_text_field("name", TEXT | STORED); + schema_builder.add_text_field("def", TEXT | STORED); + schema_builder.add_text_field("synonym", TEXT | STORED); + schema_builder.add_text_field("xref", STRING | STORED); + schema_builder.build() + } + + /// Index the HPO document. + fn write_hpo_index( + hpo_doc: &fastobo::ast::OboDoc, + schema: &tantivy::schema::Schema, + index_writer: &mut tantivy::IndexWriter, + ) -> Result<(), anyhow::Error> { + for term_frame in hpo_doc + .entities() + .iter() + .filter_map(fastobo::ast::EntityFrame::as_term) + { + let mut doc = tantivy::Document::default(); + + doc.add_field_value( + schema.get_field("term_id")?, + ident_to_string(term_frame.id().as_inner().as_ref()), + ); + + for line in term_frame + .clauses() + .iter() + .map(fastobo::ast::Line::as_inner) + { + match line { + fastobo::ast::TermClause::Name(name) => { + doc.add_field_value(schema.get_field("name")?, name.as_str()); + } + fastobo::ast::TermClause::AltId(alt_id) => { + doc.add_field_value( + schema.get_field("alt_id")?, + ident_to_string(alt_id).as_str(), + ); + } + fastobo::ast::TermClause::Def(def) => { + doc.add_field_value(schema.get_field("def")?, def.text().as_str()); + } + fastobo::ast::TermClause::Synonym(synonym) => { + doc.add_field_value( + schema.get_field("synonym")?, + synonym.description().as_str(), + ); + } + fastobo::ast::TermClause::Xref(xref) => { + doc.add_field_value(schema.get_field("xref")?, ident_to_string(xref.id())); + } + fastobo::ast::TermClause::IsAnonymous(_) + | fastobo::ast::TermClause::Comment(_) + | fastobo::ast::TermClause::Namespace(_) + | fastobo::ast::TermClause::Subset(_) + | fastobo::ast::TermClause::Builtin(_) + | fastobo::ast::TermClause::PropertyValue(_) + | fastobo::ast::TermClause::IsA(_) + | fastobo::ast::TermClause::IntersectionOf(_, _) + | fastobo::ast::TermClause::UnionOf(_) + | fastobo::ast::TermClause::EquivalentTo(_) + | fastobo::ast::TermClause::DisjointFrom(_) + | fastobo::ast::TermClause::Relationship(_, _) + | fastobo::ast::TermClause::CreatedBy(_) + | fastobo::ast::TermClause::CreationDate(_) + | fastobo::ast::TermClause::IsObsolete(_) + | fastobo::ast::TermClause::ReplacedBy(_) + | fastobo::ast::TermClause::Consider(_) => (), + } + } + + index_writer.add_document(doc).map_err(|e| { + anyhow::anyhow!( + "Error adding document to tantivy index writer: {}", + e.to_string() + ) + })?; + } + + index_writer + .commit() + .map_err(|e| anyhow::anyhow!("Error committing tantivy index writer: {}", e))?; + Ok(()) + } +} + +// Accessor code. +impl Index { + /// Get the HPO document. + pub fn hpo_doc(&self) -> &fastobo::ast::OboDoc { + &self.hpo_doc + } + + /// Get the index. + pub fn index(&self) -> &tantivy::Index { + &self.index + } + + /// Get the schema. + pub fn schema(&self) -> &tantivy::schema::Schema { + &self.schema + } + + /// Get the reader. + pub fn reader(&self) -> &tantivy::IndexReader { + &self.reader + } +} diff --git a/src/main.rs b/src/main.rs index 264c75e..0d09ebb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,6 +7,7 @@ pub mod algos; pub mod common; pub mod convert; +pub mod index; pub mod pbs; pub mod query; pub mod server; diff --git a/src/server/actix_server/hpo_genes.rs b/src/server/actix_server/hpo_genes.rs index de77ba6..6403641 100644 --- a/src/server/actix_server/hpo_genes.rs +++ b/src/server/actix_server/hpo_genes.rs @@ -192,6 +192,7 @@ mod test { let ncbi_to_hgnc = crate::common::hgnc_xlink::load_ncbi_to_hgnc("tests/data/hgnc_xlink.tsv")?; let hgnc_to_ncbi = crate::common::hgnc_xlink::inverse_hashmap(&ncbi_to_hgnc); + let hpo_doc = fastobo::from_file("tests/data/hpo/hp.obo")?; let app = actix_web::test::init_service( actix_web::App::new() .app_data(actix_web::web::Data::new(crate::server::WebServerData { @@ -199,6 +200,7 @@ mod test { db: None, ncbi_to_hgnc, hgnc_to_ncbi, + full_text_index: crate::index::Index::new(hpo_doc)?, })) .service(super::handle), ) diff --git a/src/server/actix_server/hpo_omims.rs b/src/server/actix_server/hpo_omims.rs index f3e3983..e03188f 100644 --- a/src/server/actix_server/hpo_omims.rs +++ b/src/server/actix_server/hpo_omims.rs @@ -219,6 +219,7 @@ mod test { let ncbi_to_hgnc = crate::common::hgnc_xlink::load_ncbi_to_hgnc("tests/data/hgnc_xlink.tsv")?; let hgnc_to_ncbi = crate::common::hgnc_xlink::inverse_hashmap(&ncbi_to_hgnc); + let hpo_doc = fastobo::from_file("tests/data/hpo/hp.obo")?; let app = actix_web::test::init_service( actix_web::App::new() .app_data(actix_web::web::Data::new(crate::server::WebServerData { @@ -226,6 +227,7 @@ mod test { db: None, ncbi_to_hgnc, hgnc_to_ncbi, + full_text_index: crate::index::Index::new(hpo_doc)?, })) .service(super::handle), ) diff --git a/src/server/actix_server/hpo_sim/term_gene.rs b/src/server/actix_server/hpo_sim/term_gene.rs index a4cc160..3f3644e 100644 --- a/src/server/actix_server/hpo_sim/term_gene.rs +++ b/src/server/actix_server/hpo_sim/term_gene.rs @@ -118,6 +118,7 @@ mod test { ["meta", "scores"], true, )?); + let hpo_doc = fastobo::from_file("tests/data/hpo/hp.obo")?; let app = actix_web::test::init_service( actix_web::App::new() @@ -126,6 +127,7 @@ mod test { db, ncbi_to_hgnc, hgnc_to_ncbi, + full_text_index: crate::index::Index::new(hpo_doc)?, })) .service(super::handle), ) diff --git a/src/server/actix_server/hpo_sim/term_term.rs b/src/server/actix_server/hpo_sim/term_term.rs index 7752e6e..c3dd012 100644 --- a/src/server/actix_server/hpo_sim/term_term.rs +++ b/src/server/actix_server/hpo_sim/term_term.rs @@ -173,6 +173,7 @@ mod test { ["meta", "scores"], true, )?); + let hpo_doc = fastobo::from_file("tests/data/hpo/hp.obo")?; let app = actix_web::test::init_service( actix_web::App::new() @@ -181,6 +182,7 @@ mod test { db, ncbi_to_hgnc, hgnc_to_ncbi, + full_text_index: crate::index::Index::new(hpo_doc)?, })) .service(super::handle), ) diff --git a/src/server/actix_server/hpo_terms.rs b/src/server/actix_server/hpo_terms.rs index bd9eb96..94c3828 100644 --- a/src/server/actix_server/hpo_terms.rs +++ b/src/server/actix_server/hpo_terms.rs @@ -11,7 +11,7 @@ use hpo::{annotations::AnnotationId, HpoTerm, HpoTermId, Ontology}; use crate::server::WebServerData; -use super::{CustomError, Match, ResultGene}; +use super::{CustomError, ResultGene}; /// Parameters for `handle`. /// @@ -22,19 +22,12 @@ use super::{CustomError, Match, ResultGene}; /// - `gene_symbol` -- specify the gene symbol /// - `max_results` -- the maximum number of records to return /// - `genes` -- whether to include `"genes"` in result -/// -/// The following propery defines how matches are performed: -/// -/// - `match` -- how to match #[derive(serde::Serialize, serde::Deserialize, Debug, Clone)] struct Query { /// The term ID to search for. pub term_id: Option, /// The term name to search for. pub name: Option, - /// The match mode. - #[serde(alias = "match")] - pub match_: Option, /// Maximal number of results to return. #[serde(default = "_default_max_results")] pub max_results: usize, @@ -60,6 +53,12 @@ struct ResultEntry { pub term_id: String, /// The HPO term's name. pub name: String, + /// Any matching description. + pub definition: Option, + /// Any matching synonyms. + pub synonyms: Option>, + /// Any matching xref. + pub xrefs: Option>, /// The gene's associated HPO terms. #[serde(default = "Option::default", skip_serializing_if = "Option::is_none")] pub genes: Option>, @@ -95,7 +94,67 @@ impl ResultEntry { ontology: &Ontology, genes: bool, ncbi_to_hgnc: &HashMap, + index: &crate::index::Index, + doc: Option<&tantivy::Document>, ) -> Self { + let field_term_id = index + .schema() + .get_field("term_id") + .expect("field must exist"); + let field_def = index + .index() + .schema() + .get_field("def") + .expect("field must exist"); + let field_synonym = index + .index() + .schema() + .get_field("synonym") + .expect("field must exist"); + let field_xref = index + .index() + .schema() + .get_field("xref") + .expect("field must exist"); + + let searcher = index.reader().searcher(); + let doc = if let Some(doc) = doc { + doc.clone() + } else { + let query_parser = + tantivy::query::QueryParser::for_index(index.index(), vec![field_term_id]); + let query = query_parser + .parse_query(&format!("\"{}\"", term.id())) + .expect("bad term ID query"); + let top_docs = searcher + .search(&query, &tantivy::collector::TopDocs::with_limit(1)) + .expect("problemw ith term ID search"); + + searcher + .doc(top_docs[0].1) + .expect("problem with term ID query") + }; + + let definition = doc + .get_all(field_def) + .filter_map(|f| f.as_text().map(std::string::ToString::to_string)) + .collect::>(); + let definition = definition.first().map(std::clone::Clone::clone); + let synonyms = doc + .get_all(field_synonym) + .filter_map(|f| f.as_text().map(std::string::ToString::to_string)) + .collect::>(); + let synonyms = if synonyms.is_empty() { + None + } else { + Some(synonyms) + }; + let xrefs = doc + .get_all(field_xref) + .filter_map(|f| f.as_text().map(std::string::ToString::to_string)) + .collect::>(); + let xrefs = if xrefs.is_empty() { None } else { Some(xrefs) }; + let genes = if genes { let mut genes = term .gene_ids() @@ -116,6 +175,9 @@ impl ResultEntry { term_id: term.id().to_string(), name: term.name().to_string(), genes, + definition, + synonyms, + xrefs, } } } @@ -137,6 +199,7 @@ struct Container { /// /// In the case that there is an error running the server. #[allow(clippy::unused_async)] +#[allow(clippy::too_many_lines)] #[get("/hpo/terms")] async fn handle( data: Data, @@ -144,60 +207,117 @@ async fn handle( query: web::Query, ) -> actix_web::Result { let ontology = &data.ontology; - let match_ = query.match_.unwrap_or_default(); let mut result: Vec = Vec::new(); - if match_ == Match::Exact { - let term = if let Some(term_id) = &query.term_id { - let term_id = HpoTermId::from(term_id.clone()); - ontology.hpo(term_id) - } else if let Some(name) = &query.name { - let mut term = None; - let mut it = ontology.hpos(); - let mut tmp = it.next(); - while tmp.is_some() && term.is_none() { - if tmp.expect("checked above").name() == name { - term = tmp; - } - tmp = it.next(); - } - term - } else { - None + let field_term_id = data + .full_text_index + .index() + .schema() + .get_field("term_id") + .expect("field must exist"); + let field_alt_id = data + .full_text_index + .schema() + .get_field("alt_id") + .expect("field must exist"); + let field_name = data + .full_text_index + .index() + .schema() + .get_field("name") + .expect("field must exist"); + let field_def = data + .full_text_index + .index() + .schema() + .get_field("def") + .expect("field must exist"); + let field_synonym = data + .full_text_index + .index() + .schema() + .get_field("synonym") + .expect("field must exist"); + let field_xref = data + .full_text_index + .index() + .schema() + .get_field("xref") + .expect("field must exist"); + + if let Some(term_id) = &query.term_id { + let term_id = HpoTermId::from(term_id.clone()); + let term = ontology.hpo(term_id).ok_or_else(|| { + CustomError::new(anyhow::anyhow!("Term ID {} not found in HPO", term_id)) + })?; + result.push(ResultEntry::from_term_with_ontology( + &term, + ontology, + query.genes, + &data.ncbi_to_hgnc, + &data.full_text_index, + None, + )); + } else if let Some(name) = &query.name { + let searcher = data.full_text_index.reader().searcher(); + let query_parser = { + let mut query_parser = tantivy::query::QueryParser::for_index( + data.full_text_index.index(), + vec![ + field_term_id, + field_alt_id, + field_name, + field_def, + field_synonym, + field_xref, + ], + ); + query_parser.set_conjunction_by_default(); + query_parser.set_field_boost(field_name, 3.0); + query_parser.set_field_boost(field_synonym, 0.8); + query_parser.set_field_boost(field_def, 0.6); + query_parser.set_field_fuzzy(field_name, true, 1, true); + query_parser.set_field_fuzzy(field_def, true, 1, true); + query_parser.set_field_fuzzy(field_synonym, true, 1, true); + query_parser }; - if let Some(term) = &term { + let index_query = query_parser.parse_query(name).map_err(|e| { + eprintln!("{e}"); + CustomError::new(anyhow::anyhow!("Error parsing query: {}", e)) + })?; + let top_docs = searcher + .search( + &index_query, + &tantivy::collector::TopDocs::with_limit(query.max_results), + ) + .map_err(|e| CustomError::new(anyhow::anyhow!("Error searching index: {}", e)))?; + + for (_score, doc_address) in top_docs { + let retrieved_doc = searcher.doc(doc_address).map_err(|e| { + CustomError::new(anyhow::anyhow!("Error retrieving document: {}", e)) + })?; + let term_id = retrieved_doc + .get_first(field_term_id) + .ok_or_else(|| { + CustomError::new(anyhow::anyhow!("Document has no `term_id` field")) + })? + .as_text() + .unwrap_or_default(); + let term_id = HpoTermId::from(term_id.to_string()); + let term = ontology.hpo(term_id).ok_or_else(|| { + CustomError::new(anyhow::anyhow!("Term ID {} not found in HPO", term_id)) + })?; + result.push(ResultEntry::from_term_with_ontology( - term, + &term, ontology, query.genes, &data.ncbi_to_hgnc, + &data.full_text_index, + Some(&retrieved_doc), )); } - } else if let Some(name) = &query.name { - let mut it = ontology.hpos(); - let mut term = it.next(); - while term.is_some() && result.len() < query.max_results { - let term_name = term.as_ref().expect("checked above").name(); - let is_match = match query.match_.unwrap_or_default() { - Match::Prefix => term_name.starts_with(name), - Match::Suffix => term_name.ends_with(name), - Match::Contains => term_name.contains(name), - Match::Exact => panic!("cannot happen here"), - }; - if is_match { - result.push(ResultEntry::from_term_with_ontology( - term.as_ref().expect("checked above"), - ontology, - query.genes, - &data.ncbi_to_hgnc, - )); - } - - term = it.next(); - } - } - - result.sort(); + }; let result = Container { version: crate::common::Version::new(&data.ontology.hpo_version()), @@ -217,6 +337,7 @@ mod test { let ncbi_to_hgnc = crate::common::hgnc_xlink::load_ncbi_to_hgnc("tests/data/hgnc_xlink.tsv")?; let hgnc_to_ncbi = crate::common::hgnc_xlink::inverse_hashmap(&ncbi_to_hgnc); + let hpo_doc = fastobo::from_file("tests/data/hpo/hp.obo")?; let app = actix_web::test::init_service( actix_web::App::new() .app_data(actix_web::web::Data::new(crate::server::WebServerData { @@ -224,6 +345,7 @@ mod test { db: None, ncbi_to_hgnc, hgnc_to_ncbi, + full_text_index: crate::index::Index::new(hpo_doc)?, })) .service(super::handle), ) @@ -263,44 +385,16 @@ mod test { } #[actix_web::test] - async fn hpo_terms_name_prefix_no_genes() -> Result<(), anyhow::Error> { - Ok(insta::assert_yaml_snapshot!( - &run_query("/hpo/terms?name=Inguinal+hern&match=prefix").await? - )) - } - - #[actix_web::test] - async fn hpo_terms_name_prefix_with_genes() -> Result<(), anyhow::Error> { - Ok(insta::assert_yaml_snapshot!( - &run_query("/hpo/terms?name=Inguinal+hern&match=prefix&genes=true").await? - )) - } - - #[actix_web::test] - async fn hpo_terms_name_suffix_no_genes() -> Result<(), anyhow::Error> { - Ok(insta::assert_yaml_snapshot!( - &run_query("/hpo/terms?name=guinal+hernia&match=suffix").await? - )) - } - - #[actix_web::test] - async fn hpo_terms_name_suffix_with_genes() -> Result<(), anyhow::Error> { - Ok(insta::assert_yaml_snapshot!( - &run_query("/hpo/terms?name=guinal+hernia&match=suffix&genes=true").await? - )) - } - - #[actix_web::test] - async fn hpo_terms_name_contains_no_genes() -> Result<(), anyhow::Error> { + async fn hpo_terms_name_fuzzy_no_genes() -> Result<(), anyhow::Error> { Ok(insta::assert_yaml_snapshot!( - &run_query("/hpo/terms?name=guinal+hern&match=contains").await? + &run_query("/hpo/terms?name=Inguinal+hern").await? )) } #[actix_web::test] - async fn hpo_terms_name_contains_with_genes() -> Result<(), anyhow::Error> { + async fn hpo_terms_name_fuzzy_with_genes() -> Result<(), anyhow::Error> { Ok(insta::assert_yaml_snapshot!( - &run_query("/hpo/terms?name=guinal+hern&match=contains&genes=true").await? + &run_query("/hpo/terms?name=Inguinal+hern&genes=true").await? )) } } diff --git a/src/server/actix_server/mod.rs b/src/server/actix_server/mod.rs index 75851cb..6a1dd36 100644 --- a/src/server/actix_server/mod.rs +++ b/src/server/actix_server/mod.rs @@ -41,7 +41,9 @@ enum Match { } /// Representation of a gene. -#[derive(serde::Deserialize, serde::Serialize, Debug, Clone, PartialOrd, Ord, PartialEq, Eq)] +#[derive( + serde::Deserialize, serde::Serialize, Default, Debug, Clone, PartialOrd, Ord, PartialEq, Eq, +)] #[serde_with::skip_serializing_none] struct ResultGene { /// The HPO ID. @@ -53,11 +55,13 @@ struct ResultGene { } /// Representation of an HPO term. -#[derive(serde::Deserialize, serde::Serialize, Debug, Clone, PartialOrd, Ord, PartialEq, Eq)] +#[derive( + serde::Deserialize, serde::Serialize, Default, Debug, Clone, PartialOrd, Ord, PartialEq, Eq, +)] struct ResultHpoTerm { /// The HPO ID. pub term_id: String, - /// The description. + /// The term name. pub name: String, } diff --git a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_genes__test__hpo_genes_gene_id_exact_no_hpo_terms.snap b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_genes__test__hpo_genes_gene_id_exact_no_hpo_terms.snap deleted file mode 100644 index d92e1c5..0000000 --- a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_genes__test__hpo_genes_gene_id_exact_no_hpo_terms.snap +++ /dev/null @@ -1,7 +0,0 @@ ---- -source: src/server/actix_server/hpo_genes.rs -expression: "&run_query(\"/hpo/genes?gene_id=2348\").await?" ---- -- gene_ncbi_id: 2348 - gene_symbol: FOLR1 - diff --git a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_genes__test__hpo_genes_gene_id_exact_with_hpo_terms.snap b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_genes__test__hpo_genes_gene_id_exact_with_hpo_terms.snap deleted file mode 100644 index 1ef9b92..0000000 --- a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_genes__test__hpo_genes_gene_id_exact_with_hpo_terms.snap +++ /dev/null @@ -1,18 +0,0 @@ ---- -source: src/server/actix_server/hpo_genes.rs -expression: "&run_query(\"/hpo/genes?gene_id=2348&hpo_terms=true\").await?" ---- -- gene_ncbi_id: 2348 - gene_symbol: FOLR1 - hpo_terms: - - term_id: "HP:0000007" - name: Autosomal recessive inheritance - - term_id: "HP:0001249" - name: Intellectual disability - - term_id: "HP:0001250" - name: Seizure - - term_id: "HP:0002180" - name: Neurodegeneration - - term_id: "HP:0002376" - name: Developmental regression - diff --git a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_contains_no_genes.snap b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_contains_no_genes.snap deleted file mode 100644 index 9631ba1..0000000 --- a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_contains_no_genes.snap +++ /dev/null @@ -1,7 +0,0 @@ ---- -source: src/server/actix_server/hpo_omims.rs -expression: "&run_query(\"/hpo/omims?name=tel-Manzke+syndro&match=contains\").await?" ---- -- omim_id: "OMIM:616145" - name: Catel-Manzke syndrome - diff --git a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_contains_with_genes.snap b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_contains_with_genes.snap deleted file mode 100644 index 957a42f..0000000 --- a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_contains_with_genes.snap +++ /dev/null @@ -1,7 +0,0 @@ ---- -source: src/server/actix_server/hpo_omims.rs -expression: "&run_query(\"/hpo/omims?name=tel-Manzke+syndro&match=contains&genes=true\").await?" ---- -- omim_id: "OMIM:616145" - name: Catel-Manzke syndrome - diff --git a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_exact_no_genes.snap b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_exact_no_genes.snap deleted file mode 100644 index 044251c..0000000 --- a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_exact_no_genes.snap +++ /dev/null @@ -1,7 +0,0 @@ ---- -source: src/server/actix_server/hpo_omims.rs -expression: "&run_query(\"/hpo/omims?name=Catel-Manzke+syndrome\").await?" ---- -- omim_id: "OMIM:616145" - name: Catel-Manzke syndrome - diff --git a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_prefix_no_genes.snap b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_prefix_no_genes.snap deleted file mode 100644 index ba3f4d2..0000000 --- a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_prefix_no_genes.snap +++ /dev/null @@ -1,7 +0,0 @@ ---- -source: src/server/actix_server/hpo_omims.rs -expression: "&run_query(\"/hpo/omims?name=Catel-Manzke+syndro&match=prefix\").await?" ---- -- omim_id: "OMIM:616145" - name: Catel-Manzke syndrome - diff --git a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_suffix_no_genes.snap b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_suffix_no_genes.snap deleted file mode 100644 index 928802f..0000000 --- a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_omims__test__hpo_omims_name_suffix_no_genes.snap +++ /dev/null @@ -1,7 +0,0 @@ ---- -source: src/server/actix_server/hpo_omims.rs -expression: "&run_query(\"/hpo/omims?name=tel-Manzke+syndrome&match=suffix\").await?" ---- -- omim_id: "OMIM:616145" - name: Catel-Manzke syndrome - diff --git a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_contains_no_genes.snap b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_contains_no_genes.snap deleted file mode 100644 index 207e668..0000000 --- a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_contains_no_genes.snap +++ /dev/null @@ -1,17 +0,0 @@ ---- -source: src/server/actix_server/hpo_terms.rs -expression: "&run_query(\"/hpo/terms?name=guinal+hern&match=contains\").await?" ---- -version: - hpo: 2023-04-05 - viguno: 0.0.0 -query: - term_id: ~ - name: guinal hern - match_: contains - max_results: 100 - genes: false -result: - - term_id: "HP:0000023" - name: Inguinal hernia - diff --git a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_contains_with_genes.snap b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_contains_with_genes.snap deleted file mode 100644 index b10f3ea..0000000 --- a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_contains_with_genes.snap +++ /dev/null @@ -1,894 +0,0 @@ ---- -source: src/server/actix_server/hpo_terms.rs -expression: "&run_query(\"/hpo/terms?name=guinal+hern&match=contains&genes=true\").await?" ---- -version: - hpo: 2023-04-05 - viguno: 0.0.0 -query: - term_id: ~ - name: guinal hern - match_: contains - max_results: 100 - genes: true -result: - - term_id: "HP:0000023" - name: Inguinal hernia - genes: - - ncbi_gene_id: 59 - gene_symbol: ACTA2 - hgnc_id: "HGNC:130" - - ncbi_gene_id: 165 - gene_symbol: AEBP1 - hgnc_id: "HGNC:303" - - ncbi_gene_id: 175 - gene_symbol: AGA - hgnc_id: "HGNC:318" - - ncbi_gene_id: 268 - gene_symbol: AMH - hgnc_id: "HGNC:464" - - ncbi_gene_id: 269 - gene_symbol: AMHR2 - hgnc_id: "HGNC:465" - - ncbi_gene_id: 367 - gene_symbol: AR - hgnc_id: "HGNC:644" - - ncbi_gene_id: 411 - gene_symbol: ARSB - hgnc_id: "HGNC:714" - - ncbi_gene_id: 421 - gene_symbol: ARVCF - hgnc_id: "HGNC:728" - - ncbi_gene_id: 477 - gene_symbol: ATP1A2 - hgnc_id: "HGNC:800" - - ncbi_gene_id: 523 - gene_symbol: ATP6V1A - hgnc_id: "HGNC:851" - - ncbi_gene_id: 529 - gene_symbol: ATP6V1E1 - hgnc_id: "HGNC:857" - - ncbi_gene_id: 538 - gene_symbol: ATP7A - hgnc_id: "HGNC:869" - - ncbi_gene_id: 613 - gene_symbol: BCR - hgnc_id: "HGNC:1014" - - ncbi_gene_id: 699 - gene_symbol: BUB1 - hgnc_id: "HGNC:1148" - - ncbi_gene_id: 715 - gene_symbol: C1R - hgnc_id: "HGNC:1246" - - ncbi_gene_id: 716 - gene_symbol: C1S - hgnc_id: "HGNC:1247" - - ncbi_gene_id: 871 - gene_symbol: SERPINH1 - hgnc_id: "HGNC:1546" - - ncbi_gene_id: 875 - gene_symbol: CBS - hgnc_id: "HGNC:1550" - - ncbi_gene_id: 998 - gene_symbol: CDC42 - hgnc_id: "HGNC:1736" - - ncbi_gene_id: 1028 - gene_symbol: CDKN1C - hgnc_id: "HGNC:1786" - - ncbi_gene_id: 1107 - gene_symbol: CHD3 - hgnc_id: "HGNC:1918" - - ncbi_gene_id: 1146 - gene_symbol: CHRNG - hgnc_id: "HGNC:1967" - - ncbi_gene_id: 1183 - gene_symbol: CLCN4 - hgnc_id: "HGNC:2022" - - ncbi_gene_id: 1277 - gene_symbol: COL1A1 - hgnc_id: "HGNC:2197" - - ncbi_gene_id: 1278 - gene_symbol: COL1A2 - hgnc_id: "HGNC:2198" - - ncbi_gene_id: 1280 - gene_symbol: COL2A1 - hgnc_id: "HGNC:2200" - - ncbi_gene_id: 1281 - gene_symbol: COL3A1 - hgnc_id: "HGNC:2201" - - ncbi_gene_id: 1289 - gene_symbol: COL5A1 - hgnc_id: "HGNC:2209" - - ncbi_gene_id: 1290 - gene_symbol: COL5A2 - hgnc_id: "HGNC:2210" - - ncbi_gene_id: 1312 - gene_symbol: COMT - hgnc_id: "HGNC:2228" - - ncbi_gene_id: 1387 - gene_symbol: CREBBP - hgnc_id: "HGNC:2348" - - ncbi_gene_id: 1399 - gene_symbol: CRKL - hgnc_id: "HGNC:2363" - - ncbi_gene_id: 1457 - gene_symbol: CSNK2A1 - hgnc_id: "HGNC:2457" - - ncbi_gene_id: 1501 - gene_symbol: CTNND2 - hgnc_id: "HGNC:2516" - - ncbi_gene_id: 1656 - gene_symbol: DDX6 - hgnc_id: "HGNC:2747" - - ncbi_gene_id: 1801 - gene_symbol: DPH1 - hgnc_id: "HGNC:3003" - - ncbi_gene_id: 1836 - gene_symbol: SLC26A2 - hgnc_id: "HGNC:10994" - - ncbi_gene_id: 1855 - gene_symbol: DVL1 - hgnc_id: "HGNC:3084" - - ncbi_gene_id: 1857 - gene_symbol: DVL3 - hgnc_id: "HGNC:3087" - - ncbi_gene_id: 1859 - gene_symbol: DYRK1A - hgnc_id: "HGNC:3091" - - ncbi_gene_id: 1861 - gene_symbol: TOR1A - hgnc_id: "HGNC:3098" - - ncbi_gene_id: 2006 - gene_symbol: ELN - hgnc_id: "HGNC:3327" - - ncbi_gene_id: 2146 - gene_symbol: EZH2 - hgnc_id: "HGNC:3527" - - ncbi_gene_id: 2187 - gene_symbol: FANCB - hgnc_id: "HGNC:3583" - - ncbi_gene_id: 2200 - gene_symbol: FBN1 - hgnc_id: "HGNC:3603" - - ncbi_gene_id: 2239 - gene_symbol: GPC4 - hgnc_id: "HGNC:4452" - - ncbi_gene_id: 2245 - gene_symbol: FGD1 - hgnc_id: "HGNC:3663" - - ncbi_gene_id: 2260 - gene_symbol: FGFR1 - hgnc_id: "HGNC:3688" - - ncbi_gene_id: 2301 - gene_symbol: FOXE3 - hgnc_id: "HGNC:3808" - - ncbi_gene_id: 2313 - gene_symbol: FLI1 - hgnc_id: "HGNC:3749" - - ncbi_gene_id: 2316 - gene_symbol: FLNA - hgnc_id: "HGNC:3754" - - ncbi_gene_id: 2317 - gene_symbol: FLNB - hgnc_id: "HGNC:3755" - - ncbi_gene_id: 2535 - gene_symbol: FZD2 - hgnc_id: "HGNC:4040" - - ncbi_gene_id: 2542 - gene_symbol: SLC37A4 - hgnc_id: "HGNC:4061" - - ncbi_gene_id: 2588 - gene_symbol: GALNS - hgnc_id: "HGNC:4122" - - ncbi_gene_id: 2626 - gene_symbol: GATA4 - hgnc_id: "HGNC:4173" - - ncbi_gene_id: 2627 - gene_symbol: GATA6 - hgnc_id: "HGNC:4174" - - ncbi_gene_id: 2657 - gene_symbol: GDF1 - hgnc_id: "HGNC:4214" - - ncbi_gene_id: 2719 - gene_symbol: GPC3 - hgnc_id: "HGNC:4451" - - ncbi_gene_id: 2720 - gene_symbol: GLB1 - hgnc_id: "HGNC:4298" - - ncbi_gene_id: 2737 - gene_symbol: GLI3 - hgnc_id: "HGNC:4319" - - ncbi_gene_id: 2741 - gene_symbol: GLRA1 - hgnc_id: "HGNC:4326" - - ncbi_gene_id: 2783 - gene_symbol: GNB2 - hgnc_id: "HGNC:4398" - - ncbi_gene_id: 2799 - gene_symbol: GNS - hgnc_id: "HGNC:4422" - - ncbi_gene_id: 2812 - gene_symbol: GP1BB - hgnc_id: "HGNC:4440" - - ncbi_gene_id: 2904 - gene_symbol: GRIN2B - hgnc_id: "HGNC:4586" - - ncbi_gene_id: 2969 - gene_symbol: GTF2I - hgnc_id: "HGNC:4659" - - ncbi_gene_id: 2972 - gene_symbol: BRF1 - hgnc_id: "HGNC:11551" - - ncbi_gene_id: 2990 - gene_symbol: GUSB - hgnc_id: "HGNC:4696" - - ncbi_gene_id: 3339 - gene_symbol: HSPG2 - hgnc_id: "HGNC:5273" - - ncbi_gene_id: 3423 - gene_symbol: IDS - hgnc_id: "HGNC:5389" - - ncbi_gene_id: 3425 - gene_symbol: IDUA - hgnc_id: "HGNC:5391" - - ncbi_gene_id: 3481 - gene_symbol: IGF2 - hgnc_id: "HGNC:5466" - - ncbi_gene_id: 3670 - gene_symbol: ISL1 - hgnc_id: "HGNC:6132" - - ncbi_gene_id: 3955 - gene_symbol: LFNG - hgnc_id: "HGNC:6560" - - ncbi_gene_id: 3984 - gene_symbol: LIMK1 - hgnc_id: "HGNC:6613" - - ncbi_gene_id: 4015 - gene_symbol: LOX - hgnc_id: "HGNC:6664" - - ncbi_gene_id: 4052 - gene_symbol: LTBP1 - hgnc_id: "HGNC:6714" - - ncbi_gene_id: 4087 - gene_symbol: SMAD2 - hgnc_id: "HGNC:6768" - - ncbi_gene_id: 4088 - gene_symbol: SMAD3 - hgnc_id: "HGNC:6769" - - ncbi_gene_id: 4089 - gene_symbol: SMAD4 - hgnc_id: "HGNC:6770" - - ncbi_gene_id: 4094 - gene_symbol: MAF - hgnc_id: "HGNC:6776" - - ncbi_gene_id: 4125 - gene_symbol: MAN2B1 - hgnc_id: "HGNC:6826" - - ncbi_gene_id: 4144 - gene_symbol: MAT2A - hgnc_id: "HGNC:6904" - - ncbi_gene_id: 4212 - gene_symbol: MEIS2 - hgnc_id: "HGNC:7001" - - ncbi_gene_id: 4281 - gene_symbol: MID1 - hgnc_id: "HGNC:7095" - - ncbi_gene_id: 4621 - gene_symbol: MYH3 - hgnc_id: "HGNC:7573" - - ncbi_gene_id: 4629 - gene_symbol: MYH11 - hgnc_id: "HGNC:7569" - - ncbi_gene_id: 4638 - gene_symbol: MYLK - hgnc_id: "HGNC:7590" - - ncbi_gene_id: 4702 - gene_symbol: NDUFA8 - hgnc_id: "HGNC:7692" - - ncbi_gene_id: 4758 - gene_symbol: NEU1 - hgnc_id: "HGNC:7758" - - ncbi_gene_id: 4774 - gene_symbol: NFIA - hgnc_id: "HGNC:7784" - - ncbi_gene_id: 4851 - gene_symbol: NOTCH1 - hgnc_id: "HGNC:7881" - - ncbi_gene_id: 4853 - gene_symbol: NOTCH2 - hgnc_id: "HGNC:7882" - - ncbi_gene_id: 4854 - gene_symbol: NOTCH3 - hgnc_id: "HGNC:7883" - - ncbi_gene_id: 4920 - gene_symbol: ROR2 - hgnc_id: "HGNC:10257" - - ncbi_gene_id: 4952 - gene_symbol: OCRL - hgnc_id: "HGNC:8108" - - ncbi_gene_id: 4953 - gene_symbol: ODC1 - hgnc_id: "HGNC:8109" - - ncbi_gene_id: 5048 - gene_symbol: PAFAH1B1 - hgnc_id: "HGNC:8574" - - ncbi_gene_id: 5295 - gene_symbol: PIK3R1 - hgnc_id: "HGNC:8979" - - ncbi_gene_id: 5324 - gene_symbol: PLAG1 - hgnc_id: "HGNC:9045" - - ncbi_gene_id: 5337 - gene_symbol: PLD1 - hgnc_id: "HGNC:9067" - - ncbi_gene_id: 5351 - gene_symbol: PLOD1 - hgnc_id: "HGNC:9081" - - ncbi_gene_id: 5352 - gene_symbol: PLOD2 - hgnc_id: "HGNC:9082" - - ncbi_gene_id: 5430 - gene_symbol: POLR2A - hgnc_id: "HGNC:9187" - - ncbi_gene_id: 5515 - gene_symbol: PPP2CA - hgnc_id: "HGNC:9299" - - ncbi_gene_id: 5518 - gene_symbol: PPP2R1A - hgnc_id: "HGNC:9302" - - ncbi_gene_id: 5592 - gene_symbol: PRKG1 - hgnc_id: "HGNC:9414" - - ncbi_gene_id: 5594 - gene_symbol: MAPK1 - hgnc_id: "HGNC:6871" - - ncbi_gene_id: 5826 - gene_symbol: ABCD4 - hgnc_id: "HGNC:68" - - ncbi_gene_id: 5831 - gene_symbol: PYCR1 - hgnc_id: "HGNC:9721" - - ncbi_gene_id: 5832 - gene_symbol: ALDH18A1 - hgnc_id: "HGNC:9722" - - ncbi_gene_id: 5982 - gene_symbol: RFC2 - hgnc_id: "HGNC:9970" - - ncbi_gene_id: 6134 - gene_symbol: RPL10 - hgnc_id: "HGNC:10298" - - ncbi_gene_id: 6197 - gene_symbol: RPS6KA3 - hgnc_id: "HGNC:10432" - - ncbi_gene_id: 6239 - gene_symbol: RREB1 - hgnc_id: "HGNC:10449" - - ncbi_gene_id: 6418 - gene_symbol: SET - hgnc_id: "HGNC:10760" - - ncbi_gene_id: 6448 - gene_symbol: SGSH - hgnc_id: "HGNC:10818" - - ncbi_gene_id: 6497 - gene_symbol: SKI - hgnc_id: "HGNC:10896" - - ncbi_gene_id: 6499 - gene_symbol: SKIC2 - hgnc_id: "HGNC:10898" - - ncbi_gene_id: 6595 - gene_symbol: SMARCA2 - hgnc_id: "HGNC:11098" - - ncbi_gene_id: 6598 - gene_symbol: SMARCB1 - hgnc_id: "HGNC:11103" - - ncbi_gene_id: 6601 - gene_symbol: SMARCC2 - hgnc_id: "HGNC:11105" - - ncbi_gene_id: 6785 - gene_symbol: ELOVL4 - hgnc_id: "HGNC:14415" - - ncbi_gene_id: 6804 - gene_symbol: STX1A - hgnc_id: "HGNC:11433" - - ncbi_gene_id: 6899 - gene_symbol: TBX1 - hgnc_id: "HGNC:11592" - - ncbi_gene_id: 6926 - gene_symbol: TBX3 - hgnc_id: "HGNC:11602" - - ncbi_gene_id: 6935 - gene_symbol: ZEB1 - hgnc_id: "HGNC:11642" - - ncbi_gene_id: 7042 - gene_symbol: TGFB2 - hgnc_id: "HGNC:11768" - - ncbi_gene_id: 7043 - gene_symbol: TGFB3 - hgnc_id: "HGNC:11769" - - ncbi_gene_id: 7046 - gene_symbol: TGFBR1 - hgnc_id: "HGNC:11772" - - ncbi_gene_id: 7048 - gene_symbol: TGFBR2 - hgnc_id: "HGNC:11773" - - ncbi_gene_id: 7290 - gene_symbol: HIRA - hgnc_id: "HGNC:4916" - - ncbi_gene_id: 7317 - gene_symbol: UBA1 - hgnc_id: "HGNC:12469" - - ncbi_gene_id: 7353 - gene_symbol: UFD1 - hgnc_id: "HGNC:12520" - - ncbi_gene_id: 7458 - gene_symbol: EIF4H - hgnc_id: "HGNC:12741" - - ncbi_gene_id: 7461 - gene_symbol: CLIP2 - hgnc_id: "HGNC:2586" - - ncbi_gene_id: 7474 - gene_symbol: WNT5A - hgnc_id: "HGNC:12784" - - ncbi_gene_id: 7518 - gene_symbol: XRCC4 - hgnc_id: "HGNC:12831" - - ncbi_gene_id: 7531 - gene_symbol: YWHAE - hgnc_id: "HGNC:12851" - - ncbi_gene_id: 8036 - gene_symbol: SHOC2 - hgnc_id: "HGNC:15454" - - ncbi_gene_id: 8076 - gene_symbol: MFAP5 - hgnc_id: "HGNC:29673" - - ncbi_gene_id: 8091 - gene_symbol: HMGA2 - hgnc_id: "HGNC:5009" - - ncbi_gene_id: 8214 - gene_symbol: DGCR6 - hgnc_id: "HGNC:2846" - - ncbi_gene_id: 8220 - gene_symbol: ESS2 - hgnc_id: "HGNC:16817" - - ncbi_gene_id: 8260 - gene_symbol: NAA10 - hgnc_id: "HGNC:18704" - - ncbi_gene_id: 8289 - gene_symbol: ARID1A - hgnc_id: "HGNC:11110" - - ncbi_gene_id: 8295 - gene_symbol: TRRAP - hgnc_id: "HGNC:12347" - - ncbi_gene_id: 8425 - gene_symbol: LTBP4 - hgnc_id: "HGNC:6717" - - ncbi_gene_id: 8443 - gene_symbol: GNPAT - hgnc_id: "HGNC:4416" - - ncbi_gene_id: 8450 - gene_symbol: CUL4B - hgnc_id: "HGNC:2555" - - ncbi_gene_id: 8468 - gene_symbol: FKBP6 - hgnc_id: "HGNC:3722" - - ncbi_gene_id: 8481 - gene_symbol: OFD1 - hgnc_id: "HGNC:2567" - - ncbi_gene_id: 8626 - gene_symbol: TP63 - hgnc_id: "HGNC:15979" - - ncbi_gene_id: 8720 - gene_symbol: MBTPS1 - hgnc_id: "HGNC:15456" - - ncbi_gene_id: 8726 - gene_symbol: EED - hgnc_id: "HGNC:3188" - - ncbi_gene_id: 8788 - gene_symbol: DLK1 - hgnc_id: "HGNC:2907" - - ncbi_gene_id: 8884 - gene_symbol: SLC5A6 - hgnc_id: "HGNC:11041" - - ncbi_gene_id: 8905 - gene_symbol: AP1S2 - hgnc_id: "HGNC:560" - - ncbi_gene_id: 9031 - gene_symbol: BAZ1B - hgnc_id: "HGNC:961" - - ncbi_gene_id: 9037 - gene_symbol: SEMA5A - hgnc_id: "HGNC:10736" - - ncbi_gene_id: 9091 - gene_symbol: PIGQ - hgnc_id: "HGNC:14135" - - ncbi_gene_id: 9158 - gene_symbol: FIBP - hgnc_id: "HGNC:3705" - - ncbi_gene_id: 9275 - gene_symbol: BCL7B - hgnc_id: "HGNC:1005" - - ncbi_gene_id: 9469 - gene_symbol: CHST3 - hgnc_id: "HGNC:1971" - - ncbi_gene_id: 9509 - gene_symbol: ADAMTS2 - hgnc_id: "HGNC:218" - - ncbi_gene_id: 9569 - gene_symbol: GTF2IRD1 - hgnc_id: "HGNC:4661" - - ncbi_gene_id: 9632 - gene_symbol: SEC24C - hgnc_id: "HGNC:10705" - - ncbi_gene_id: 9652 - gene_symbol: SKIC3 - hgnc_id: "HGNC:23639" - - ncbi_gene_id: 9719 - gene_symbol: ADAMTSL2 - hgnc_id: "HGNC:14631" - - ncbi_gene_id: 9791 - gene_symbol: PTDSS1 - hgnc_id: "HGNC:9587" - - ncbi_gene_id: 9897 - gene_symbol: WASHC5 - hgnc_id: "HGNC:28984" - - ncbi_gene_id: 9968 - gene_symbol: MED12 - hgnc_id: "HGNC:11957" - - ncbi_gene_id: 9993 - gene_symbol: DGCR2 - hgnc_id: "HGNC:2845" - - ncbi_gene_id: 10020 - gene_symbol: GNE - hgnc_id: "HGNC:23657" - - ncbi_gene_id: 10056 - gene_symbol: FARSB - hgnc_id: "HGNC:17800" - - ncbi_gene_id: 10093 - gene_symbol: ARPC4 - hgnc_id: "HGNC:707" - - ncbi_gene_id: 10128 - gene_symbol: LRPPRC - hgnc_id: "HGNC:15714" - - ncbi_gene_id: 10220 - gene_symbol: GDF11 - hgnc_id: "HGNC:4216" - - ncbi_gene_id: 10243 - gene_symbol: GPHN - hgnc_id: "HGNC:15465" - - ncbi_gene_id: 10265 - gene_symbol: IRX5 - hgnc_id: "HGNC:14361" - - ncbi_gene_id: 10283 - gene_symbol: CWC27 - hgnc_id: "HGNC:10664" - - ncbi_gene_id: 10297 - gene_symbol: APC2 - hgnc_id: "HGNC:24036" - - ncbi_gene_id: 10516 - gene_symbol: FBLN5 - hgnc_id: "HGNC:3602" - - ncbi_gene_id: 10526 - gene_symbol: IPO8 - hgnc_id: "HGNC:9853" - - ncbi_gene_id: 10664 - gene_symbol: CTCF - hgnc_id: "HGNC:13723" - - ncbi_gene_id: 10683 - gene_symbol: DLL3 - hgnc_id: "HGNC:2909" - - ncbi_gene_id: 10765 - gene_symbol: KDM5B - hgnc_id: "HGNC:18039" - - ncbi_gene_id: 10847 - gene_symbol: SRCAP - hgnc_id: "HGNC:16974" - - ncbi_gene_id: 10907 - gene_symbol: TXNL4A - hgnc_id: "HGNC:30551" - - ncbi_gene_id: 10982 - gene_symbol: MAPRE2 - hgnc_id: "HGNC:6891" - - ncbi_gene_id: 10984 - gene_symbol: KCNQ1OT1 - hgnc_id: "HGNC:6295" - - ncbi_gene_id: 11107 - gene_symbol: PRDM5 - hgnc_id: "HGNC:9349" - - ncbi_gene_id: 11342 - gene_symbol: RNF13 - hgnc_id: "HGNC:10057" - - ncbi_gene_id: 22827 - gene_symbol: PUF60 - hgnc_id: "HGNC:17042" - - ncbi_gene_id: 22872 - gene_symbol: SEC31A - hgnc_id: "HGNC:17052" - - ncbi_gene_id: 23112 - gene_symbol: TNRC6B - hgnc_id: "HGNC:29190" - - ncbi_gene_id: 23126 - gene_symbol: POGZ - hgnc_id: "HGNC:18801" - - ncbi_gene_id: 23291 - gene_symbol: FBXW11 - hgnc_id: "HGNC:13607" - - ncbi_gene_id: 23314 - gene_symbol: SATB2 - hgnc_id: "HGNC:21637" - - ncbi_gene_id: 23322 - gene_symbol: RPGRIP1L - hgnc_id: "HGNC:29168" - - ncbi_gene_id: 23347 - gene_symbol: SMCHD1 - hgnc_id: "HGNC:29090" - - ncbi_gene_id: 23394 - gene_symbol: ADNP - hgnc_id: "HGNC:15766" - - ncbi_gene_id: 23405 - gene_symbol: DICER1 - hgnc_id: "HGNC:17098" - - ncbi_gene_id: 23483 - gene_symbol: TGDS - hgnc_id: "HGNC:20324" - - ncbi_gene_id: 23493 - gene_symbol: HEY2 - hgnc_id: "HGNC:4881" - - ncbi_gene_id: 23512 - gene_symbol: SUZ12 - hgnc_id: "HGNC:17101" - - ncbi_gene_id: 23545 - gene_symbol: ATP6V0A2 - hgnc_id: "HGNC:18481" - - ncbi_gene_id: 23729 - gene_symbol: SHPK - hgnc_id: "HGNC:1492" - - ncbi_gene_id: 25782 - gene_symbol: RAB3GAP2 - hgnc_id: "HGNC:17168" - - ncbi_gene_id: 25836 - gene_symbol: NIPBL - hgnc_id: "HGNC:28862" - - ncbi_gene_id: 25942 - gene_symbol: SIN3A - hgnc_id: "HGNC:19353" - - ncbi_gene_id: 26040 - gene_symbol: SETBP1 - hgnc_id: "HGNC:15573" - - ncbi_gene_id: 26053 - gene_symbol: AUTS2 - hgnc_id: "HGNC:14262" - - ncbi_gene_id: 26227 - gene_symbol: PHGDH - hgnc_id: "HGNC:8923" - - ncbi_gene_id: 26229 - gene_symbol: B3GAT3 - hgnc_id: "HGNC:923" - - ncbi_gene_id: 26608 - gene_symbol: TBL2 - hgnc_id: "HGNC:11586" - - ncbi_gene_id: 27031 - gene_symbol: NPHP3 - hgnc_id: "HGNC:7907" - - ncbi_gene_id: 28952 - gene_symbol: CCDC22 - hgnc_id: "HGNC:28909" - - ncbi_gene_id: 29072 - gene_symbol: SETD2 - hgnc_id: "HGNC:18420" - - ncbi_gene_id: 29940 - gene_symbol: DSE - hgnc_id: "HGNC:21144" - - ncbi_gene_id: 29969 - gene_symbol: MDFIC - hgnc_id: "HGNC:28870" - - ncbi_gene_id: 30008 - gene_symbol: EFEMP2 - hgnc_id: "HGNC:3219" - - ncbi_gene_id: 51085 - gene_symbol: MLXIPL - hgnc_id: "HGNC:12744" - - ncbi_gene_id: 51360 - gene_symbol: MBTPS2 - hgnc_id: "HGNC:15455" - - ncbi_gene_id: 51780 - gene_symbol: KDM3B - hgnc_id: "HGNC:1337" - - ncbi_gene_id: 54101 - gene_symbol: RIPK4 - hgnc_id: "HGNC:496" - - ncbi_gene_id: 54487 - gene_symbol: DGCR8 - hgnc_id: "HGNC:2847" - - ncbi_gene_id: 54499 - gene_symbol: TMCO1 - hgnc_id: "HGNC:18188" - - ncbi_gene_id: 54914 - gene_symbol: FOCAD - hgnc_id: "HGNC:23377" - - ncbi_gene_id: 54968 - gene_symbol: TMEM70 - hgnc_id: "HGNC:26050" - - ncbi_gene_id: 55033 - gene_symbol: FKBP14 - hgnc_id: "HGNC:18625" - - ncbi_gene_id: 55384 - gene_symbol: MEG3 - hgnc_id: "HGNC:14575" - - ncbi_gene_id: 55503 - gene_symbol: TRPV6 - hgnc_id: "HGNC:14006" - - ncbi_gene_id: 55617 - gene_symbol: TASP1 - hgnc_id: "HGNC:15859" - - ncbi_gene_id: 55690 - gene_symbol: PACS1 - hgnc_id: "HGNC:30032" - - ncbi_gene_id: 55764 - gene_symbol: IFT122 - hgnc_id: "HGNC:13556" - - ncbi_gene_id: 56623 - gene_symbol: INPP5E - hgnc_id: "HGNC:21474" - - ncbi_gene_id: 57492 - gene_symbol: ARID1B - hgnc_id: "HGNC:18040" - - ncbi_gene_id: 57539 - gene_symbol: WDR35 - hgnc_id: "HGNC:29250" - - ncbi_gene_id: 57545 - gene_symbol: CC2D2A - hgnc_id: "HGNC:29253" - - ncbi_gene_id: 57589 - gene_symbol: RIC1 - hgnc_id: "HGNC:17686" - - ncbi_gene_id: 57728 - gene_symbol: WDR19 - hgnc_id: "HGNC:18340" - - ncbi_gene_id: 58508 - gene_symbol: KMT2C - hgnc_id: "HGNC:13726" - - ncbi_gene_id: 63895 - gene_symbol: PIEZO2 - hgnc_id: "HGNC:26270" - - ncbi_gene_id: 64175 - gene_symbol: P3H1 - hgnc_id: "HGNC:19316" - - ncbi_gene_id: 64220 - gene_symbol: STRA6 - hgnc_id: "HGNC:30650" - - ncbi_gene_id: 64324 - gene_symbol: NSD1 - hgnc_id: "HGNC:14234" - - ncbi_gene_id: 64359 - gene_symbol: NXN - hgnc_id: "HGNC:18008" - - ncbi_gene_id: 64412 - gene_symbol: GZF1 - hgnc_id: "HGNC:15808" - - ncbi_gene_id: 64840 - gene_symbol: PORCN - hgnc_id: "HGNC:17652" - - ncbi_gene_id: 79158 - gene_symbol: GNPTAB - hgnc_id: "HGNC:29670" - - ncbi_gene_id: 79633 - gene_symbol: FAT4 - hgnc_id: "HGNC:23109" - - ncbi_gene_id: 79813 - gene_symbol: EHMT1 - hgnc_id: "HGNC:24650" - - ncbi_gene_id: 79989 - gene_symbol: IFT56 - hgnc_id: "HGNC:21882" - - ncbi_gene_id: 81031 - gene_symbol: SLC2A10 - hgnc_id: "HGNC:13444" - - ncbi_gene_id: 81857 - gene_symbol: MED25 - hgnc_id: "HGNC:28845" - - ncbi_gene_id: 84068 - gene_symbol: SLC10A7 - hgnc_id: "HGNC:23088" - - ncbi_gene_id: 84163 - gene_symbol: GTF2IRD2 - hgnc_id: "HGNC:30775" - - ncbi_gene_id: 84277 - gene_symbol: DNAJC30 - hgnc_id: "HGNC:16410" - - ncbi_gene_id: 84314 - gene_symbol: TMEM107 - hgnc_id: "HGNC:28128" - - ncbi_gene_id: 84667 - gene_symbol: HES7 - hgnc_id: "HGNC:15977" - - ncbi_gene_id: 84896 - gene_symbol: ATAD1 - hgnc_id: "HGNC:25903" - - ncbi_gene_id: 84992 - gene_symbol: PIGY - hgnc_id: "HGNC:28213" - - ncbi_gene_id: 91147 - gene_symbol: TMEM67 - hgnc_id: "HGNC:28396" - - ncbi_gene_id: 92579 - gene_symbol: G6PC3 - hgnc_id: "HGNC:24861" - - ncbi_gene_id: 94005 - gene_symbol: PIGS - hgnc_id: "HGNC:14937" - - ncbi_gene_id: 113189 - gene_symbol: CHST14 - hgnc_id: "HGNC:24464" - - ncbi_gene_id: 114049 - gene_symbol: BUD23 - hgnc_id: "HGNC:16405" - - ncbi_gene_id: 123263 - gene_symbol: MTFMT - hgnc_id: "HGNC:29666" - - ncbi_gene_id: 129563 - gene_symbol: DIS3L2 - hgnc_id: "HGNC:28648" - - ncbi_gene_id: 134701 - gene_symbol: RIPPLY2 - hgnc_id: "HGNC:21390" - - ncbi_gene_id: 135886 - gene_symbol: TMEM270 - hgnc_id: "HGNC:23018" - - ncbi_gene_id: 145173 - gene_symbol: B3GLCT - hgnc_id: "HGNC:20207" - - ncbi_gene_id: 145873 - gene_symbol: MESP2 - hgnc_id: "HGNC:29659" - - ncbi_gene_id: 149461 - gene_symbol: CLDN19 - hgnc_id: "HGNC:2040" - - ncbi_gene_id: 155368 - gene_symbol: METTL27 - hgnc_id: "HGNC:19068" - - ncbi_gene_id: 155382 - gene_symbol: VPS37D - hgnc_id: "HGNC:18287" - - ncbi_gene_id: 168667 - gene_symbol: BMPER - hgnc_id: "HGNC:24154" - - ncbi_gene_id: 170302 - gene_symbol: ARX - hgnc_id: "HGNC:18060" - - ncbi_gene_id: 197257 - gene_symbol: LDHD - hgnc_id: "HGNC:19708" - - ncbi_gene_id: 203068 - gene_symbol: TUBB - hgnc_id: "HGNC:20778" - - ncbi_gene_id: 221037 - gene_symbol: JMJD1C - hgnc_id: "HGNC:12313" - - ncbi_gene_id: 221927 - gene_symbol: BRAT1 - hgnc_id: "HGNC:21701" - - ncbi_gene_id: 259232 - gene_symbol: NALCN - hgnc_id: "HGNC:19082" - - ncbi_gene_id: 283120 - gene_symbol: H19 - hgnc_id: "HGNC:4713" - - ncbi_gene_id: 284098 - gene_symbol: PIGW - hgnc_id: "HGNC:23213" - - ncbi_gene_id: 285590 - gene_symbol: SH3PXD2B - hgnc_id: "HGNC:29242" - - ncbi_gene_id: 339983 - gene_symbol: NAT8L - hgnc_id: "HGNC:26742" - - ncbi_gene_id: 374654 - gene_symbol: KIF7 - hgnc_id: "HGNC:30497" - - ncbi_gene_id: 388015 - gene_symbol: RTL1 - hgnc_id: "HGNC:14665" - - ncbi_gene_id: 653361 - gene_symbol: NCF1 - hgnc_id: "HGNC:7660" - diff --git a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_exact_no_genes.snap b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_exact_no_genes.snap index 40ce5ec..051839c 100644 --- a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_exact_no_genes.snap +++ b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_exact_no_genes.snap @@ -8,10 +8,26 @@ version: query: term_id: ~ name: Inguinal hernia - match_: ~ max_results: 100 genes: false result: - term_id: "HP:0000023" name: Inguinal hernia + definition: Protrusion of the contents of the abdominal cavity through the inguinal canal. + synonyms: ~ + xrefs: + - "MEDDRA:10022016" + - "MSH:D006552" + - "SNOMEDCT_US:396232000" + - "UMLS:C0019294" + - term_id: "HP:0100541" + name: Femoral hernia + definition: "A hernia which occurs just below the inguinal ligament, where abdominal contents pass through a naturally occurring weakness called the femoral canal." + synonyms: + - Crural hernia + xrefs: + - "MEDDRA:10016434" + - "MSH:D006550" + - "SNOMEDCT_US:50063009" + - "UMLS:C0019288" diff --git a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_exact_with_genes.snap b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_exact_with_genes.snap index 801514a..9b2eea0 100644 --- a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_exact_with_genes.snap +++ b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_exact_with_genes.snap @@ -8,12 +8,18 @@ version: query: term_id: ~ name: Inguinal hernia - match_: ~ max_results: 100 genes: true result: - term_id: "HP:0000023" name: Inguinal hernia + definition: Protrusion of the contents of the abdominal cavity through the inguinal canal. + synonyms: ~ + xrefs: + - "MEDDRA:10022016" + - "MSH:D006552" + - "SNOMEDCT_US:396232000" + - "UMLS:C0019294" genes: - ncbi_gene_id: 59 gene_symbol: ACTA2 @@ -891,4 +897,69 @@ result: - ncbi_gene_id: 653361 gene_symbol: NCF1 hgnc_id: "HGNC:7660" + - term_id: "HP:0100541" + name: Femoral hernia + definition: "A hernia which occurs just below the inguinal ligament, where abdominal contents pass through a naturally occurring weakness called the femoral canal." + synonyms: + - Crural hernia + xrefs: + - "MEDDRA:10016434" + - "MSH:D006550" + - "SNOMEDCT_US:50063009" + - "UMLS:C0019288" + genes: + - ncbi_gene_id: 538 + gene_symbol: ATP7A + hgnc_id: "HGNC:869" + - ncbi_gene_id: 1277 + gene_symbol: COL1A1 + hgnc_id: "HGNC:2197" + - ncbi_gene_id: 1278 + gene_symbol: COL1A2 + hgnc_id: "HGNC:2198" + - ncbi_gene_id: 1836 + gene_symbol: SLC26A2 + hgnc_id: "HGNC:10994" + - ncbi_gene_id: 1855 + gene_symbol: DVL1 + hgnc_id: "HGNC:3084" + - ncbi_gene_id: 1857 + gene_symbol: DVL3 + hgnc_id: "HGNC:3087" + - ncbi_gene_id: 2187 + gene_symbol: FANCB + hgnc_id: "HGNC:3583" + - ncbi_gene_id: 2535 + gene_symbol: FZD2 + hgnc_id: "HGNC:4040" + - ncbi_gene_id: 4089 + gene_symbol: SMAD4 + hgnc_id: "HGNC:6770" + - ncbi_gene_id: 6899 + gene_symbol: TBX1 + hgnc_id: "HGNC:11592" + - ncbi_gene_id: 7474 + gene_symbol: WNT5A + hgnc_id: "HGNC:12784" + - ncbi_gene_id: 9321 + gene_symbol: TRIP11 + hgnc_id: "HGNC:12305" + - ncbi_gene_id: 9509 + gene_symbol: ADAMTS2 + hgnc_id: "HGNC:218" + - ncbi_gene_id: 9719 + gene_symbol: ADAMTSL2 + hgnc_id: "HGNC:14631" + - ncbi_gene_id: 9791 + gene_symbol: PTDSS1 + hgnc_id: "HGNC:9587" + - ncbi_gene_id: 79813 + gene_symbol: EHMT1 + hgnc_id: "HGNC:24650" + - ncbi_gene_id: 81031 + gene_symbol: SLC2A10 + hgnc_id: "HGNC:13444" + - ncbi_gene_id: 129563 + gene_symbol: DIS3L2 + hgnc_id: "HGNC:28648" diff --git a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_fuzzy_no_genes.snap b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_fuzzy_no_genes.snap new file mode 100644 index 0000000..0c8095b --- /dev/null +++ b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_fuzzy_no_genes.snap @@ -0,0 +1,33 @@ +--- +source: src/server/actix_server/hpo_terms.rs +expression: "&run_query(\"/hpo/terms?name=Inguinal+hern\").await?" +--- +version: + hpo: 2023-04-05 + viguno: 0.0.0 +query: + term_id: ~ + name: Inguinal hern + max_results: 100 + genes: false +result: + - term_id: "HP:0000023" + name: Inguinal hernia + definition: Protrusion of the contents of the abdominal cavity through the inguinal canal. + synonyms: ~ + xrefs: + - "MEDDRA:10022016" + - "MSH:D006552" + - "SNOMEDCT_US:396232000" + - "UMLS:C0019294" + - term_id: "HP:0100541" + name: Femoral hernia + definition: "A hernia which occurs just below the inguinal ligament, where abdominal contents pass through a naturally occurring weakness called the femoral canal." + synonyms: + - Crural hernia + xrefs: + - "MEDDRA:10016434" + - "MSH:D006550" + - "SNOMEDCT_US:50063009" + - "UMLS:C0019288" + diff --git a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_prefix_with_genes.snap b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_fuzzy_with_genes.snap similarity index 91% rename from src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_prefix_with_genes.snap rename to src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_fuzzy_with_genes.snap index 2ca537e..e2067cf 100644 --- a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_prefix_with_genes.snap +++ b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_fuzzy_with_genes.snap @@ -1,6 +1,6 @@ --- source: src/server/actix_server/hpo_terms.rs -expression: "&run_query(\"/hpo/terms?name=Inguinal+hern&match=prefix&genes=true\").await?" +expression: "&run_query(\"/hpo/terms?name=Inguinal+hern&genes=true\").await?" --- version: hpo: 2023-04-05 @@ -8,12 +8,18 @@ version: query: term_id: ~ name: Inguinal hern - match_: prefix max_results: 100 genes: true result: - term_id: "HP:0000023" name: Inguinal hernia + definition: Protrusion of the contents of the abdominal cavity through the inguinal canal. + synonyms: ~ + xrefs: + - "MEDDRA:10022016" + - "MSH:D006552" + - "SNOMEDCT_US:396232000" + - "UMLS:C0019294" genes: - ncbi_gene_id: 59 gene_symbol: ACTA2 @@ -891,4 +897,69 @@ result: - ncbi_gene_id: 653361 gene_symbol: NCF1 hgnc_id: "HGNC:7660" + - term_id: "HP:0100541" + name: Femoral hernia + definition: "A hernia which occurs just below the inguinal ligament, where abdominal contents pass through a naturally occurring weakness called the femoral canal." + synonyms: + - Crural hernia + xrefs: + - "MEDDRA:10016434" + - "MSH:D006550" + - "SNOMEDCT_US:50063009" + - "UMLS:C0019288" + genes: + - ncbi_gene_id: 538 + gene_symbol: ATP7A + hgnc_id: "HGNC:869" + - ncbi_gene_id: 1277 + gene_symbol: COL1A1 + hgnc_id: "HGNC:2197" + - ncbi_gene_id: 1278 + gene_symbol: COL1A2 + hgnc_id: "HGNC:2198" + - ncbi_gene_id: 1836 + gene_symbol: SLC26A2 + hgnc_id: "HGNC:10994" + - ncbi_gene_id: 1855 + gene_symbol: DVL1 + hgnc_id: "HGNC:3084" + - ncbi_gene_id: 1857 + gene_symbol: DVL3 + hgnc_id: "HGNC:3087" + - ncbi_gene_id: 2187 + gene_symbol: FANCB + hgnc_id: "HGNC:3583" + - ncbi_gene_id: 2535 + gene_symbol: FZD2 + hgnc_id: "HGNC:4040" + - ncbi_gene_id: 4089 + gene_symbol: SMAD4 + hgnc_id: "HGNC:6770" + - ncbi_gene_id: 6899 + gene_symbol: TBX1 + hgnc_id: "HGNC:11592" + - ncbi_gene_id: 7474 + gene_symbol: WNT5A + hgnc_id: "HGNC:12784" + - ncbi_gene_id: 9321 + gene_symbol: TRIP11 + hgnc_id: "HGNC:12305" + - ncbi_gene_id: 9509 + gene_symbol: ADAMTS2 + hgnc_id: "HGNC:218" + - ncbi_gene_id: 9719 + gene_symbol: ADAMTSL2 + hgnc_id: "HGNC:14631" + - ncbi_gene_id: 9791 + gene_symbol: PTDSS1 + hgnc_id: "HGNC:9587" + - ncbi_gene_id: 79813 + gene_symbol: EHMT1 + hgnc_id: "HGNC:24650" + - ncbi_gene_id: 81031 + gene_symbol: SLC2A10 + hgnc_id: "HGNC:13444" + - ncbi_gene_id: 129563 + gene_symbol: DIS3L2 + hgnc_id: "HGNC:28648" diff --git a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_prefix_no_genes.snap b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_prefix_no_genes.snap deleted file mode 100644 index 1cf3fe8..0000000 --- a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_prefix_no_genes.snap +++ /dev/null @@ -1,17 +0,0 @@ ---- -source: src/server/actix_server/hpo_terms.rs -expression: "&run_query(\"/hpo/terms?name=Inguinal+hern&match=prefix\").await?" ---- -version: - hpo: 2023-04-05 - viguno: 0.0.0 -query: - term_id: ~ - name: Inguinal hern - match_: prefix - max_results: 100 - genes: false -result: - - term_id: "HP:0000023" - name: Inguinal hernia - diff --git a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_suffix_no_genes.snap b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_suffix_no_genes.snap deleted file mode 100644 index 9683df4..0000000 --- a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_suffix_no_genes.snap +++ /dev/null @@ -1,17 +0,0 @@ ---- -source: src/server/actix_server/hpo_terms.rs -expression: "&run_query(\"/hpo/terms?name=guinal+hernia&match=suffix\").await?" ---- -version: - hpo: 2023-04-05 - viguno: 0.0.0 -query: - term_id: ~ - name: guinal hernia - match_: suffix - max_results: 100 - genes: false -result: - - term_id: "HP:0000023" - name: Inguinal hernia - diff --git a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_suffix_with_genes.snap b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_suffix_with_genes.snap deleted file mode 100644 index 0cca3e7..0000000 --- a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_name_suffix_with_genes.snap +++ /dev/null @@ -1,894 +0,0 @@ ---- -source: src/server/actix_server/hpo_terms.rs -expression: "&run_query(\"/hpo/terms?name=guinal+hernia&match=suffix&genes=true\").await?" ---- -version: - hpo: 2023-04-05 - viguno: 0.0.0 -query: - term_id: ~ - name: guinal hernia - match_: suffix - max_results: 100 - genes: true -result: - - term_id: "HP:0000023" - name: Inguinal hernia - genes: - - ncbi_gene_id: 59 - gene_symbol: ACTA2 - hgnc_id: "HGNC:130" - - ncbi_gene_id: 165 - gene_symbol: AEBP1 - hgnc_id: "HGNC:303" - - ncbi_gene_id: 175 - gene_symbol: AGA - hgnc_id: "HGNC:318" - - ncbi_gene_id: 268 - gene_symbol: AMH - hgnc_id: "HGNC:464" - - ncbi_gene_id: 269 - gene_symbol: AMHR2 - hgnc_id: "HGNC:465" - - ncbi_gene_id: 367 - gene_symbol: AR - hgnc_id: "HGNC:644" - - ncbi_gene_id: 411 - gene_symbol: ARSB - hgnc_id: "HGNC:714" - - ncbi_gene_id: 421 - gene_symbol: ARVCF - hgnc_id: "HGNC:728" - - ncbi_gene_id: 477 - gene_symbol: ATP1A2 - hgnc_id: "HGNC:800" - - ncbi_gene_id: 523 - gene_symbol: ATP6V1A - hgnc_id: "HGNC:851" - - ncbi_gene_id: 529 - gene_symbol: ATP6V1E1 - hgnc_id: "HGNC:857" - - ncbi_gene_id: 538 - gene_symbol: ATP7A - hgnc_id: "HGNC:869" - - ncbi_gene_id: 613 - gene_symbol: BCR - hgnc_id: "HGNC:1014" - - ncbi_gene_id: 699 - gene_symbol: BUB1 - hgnc_id: "HGNC:1148" - - ncbi_gene_id: 715 - gene_symbol: C1R - hgnc_id: "HGNC:1246" - - ncbi_gene_id: 716 - gene_symbol: C1S - hgnc_id: "HGNC:1247" - - ncbi_gene_id: 871 - gene_symbol: SERPINH1 - hgnc_id: "HGNC:1546" - - ncbi_gene_id: 875 - gene_symbol: CBS - hgnc_id: "HGNC:1550" - - ncbi_gene_id: 998 - gene_symbol: CDC42 - hgnc_id: "HGNC:1736" - - ncbi_gene_id: 1028 - gene_symbol: CDKN1C - hgnc_id: "HGNC:1786" - - ncbi_gene_id: 1107 - gene_symbol: CHD3 - hgnc_id: "HGNC:1918" - - ncbi_gene_id: 1146 - gene_symbol: CHRNG - hgnc_id: "HGNC:1967" - - ncbi_gene_id: 1183 - gene_symbol: CLCN4 - hgnc_id: "HGNC:2022" - - ncbi_gene_id: 1277 - gene_symbol: COL1A1 - hgnc_id: "HGNC:2197" - - ncbi_gene_id: 1278 - gene_symbol: COL1A2 - hgnc_id: "HGNC:2198" - - ncbi_gene_id: 1280 - gene_symbol: COL2A1 - hgnc_id: "HGNC:2200" - - ncbi_gene_id: 1281 - gene_symbol: COL3A1 - hgnc_id: "HGNC:2201" - - ncbi_gene_id: 1289 - gene_symbol: COL5A1 - hgnc_id: "HGNC:2209" - - ncbi_gene_id: 1290 - gene_symbol: COL5A2 - hgnc_id: "HGNC:2210" - - ncbi_gene_id: 1312 - gene_symbol: COMT - hgnc_id: "HGNC:2228" - - ncbi_gene_id: 1387 - gene_symbol: CREBBP - hgnc_id: "HGNC:2348" - - ncbi_gene_id: 1399 - gene_symbol: CRKL - hgnc_id: "HGNC:2363" - - ncbi_gene_id: 1457 - gene_symbol: CSNK2A1 - hgnc_id: "HGNC:2457" - - ncbi_gene_id: 1501 - gene_symbol: CTNND2 - hgnc_id: "HGNC:2516" - - ncbi_gene_id: 1656 - gene_symbol: DDX6 - hgnc_id: "HGNC:2747" - - ncbi_gene_id: 1801 - gene_symbol: DPH1 - hgnc_id: "HGNC:3003" - - ncbi_gene_id: 1836 - gene_symbol: SLC26A2 - hgnc_id: "HGNC:10994" - - ncbi_gene_id: 1855 - gene_symbol: DVL1 - hgnc_id: "HGNC:3084" - - ncbi_gene_id: 1857 - gene_symbol: DVL3 - hgnc_id: "HGNC:3087" - - ncbi_gene_id: 1859 - gene_symbol: DYRK1A - hgnc_id: "HGNC:3091" - - ncbi_gene_id: 1861 - gene_symbol: TOR1A - hgnc_id: "HGNC:3098" - - ncbi_gene_id: 2006 - gene_symbol: ELN - hgnc_id: "HGNC:3327" - - ncbi_gene_id: 2146 - gene_symbol: EZH2 - hgnc_id: "HGNC:3527" - - ncbi_gene_id: 2187 - gene_symbol: FANCB - hgnc_id: "HGNC:3583" - - ncbi_gene_id: 2200 - gene_symbol: FBN1 - hgnc_id: "HGNC:3603" - - ncbi_gene_id: 2239 - gene_symbol: GPC4 - hgnc_id: "HGNC:4452" - - ncbi_gene_id: 2245 - gene_symbol: FGD1 - hgnc_id: "HGNC:3663" - - ncbi_gene_id: 2260 - gene_symbol: FGFR1 - hgnc_id: "HGNC:3688" - - ncbi_gene_id: 2301 - gene_symbol: FOXE3 - hgnc_id: "HGNC:3808" - - ncbi_gene_id: 2313 - gene_symbol: FLI1 - hgnc_id: "HGNC:3749" - - ncbi_gene_id: 2316 - gene_symbol: FLNA - hgnc_id: "HGNC:3754" - - ncbi_gene_id: 2317 - gene_symbol: FLNB - hgnc_id: "HGNC:3755" - - ncbi_gene_id: 2535 - gene_symbol: FZD2 - hgnc_id: "HGNC:4040" - - ncbi_gene_id: 2542 - gene_symbol: SLC37A4 - hgnc_id: "HGNC:4061" - - ncbi_gene_id: 2588 - gene_symbol: GALNS - hgnc_id: "HGNC:4122" - - ncbi_gene_id: 2626 - gene_symbol: GATA4 - hgnc_id: "HGNC:4173" - - ncbi_gene_id: 2627 - gene_symbol: GATA6 - hgnc_id: "HGNC:4174" - - ncbi_gene_id: 2657 - gene_symbol: GDF1 - hgnc_id: "HGNC:4214" - - ncbi_gene_id: 2719 - gene_symbol: GPC3 - hgnc_id: "HGNC:4451" - - ncbi_gene_id: 2720 - gene_symbol: GLB1 - hgnc_id: "HGNC:4298" - - ncbi_gene_id: 2737 - gene_symbol: GLI3 - hgnc_id: "HGNC:4319" - - ncbi_gene_id: 2741 - gene_symbol: GLRA1 - hgnc_id: "HGNC:4326" - - ncbi_gene_id: 2783 - gene_symbol: GNB2 - hgnc_id: "HGNC:4398" - - ncbi_gene_id: 2799 - gene_symbol: GNS - hgnc_id: "HGNC:4422" - - ncbi_gene_id: 2812 - gene_symbol: GP1BB - hgnc_id: "HGNC:4440" - - ncbi_gene_id: 2904 - gene_symbol: GRIN2B - hgnc_id: "HGNC:4586" - - ncbi_gene_id: 2969 - gene_symbol: GTF2I - hgnc_id: "HGNC:4659" - - ncbi_gene_id: 2972 - gene_symbol: BRF1 - hgnc_id: "HGNC:11551" - - ncbi_gene_id: 2990 - gene_symbol: GUSB - hgnc_id: "HGNC:4696" - - ncbi_gene_id: 3339 - gene_symbol: HSPG2 - hgnc_id: "HGNC:5273" - - ncbi_gene_id: 3423 - gene_symbol: IDS - hgnc_id: "HGNC:5389" - - ncbi_gene_id: 3425 - gene_symbol: IDUA - hgnc_id: "HGNC:5391" - - ncbi_gene_id: 3481 - gene_symbol: IGF2 - hgnc_id: "HGNC:5466" - - ncbi_gene_id: 3670 - gene_symbol: ISL1 - hgnc_id: "HGNC:6132" - - ncbi_gene_id: 3955 - gene_symbol: LFNG - hgnc_id: "HGNC:6560" - - ncbi_gene_id: 3984 - gene_symbol: LIMK1 - hgnc_id: "HGNC:6613" - - ncbi_gene_id: 4015 - gene_symbol: LOX - hgnc_id: "HGNC:6664" - - ncbi_gene_id: 4052 - gene_symbol: LTBP1 - hgnc_id: "HGNC:6714" - - ncbi_gene_id: 4087 - gene_symbol: SMAD2 - hgnc_id: "HGNC:6768" - - ncbi_gene_id: 4088 - gene_symbol: SMAD3 - hgnc_id: "HGNC:6769" - - ncbi_gene_id: 4089 - gene_symbol: SMAD4 - hgnc_id: "HGNC:6770" - - ncbi_gene_id: 4094 - gene_symbol: MAF - hgnc_id: "HGNC:6776" - - ncbi_gene_id: 4125 - gene_symbol: MAN2B1 - hgnc_id: "HGNC:6826" - - ncbi_gene_id: 4144 - gene_symbol: MAT2A - hgnc_id: "HGNC:6904" - - ncbi_gene_id: 4212 - gene_symbol: MEIS2 - hgnc_id: "HGNC:7001" - - ncbi_gene_id: 4281 - gene_symbol: MID1 - hgnc_id: "HGNC:7095" - - ncbi_gene_id: 4621 - gene_symbol: MYH3 - hgnc_id: "HGNC:7573" - - ncbi_gene_id: 4629 - gene_symbol: MYH11 - hgnc_id: "HGNC:7569" - - ncbi_gene_id: 4638 - gene_symbol: MYLK - hgnc_id: "HGNC:7590" - - ncbi_gene_id: 4702 - gene_symbol: NDUFA8 - hgnc_id: "HGNC:7692" - - ncbi_gene_id: 4758 - gene_symbol: NEU1 - hgnc_id: "HGNC:7758" - - ncbi_gene_id: 4774 - gene_symbol: NFIA - hgnc_id: "HGNC:7784" - - ncbi_gene_id: 4851 - gene_symbol: NOTCH1 - hgnc_id: "HGNC:7881" - - ncbi_gene_id: 4853 - gene_symbol: NOTCH2 - hgnc_id: "HGNC:7882" - - ncbi_gene_id: 4854 - gene_symbol: NOTCH3 - hgnc_id: "HGNC:7883" - - ncbi_gene_id: 4920 - gene_symbol: ROR2 - hgnc_id: "HGNC:10257" - - ncbi_gene_id: 4952 - gene_symbol: OCRL - hgnc_id: "HGNC:8108" - - ncbi_gene_id: 4953 - gene_symbol: ODC1 - hgnc_id: "HGNC:8109" - - ncbi_gene_id: 5048 - gene_symbol: PAFAH1B1 - hgnc_id: "HGNC:8574" - - ncbi_gene_id: 5295 - gene_symbol: PIK3R1 - hgnc_id: "HGNC:8979" - - ncbi_gene_id: 5324 - gene_symbol: PLAG1 - hgnc_id: "HGNC:9045" - - ncbi_gene_id: 5337 - gene_symbol: PLD1 - hgnc_id: "HGNC:9067" - - ncbi_gene_id: 5351 - gene_symbol: PLOD1 - hgnc_id: "HGNC:9081" - - ncbi_gene_id: 5352 - gene_symbol: PLOD2 - hgnc_id: "HGNC:9082" - - ncbi_gene_id: 5430 - gene_symbol: POLR2A - hgnc_id: "HGNC:9187" - - ncbi_gene_id: 5515 - gene_symbol: PPP2CA - hgnc_id: "HGNC:9299" - - ncbi_gene_id: 5518 - gene_symbol: PPP2R1A - hgnc_id: "HGNC:9302" - - ncbi_gene_id: 5592 - gene_symbol: PRKG1 - hgnc_id: "HGNC:9414" - - ncbi_gene_id: 5594 - gene_symbol: MAPK1 - hgnc_id: "HGNC:6871" - - ncbi_gene_id: 5826 - gene_symbol: ABCD4 - hgnc_id: "HGNC:68" - - ncbi_gene_id: 5831 - gene_symbol: PYCR1 - hgnc_id: "HGNC:9721" - - ncbi_gene_id: 5832 - gene_symbol: ALDH18A1 - hgnc_id: "HGNC:9722" - - ncbi_gene_id: 5982 - gene_symbol: RFC2 - hgnc_id: "HGNC:9970" - - ncbi_gene_id: 6134 - gene_symbol: RPL10 - hgnc_id: "HGNC:10298" - - ncbi_gene_id: 6197 - gene_symbol: RPS6KA3 - hgnc_id: "HGNC:10432" - - ncbi_gene_id: 6239 - gene_symbol: RREB1 - hgnc_id: "HGNC:10449" - - ncbi_gene_id: 6418 - gene_symbol: SET - hgnc_id: "HGNC:10760" - - ncbi_gene_id: 6448 - gene_symbol: SGSH - hgnc_id: "HGNC:10818" - - ncbi_gene_id: 6497 - gene_symbol: SKI - hgnc_id: "HGNC:10896" - - ncbi_gene_id: 6499 - gene_symbol: SKIC2 - hgnc_id: "HGNC:10898" - - ncbi_gene_id: 6595 - gene_symbol: SMARCA2 - hgnc_id: "HGNC:11098" - - ncbi_gene_id: 6598 - gene_symbol: SMARCB1 - hgnc_id: "HGNC:11103" - - ncbi_gene_id: 6601 - gene_symbol: SMARCC2 - hgnc_id: "HGNC:11105" - - ncbi_gene_id: 6785 - gene_symbol: ELOVL4 - hgnc_id: "HGNC:14415" - - ncbi_gene_id: 6804 - gene_symbol: STX1A - hgnc_id: "HGNC:11433" - - ncbi_gene_id: 6899 - gene_symbol: TBX1 - hgnc_id: "HGNC:11592" - - ncbi_gene_id: 6926 - gene_symbol: TBX3 - hgnc_id: "HGNC:11602" - - ncbi_gene_id: 6935 - gene_symbol: ZEB1 - hgnc_id: "HGNC:11642" - - ncbi_gene_id: 7042 - gene_symbol: TGFB2 - hgnc_id: "HGNC:11768" - - ncbi_gene_id: 7043 - gene_symbol: TGFB3 - hgnc_id: "HGNC:11769" - - ncbi_gene_id: 7046 - gene_symbol: TGFBR1 - hgnc_id: "HGNC:11772" - - ncbi_gene_id: 7048 - gene_symbol: TGFBR2 - hgnc_id: "HGNC:11773" - - ncbi_gene_id: 7290 - gene_symbol: HIRA - hgnc_id: "HGNC:4916" - - ncbi_gene_id: 7317 - gene_symbol: UBA1 - hgnc_id: "HGNC:12469" - - ncbi_gene_id: 7353 - gene_symbol: UFD1 - hgnc_id: "HGNC:12520" - - ncbi_gene_id: 7458 - gene_symbol: EIF4H - hgnc_id: "HGNC:12741" - - ncbi_gene_id: 7461 - gene_symbol: CLIP2 - hgnc_id: "HGNC:2586" - - ncbi_gene_id: 7474 - gene_symbol: WNT5A - hgnc_id: "HGNC:12784" - - ncbi_gene_id: 7518 - gene_symbol: XRCC4 - hgnc_id: "HGNC:12831" - - ncbi_gene_id: 7531 - gene_symbol: YWHAE - hgnc_id: "HGNC:12851" - - ncbi_gene_id: 8036 - gene_symbol: SHOC2 - hgnc_id: "HGNC:15454" - - ncbi_gene_id: 8076 - gene_symbol: MFAP5 - hgnc_id: "HGNC:29673" - - ncbi_gene_id: 8091 - gene_symbol: HMGA2 - hgnc_id: "HGNC:5009" - - ncbi_gene_id: 8214 - gene_symbol: DGCR6 - hgnc_id: "HGNC:2846" - - ncbi_gene_id: 8220 - gene_symbol: ESS2 - hgnc_id: "HGNC:16817" - - ncbi_gene_id: 8260 - gene_symbol: NAA10 - hgnc_id: "HGNC:18704" - - ncbi_gene_id: 8289 - gene_symbol: ARID1A - hgnc_id: "HGNC:11110" - - ncbi_gene_id: 8295 - gene_symbol: TRRAP - hgnc_id: "HGNC:12347" - - ncbi_gene_id: 8425 - gene_symbol: LTBP4 - hgnc_id: "HGNC:6717" - - ncbi_gene_id: 8443 - gene_symbol: GNPAT - hgnc_id: "HGNC:4416" - - ncbi_gene_id: 8450 - gene_symbol: CUL4B - hgnc_id: "HGNC:2555" - - ncbi_gene_id: 8468 - gene_symbol: FKBP6 - hgnc_id: "HGNC:3722" - - ncbi_gene_id: 8481 - gene_symbol: OFD1 - hgnc_id: "HGNC:2567" - - ncbi_gene_id: 8626 - gene_symbol: TP63 - hgnc_id: "HGNC:15979" - - ncbi_gene_id: 8720 - gene_symbol: MBTPS1 - hgnc_id: "HGNC:15456" - - ncbi_gene_id: 8726 - gene_symbol: EED - hgnc_id: "HGNC:3188" - - ncbi_gene_id: 8788 - gene_symbol: DLK1 - hgnc_id: "HGNC:2907" - - ncbi_gene_id: 8884 - gene_symbol: SLC5A6 - hgnc_id: "HGNC:11041" - - ncbi_gene_id: 8905 - gene_symbol: AP1S2 - hgnc_id: "HGNC:560" - - ncbi_gene_id: 9031 - gene_symbol: BAZ1B - hgnc_id: "HGNC:961" - - ncbi_gene_id: 9037 - gene_symbol: SEMA5A - hgnc_id: "HGNC:10736" - - ncbi_gene_id: 9091 - gene_symbol: PIGQ - hgnc_id: "HGNC:14135" - - ncbi_gene_id: 9158 - gene_symbol: FIBP - hgnc_id: "HGNC:3705" - - ncbi_gene_id: 9275 - gene_symbol: BCL7B - hgnc_id: "HGNC:1005" - - ncbi_gene_id: 9469 - gene_symbol: CHST3 - hgnc_id: "HGNC:1971" - - ncbi_gene_id: 9509 - gene_symbol: ADAMTS2 - hgnc_id: "HGNC:218" - - ncbi_gene_id: 9569 - gene_symbol: GTF2IRD1 - hgnc_id: "HGNC:4661" - - ncbi_gene_id: 9632 - gene_symbol: SEC24C - hgnc_id: "HGNC:10705" - - ncbi_gene_id: 9652 - gene_symbol: SKIC3 - hgnc_id: "HGNC:23639" - - ncbi_gene_id: 9719 - gene_symbol: ADAMTSL2 - hgnc_id: "HGNC:14631" - - ncbi_gene_id: 9791 - gene_symbol: PTDSS1 - hgnc_id: "HGNC:9587" - - ncbi_gene_id: 9897 - gene_symbol: WASHC5 - hgnc_id: "HGNC:28984" - - ncbi_gene_id: 9968 - gene_symbol: MED12 - hgnc_id: "HGNC:11957" - - ncbi_gene_id: 9993 - gene_symbol: DGCR2 - hgnc_id: "HGNC:2845" - - ncbi_gene_id: 10020 - gene_symbol: GNE - hgnc_id: "HGNC:23657" - - ncbi_gene_id: 10056 - gene_symbol: FARSB - hgnc_id: "HGNC:17800" - - ncbi_gene_id: 10093 - gene_symbol: ARPC4 - hgnc_id: "HGNC:707" - - ncbi_gene_id: 10128 - gene_symbol: LRPPRC - hgnc_id: "HGNC:15714" - - ncbi_gene_id: 10220 - gene_symbol: GDF11 - hgnc_id: "HGNC:4216" - - ncbi_gene_id: 10243 - gene_symbol: GPHN - hgnc_id: "HGNC:15465" - - ncbi_gene_id: 10265 - gene_symbol: IRX5 - hgnc_id: "HGNC:14361" - - ncbi_gene_id: 10283 - gene_symbol: CWC27 - hgnc_id: "HGNC:10664" - - ncbi_gene_id: 10297 - gene_symbol: APC2 - hgnc_id: "HGNC:24036" - - ncbi_gene_id: 10516 - gene_symbol: FBLN5 - hgnc_id: "HGNC:3602" - - ncbi_gene_id: 10526 - gene_symbol: IPO8 - hgnc_id: "HGNC:9853" - - ncbi_gene_id: 10664 - gene_symbol: CTCF - hgnc_id: "HGNC:13723" - - ncbi_gene_id: 10683 - gene_symbol: DLL3 - hgnc_id: "HGNC:2909" - - ncbi_gene_id: 10765 - gene_symbol: KDM5B - hgnc_id: "HGNC:18039" - - ncbi_gene_id: 10847 - gene_symbol: SRCAP - hgnc_id: "HGNC:16974" - - ncbi_gene_id: 10907 - gene_symbol: TXNL4A - hgnc_id: "HGNC:30551" - - ncbi_gene_id: 10982 - gene_symbol: MAPRE2 - hgnc_id: "HGNC:6891" - - ncbi_gene_id: 10984 - gene_symbol: KCNQ1OT1 - hgnc_id: "HGNC:6295" - - ncbi_gene_id: 11107 - gene_symbol: PRDM5 - hgnc_id: "HGNC:9349" - - ncbi_gene_id: 11342 - gene_symbol: RNF13 - hgnc_id: "HGNC:10057" - - ncbi_gene_id: 22827 - gene_symbol: PUF60 - hgnc_id: "HGNC:17042" - - ncbi_gene_id: 22872 - gene_symbol: SEC31A - hgnc_id: "HGNC:17052" - - ncbi_gene_id: 23112 - gene_symbol: TNRC6B - hgnc_id: "HGNC:29190" - - ncbi_gene_id: 23126 - gene_symbol: POGZ - hgnc_id: "HGNC:18801" - - ncbi_gene_id: 23291 - gene_symbol: FBXW11 - hgnc_id: "HGNC:13607" - - ncbi_gene_id: 23314 - gene_symbol: SATB2 - hgnc_id: "HGNC:21637" - - ncbi_gene_id: 23322 - gene_symbol: RPGRIP1L - hgnc_id: "HGNC:29168" - - ncbi_gene_id: 23347 - gene_symbol: SMCHD1 - hgnc_id: "HGNC:29090" - - ncbi_gene_id: 23394 - gene_symbol: ADNP - hgnc_id: "HGNC:15766" - - ncbi_gene_id: 23405 - gene_symbol: DICER1 - hgnc_id: "HGNC:17098" - - ncbi_gene_id: 23483 - gene_symbol: TGDS - hgnc_id: "HGNC:20324" - - ncbi_gene_id: 23493 - gene_symbol: HEY2 - hgnc_id: "HGNC:4881" - - ncbi_gene_id: 23512 - gene_symbol: SUZ12 - hgnc_id: "HGNC:17101" - - ncbi_gene_id: 23545 - gene_symbol: ATP6V0A2 - hgnc_id: "HGNC:18481" - - ncbi_gene_id: 23729 - gene_symbol: SHPK - hgnc_id: "HGNC:1492" - - ncbi_gene_id: 25782 - gene_symbol: RAB3GAP2 - hgnc_id: "HGNC:17168" - - ncbi_gene_id: 25836 - gene_symbol: NIPBL - hgnc_id: "HGNC:28862" - - ncbi_gene_id: 25942 - gene_symbol: SIN3A - hgnc_id: "HGNC:19353" - - ncbi_gene_id: 26040 - gene_symbol: SETBP1 - hgnc_id: "HGNC:15573" - - ncbi_gene_id: 26053 - gene_symbol: AUTS2 - hgnc_id: "HGNC:14262" - - ncbi_gene_id: 26227 - gene_symbol: PHGDH - hgnc_id: "HGNC:8923" - - ncbi_gene_id: 26229 - gene_symbol: B3GAT3 - hgnc_id: "HGNC:923" - - ncbi_gene_id: 26608 - gene_symbol: TBL2 - hgnc_id: "HGNC:11586" - - ncbi_gene_id: 27031 - gene_symbol: NPHP3 - hgnc_id: "HGNC:7907" - - ncbi_gene_id: 28952 - gene_symbol: CCDC22 - hgnc_id: "HGNC:28909" - - ncbi_gene_id: 29072 - gene_symbol: SETD2 - hgnc_id: "HGNC:18420" - - ncbi_gene_id: 29940 - gene_symbol: DSE - hgnc_id: "HGNC:21144" - - ncbi_gene_id: 29969 - gene_symbol: MDFIC - hgnc_id: "HGNC:28870" - - ncbi_gene_id: 30008 - gene_symbol: EFEMP2 - hgnc_id: "HGNC:3219" - - ncbi_gene_id: 51085 - gene_symbol: MLXIPL - hgnc_id: "HGNC:12744" - - ncbi_gene_id: 51360 - gene_symbol: MBTPS2 - hgnc_id: "HGNC:15455" - - ncbi_gene_id: 51780 - gene_symbol: KDM3B - hgnc_id: "HGNC:1337" - - ncbi_gene_id: 54101 - gene_symbol: RIPK4 - hgnc_id: "HGNC:496" - - ncbi_gene_id: 54487 - gene_symbol: DGCR8 - hgnc_id: "HGNC:2847" - - ncbi_gene_id: 54499 - gene_symbol: TMCO1 - hgnc_id: "HGNC:18188" - - ncbi_gene_id: 54914 - gene_symbol: FOCAD - hgnc_id: "HGNC:23377" - - ncbi_gene_id: 54968 - gene_symbol: TMEM70 - hgnc_id: "HGNC:26050" - - ncbi_gene_id: 55033 - gene_symbol: FKBP14 - hgnc_id: "HGNC:18625" - - ncbi_gene_id: 55384 - gene_symbol: MEG3 - hgnc_id: "HGNC:14575" - - ncbi_gene_id: 55503 - gene_symbol: TRPV6 - hgnc_id: "HGNC:14006" - - ncbi_gene_id: 55617 - gene_symbol: TASP1 - hgnc_id: "HGNC:15859" - - ncbi_gene_id: 55690 - gene_symbol: PACS1 - hgnc_id: "HGNC:30032" - - ncbi_gene_id: 55764 - gene_symbol: IFT122 - hgnc_id: "HGNC:13556" - - ncbi_gene_id: 56623 - gene_symbol: INPP5E - hgnc_id: "HGNC:21474" - - ncbi_gene_id: 57492 - gene_symbol: ARID1B - hgnc_id: "HGNC:18040" - - ncbi_gene_id: 57539 - gene_symbol: WDR35 - hgnc_id: "HGNC:29250" - - ncbi_gene_id: 57545 - gene_symbol: CC2D2A - hgnc_id: "HGNC:29253" - - ncbi_gene_id: 57589 - gene_symbol: RIC1 - hgnc_id: "HGNC:17686" - - ncbi_gene_id: 57728 - gene_symbol: WDR19 - hgnc_id: "HGNC:18340" - - ncbi_gene_id: 58508 - gene_symbol: KMT2C - hgnc_id: "HGNC:13726" - - ncbi_gene_id: 63895 - gene_symbol: PIEZO2 - hgnc_id: "HGNC:26270" - - ncbi_gene_id: 64175 - gene_symbol: P3H1 - hgnc_id: "HGNC:19316" - - ncbi_gene_id: 64220 - gene_symbol: STRA6 - hgnc_id: "HGNC:30650" - - ncbi_gene_id: 64324 - gene_symbol: NSD1 - hgnc_id: "HGNC:14234" - - ncbi_gene_id: 64359 - gene_symbol: NXN - hgnc_id: "HGNC:18008" - - ncbi_gene_id: 64412 - gene_symbol: GZF1 - hgnc_id: "HGNC:15808" - - ncbi_gene_id: 64840 - gene_symbol: PORCN - hgnc_id: "HGNC:17652" - - ncbi_gene_id: 79158 - gene_symbol: GNPTAB - hgnc_id: "HGNC:29670" - - ncbi_gene_id: 79633 - gene_symbol: FAT4 - hgnc_id: "HGNC:23109" - - ncbi_gene_id: 79813 - gene_symbol: EHMT1 - hgnc_id: "HGNC:24650" - - ncbi_gene_id: 79989 - gene_symbol: IFT56 - hgnc_id: "HGNC:21882" - - ncbi_gene_id: 81031 - gene_symbol: SLC2A10 - hgnc_id: "HGNC:13444" - - ncbi_gene_id: 81857 - gene_symbol: MED25 - hgnc_id: "HGNC:28845" - - ncbi_gene_id: 84068 - gene_symbol: SLC10A7 - hgnc_id: "HGNC:23088" - - ncbi_gene_id: 84163 - gene_symbol: GTF2IRD2 - hgnc_id: "HGNC:30775" - - ncbi_gene_id: 84277 - gene_symbol: DNAJC30 - hgnc_id: "HGNC:16410" - - ncbi_gene_id: 84314 - gene_symbol: TMEM107 - hgnc_id: "HGNC:28128" - - ncbi_gene_id: 84667 - gene_symbol: HES7 - hgnc_id: "HGNC:15977" - - ncbi_gene_id: 84896 - gene_symbol: ATAD1 - hgnc_id: "HGNC:25903" - - ncbi_gene_id: 84992 - gene_symbol: PIGY - hgnc_id: "HGNC:28213" - - ncbi_gene_id: 91147 - gene_symbol: TMEM67 - hgnc_id: "HGNC:28396" - - ncbi_gene_id: 92579 - gene_symbol: G6PC3 - hgnc_id: "HGNC:24861" - - ncbi_gene_id: 94005 - gene_symbol: PIGS - hgnc_id: "HGNC:14937" - - ncbi_gene_id: 113189 - gene_symbol: CHST14 - hgnc_id: "HGNC:24464" - - ncbi_gene_id: 114049 - gene_symbol: BUD23 - hgnc_id: "HGNC:16405" - - ncbi_gene_id: 123263 - gene_symbol: MTFMT - hgnc_id: "HGNC:29666" - - ncbi_gene_id: 129563 - gene_symbol: DIS3L2 - hgnc_id: "HGNC:28648" - - ncbi_gene_id: 134701 - gene_symbol: RIPPLY2 - hgnc_id: "HGNC:21390" - - ncbi_gene_id: 135886 - gene_symbol: TMEM270 - hgnc_id: "HGNC:23018" - - ncbi_gene_id: 145173 - gene_symbol: B3GLCT - hgnc_id: "HGNC:20207" - - ncbi_gene_id: 145873 - gene_symbol: MESP2 - hgnc_id: "HGNC:29659" - - ncbi_gene_id: 149461 - gene_symbol: CLDN19 - hgnc_id: "HGNC:2040" - - ncbi_gene_id: 155368 - gene_symbol: METTL27 - hgnc_id: "HGNC:19068" - - ncbi_gene_id: 155382 - gene_symbol: VPS37D - hgnc_id: "HGNC:18287" - - ncbi_gene_id: 168667 - gene_symbol: BMPER - hgnc_id: "HGNC:24154" - - ncbi_gene_id: 170302 - gene_symbol: ARX - hgnc_id: "HGNC:18060" - - ncbi_gene_id: 197257 - gene_symbol: LDHD - hgnc_id: "HGNC:19708" - - ncbi_gene_id: 203068 - gene_symbol: TUBB - hgnc_id: "HGNC:20778" - - ncbi_gene_id: 221037 - gene_symbol: JMJD1C - hgnc_id: "HGNC:12313" - - ncbi_gene_id: 221927 - gene_symbol: BRAT1 - hgnc_id: "HGNC:21701" - - ncbi_gene_id: 259232 - gene_symbol: NALCN - hgnc_id: "HGNC:19082" - - ncbi_gene_id: 283120 - gene_symbol: H19 - hgnc_id: "HGNC:4713" - - ncbi_gene_id: 284098 - gene_symbol: PIGW - hgnc_id: "HGNC:23213" - - ncbi_gene_id: 285590 - gene_symbol: SH3PXD2B - hgnc_id: "HGNC:29242" - - ncbi_gene_id: 339983 - gene_symbol: NAT8L - hgnc_id: "HGNC:26742" - - ncbi_gene_id: 374654 - gene_symbol: KIF7 - hgnc_id: "HGNC:30497" - - ncbi_gene_id: 388015 - gene_symbol: RTL1 - hgnc_id: "HGNC:14665" - - ncbi_gene_id: 653361 - gene_symbol: NCF1 - hgnc_id: "HGNC:7660" - diff --git a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_term_id_exact_no_genes.snap b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_term_id_exact_no_genes.snap index a477a42..eb65f00 100644 --- a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_term_id_exact_no_genes.snap +++ b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_term_id_exact_no_genes.snap @@ -8,10 +8,16 @@ version: query: term_id: "HP:0000023" name: ~ - match_: ~ max_results: 100 genes: false result: - term_id: "HP:0000023" name: Inguinal hernia + definition: Protrusion of the contents of the abdominal cavity through the inguinal canal. + synonyms: ~ + xrefs: + - "MEDDRA:10022016" + - "MSH:D006552" + - "SNOMEDCT_US:396232000" + - "UMLS:C0019294" diff --git a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_term_id_exact_with_genes.snap b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_term_id_exact_with_genes.snap index f40d9e9..5340e3e 100644 --- a/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_term_id_exact_with_genes.snap +++ b/src/server/actix_server/snapshots/viguno__server__actix_server__hpo_terms__test__hpo_terms_term_id_exact_with_genes.snap @@ -8,12 +8,18 @@ version: query: term_id: "HP:0000023" name: ~ - match_: ~ max_results: 100 genes: true result: - term_id: "HP:0000023" name: Inguinal hernia + definition: Protrusion of the contents of the abdominal cavity through the inguinal canal. + synonyms: ~ + xrefs: + - "MEDDRA:10022016" + - "MSH:D006552" + - "SNOMEDCT_US:396232000" + - "UMLS:C0019294" genes: - ncbi_gene_id: 59 gene_symbol: ACTA2 diff --git a/src/server/mod.rs b/src/server/mod.rs index aadc518..b84e7bc 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -11,7 +11,7 @@ use crate::common::load_hpo; /// Data structure for the web server data. pub struct WebServerData { - /// The HPO ontology. + /// The HPO ontology (`hpo` crate). pub ontology: Ontology, /// The database with precomputed Resnik P-values. pub db: Option>, @@ -19,6 +19,8 @@ pub struct WebServerData { pub ncbi_to_hgnc: HashMap, /// Xlink map from HGNC gene ID to NCBI gene ID. pub hgnc_to_ncbi: HashMap, + /// The full text index over the HPO OBO document. + pub full_text_index: crate::index::Index, } /// Command line arguments for `server pheno` sub command. @@ -146,11 +148,27 @@ pub fn run(args_common: &crate::common::Args, args: &Args) -> Result<(), anyhow: before_load_xlink.elapsed() ); + tracing::info!("Loading HPO OBO..."); + let before_load_obo = std::time::Instant::now(); + let hpo_doc = fastobo::from_file(format!("{}/{}", &args.path_hpo_dir, "hp.obo")) + .map_err(|e| anyhow::anyhow!("Error loading HPO OBO: {}", e))?; + tracing::info!( + "... done loading HPO OBO in {:?}", + before_load_obo.elapsed() + ); + + tracing::info!("Indexing OBO..."); + let before_index_obo = std::time::Instant::now(); + let full_text_index = crate::index::Index::new(hpo_doc) + .map_err(|e| anyhow::anyhow!("Error indexing HPO OBO: {}", e))?; + tracing::info!("... done indexing OBO in {:?}", before_index_obo.elapsed()); + let data = actix_web::web::Data::new(WebServerData { ontology, db: Some(db), ncbi_to_hgnc, hgnc_to_ncbi, + full_text_index, }); // Print the server URL and some hints (the latter: unless suppressed).