How does search work?

Hide code cell content
from laminci.db import setup_local_test_postgres

pgurl = setup_local_test_postgres()
!lamin init --name benchmark_search --db {pgurl} --schema bionty --storage ./benchmark_search
 Created Postgres test instance: 'postgresql://postgres:[email protected]:5432/pgtest'
It runs in docker container 'pgtest'
 connected lamindb: testuser1/benchmark_search

Here we show how to perform text search on Record and evaluate some search queries for the bionty.CellType ontology.

import lamindb as ln
import bionty as bt

SEARCH_QUERIES_EXACT = (
    "t cell",
    "stem cell",
    "b cell",
    "regulatory B cell",
    "Be2 cell",
    "adipocyte",
)
SEARCH_QUERIES_CONTAINS = ("t cel", "t-cel", "neural", "kidney", "kidne")
TOP_N = 20

bt.CellType.import_source()
 connected lamindb: testuser1/benchmark_search
ln.ULabel(name="cat[*_*]").save()
ULabel(uid='Vw5tlCAj', name='cat[*_*]', created_by_id=1, created_at=2024-12-20 15:05:48 UTC)

Search the registry

for query in SEARCH_QUERIES_EXACT:
    print("Query:", query)
    qs = bt.CellType.search(query)
    display(qs.df())

    assert query.lower() == qs[0].name.lower()
Hide code cell output
Query: t cell
uid name ontology_id abbr synonyms description source_id run_id created_at created_by_id
id
83 22LvKd01 T cell CL:0000084 None T lymphocyte|T-lymphocyte|T-cell A Type Of Lymphocyte Whose Defining Characteri... 32 None 2024-12-20 15:05:47.988563+00:00 1
1479 2OTzqBTM mature T cell CL:0002419 None CD3e-positive T cell|mature T-cell A T Cell That Expresses A T Cell Receptor Comp... 32 None 2024-12-20 15:05:48.060502+00:00 1
898 2qIhoZK4 CD8-positive, CD25-positive, alpha-beta regula... CL:0000919 None CD8-positive, CD25-positive, alpha-beta regula... A Cd8-Positive Alpha Beta-Positive T Cell With... 32 None 2024-12-20 15:05:48.030511+00:00 1
909 5FzW4l9l CD4-negative, CD8-negative type I NK T cell se... CL:0000930 None CD4-negative, CD8-negative type I NKT cell sec... A Mature Nk T Cell That Secretes Interleukin-4... 32 None 2024-12-20 15:05:48.031081+00:00 1
912 7UFMOmjH type II NK T cell secreting interleukin-4 CL:0000933 None type II NKT cell secreting interleukin-4|type ... A Type Ii Nk T Cell That Has Been Recently Act... 32 None 2024-12-20 15:05:48.031234+00:00 1
1017 5yjQPSaM CD8-positive, CXCR3-positive, alpha-beta regul... CL:0001041 None CD8-positive, CXCR3-positive, Treg|CD8-positiv... A Cd8-Positive Alpha-Beta-Positive T Cell With... 32 None 2024-12-20 15:05:48.036632+00:00 1
908 2pwBnFT3 CD4-negative, CD8-negative type I NK T cell se... CL:0000929 None CD4-negative, CD8-negative type I NK T-cell se... A Mature Nk T Cell That Secretes Interferon-Ga... 32 None 2024-12-20 15:05:48.031030+00:00 1
892 1zkEPMSu effector memory CD8-positive, alpha-beta T cell CL:0000913 None effector CD8-positive, alpha-beta memory T-lym... Cd8-Positive, Alpha-Beta Memory T Cell With Th... 32 None 2024-12-20 15:05:48.030206+00:00 1
899 ut1VvtNT CD8-positive, CD28-negative, alpha-beta regula... CL:0000920 None CD8-positive, CD28-negative Treg|CD8+CD28- T c... Cd8-Positive, Alpha-Beta Positive Regulatory T... 32 None 2024-12-20 15:05:48.030562+00:00 1
900 5zF2I6dJ type I NK T cell CL:0000921 None type I NK T-lymphocyte|type I NKT cell|classic... An Alpha-Beta T Cell Expressing Nk Cell Marker... 32 None 2024-12-20 15:05:48.030614+00:00 1
911 rdl67uwf type II NK T cell secreting interferon-gamma CL:0000932 None type II NK T-lymphocyte secreting interferon-g... A Type Ii Nk T Cell That Has Been Recently Act... 32 None 2024-12-20 15:05:48.031183+00:00 1
777 1xUOm7V2 CD8-positive, alpha-beta regulatory T cell CL:0000795 None CD8-positive Treg|CD8-positive, alpha-beta Tre... A Cd8-Positive, Alpha-Beta T Cell That Regulat... 32 None 2024-12-20 15:05:48.024310+00:00 1
906 hjbsTsgP CD4-positive type I NK T cell secreting interl... CL:0000927 None CD4-positive type I NK T cell secreting IL-4|C... A Mature Nk T Cell That Predominantly Secretes... 32 None 2024-12-20 15:05:48.030928+00:00 1
905 3oNvdpFX CD4-positive type I NK T cell secreting interf... CL:0000926 None CD4-positive type I NK T lymphocyte secreting ... A Mature Nk T Cell That Secretes Interferon-Ga... 32 None 2024-12-20 15:05:48.030877+00:00 1
794 3muVF5Bn mature NK T cell CL:0000814 None mature NK T lymphocyte|mature NK T-lymphocyte|... A Mature Alpha-Beta T Cell Of A Distinct Linea... 32 None 2024-12-20 15:05:48.025182+00:00 1
883 3jz6b7gZ central memory CD4-positive, alpha-beta T cell CL:0000904 None central CD4-positive, alpha-beta memory T-lymp... Cd4-Positive, Alpha-Beta Memory T Cell With Th... 32 None 2024-12-20 15:05:48.029748+00:00 1
884 4ZpcwVPJ effector memory CD4-positive, alpha-beta T cell CL:0000905 None effector memory CD4-positive, alpha-beta T lym... Cd4-Positive, Alpha-Beta Memory T Cell With Th... 32 None 2024-12-20 15:05:48.029799+00:00 1
886 7SLcmrYh central memory CD8-positive, alpha-beta T cell CL:0000907 None central CD8-positive, alpha-beta memory T-lymp... Cd8-Positive, Alpha-Beta Memory T Cell With Th... 32 None 2024-12-20 15:05:48.029900+00:00 1
780 1HuNn2EP gamma-delta T cell CL:0000798 None gammadelta T cell|gamma-delta T-cell|gamma-del... A T Cell That Expresses A Gamma-Delta T Cell R... 32 None 2024-12-20 15:05:48.024463+00:00 1
1962 78mumrXE small intestine Peyer's patch T cell CL:0009023 None T cell of Peyer's patch of small intestine|T c... A T Cell Which Resides In The Peyer'S Patch Of... 32 None 2024-12-20 15:05:48.085385+00:00 1
Query: stem cell
uid name ontology_id abbr synonyms description source_id run_id created_at created_by_id
id
35 jxDD8ajD stem cell CL:0000034 None animal stem cell A Relatively Undifferentiated Cell That Retain... 32 None 2024-12-20 15:05:47.986113+00:00 1
2918 1XMMVlhK mesenchymal stem cell of orbital adipose tissue CL:4040004 None Orbital ASCs|orbital adipose-derived mesenchym... Any Mesenchymal Stem Cell Of Adipose Tissue Th... 32 None 2024-12-20 15:05:48.135083+00:00 1
1099 2WPBsduL short term hematopoietic stem cell CL:0002033 None ST stem cell|ST-HSC A Hematopoietic Stem Cell Capable Of Rapid Rep... 32 None 2024-12-20 15:05:48.040844+00:00 1
1956 5S7LEcUj intestinal crypt stem cell of small intestine CL:0009017 None stem cell of small intestine crypt of Lieberkuhn An Intestinal Stem Cell That Is Located In The... 32 None 2024-12-20 15:05:48.085081+00:00 1
2316 1n840sKH stem cell of epidermis CL:1000428 None epidermal stem cell A Somatic Stem Cell That Is Part Of The Epider... 32 None 2024-12-20 15:05:48.104049+00:00 1
2608 5r4LUZpd mesenchymal stem cell of abdominal adipose tissue CL:2000080 None mesenchymal stem cell of abdominal adipose Any Mesenchymal Stem Cell Of Adipose Tissue Th... 32 None 2024-12-20 15:05:48.119065+00:00 1
1955 66xlGEYm intestinal crypt stem cell of large intestine CL:0009016 None stem cell of large intestine crypt of Lieberkuhn An Intestinal Stem Cell That Is Located In The... 32 None 2024-12-20 15:05:48.085030+00:00 1
1628 tgRXGHjW mesenchymal stem cell of adipose tissue CL:0002570 None mesenchymal stem cell of adipose A Mesenchymal Stem Cell Of Adipose Tissue. 32 None 2024-12-20 15:05:48.068139+00:00 1
1003 5NOO2SHF CD34-positive, CD38-negative hematopoietic ste... CL:0001024 None CD133-positive hematopoietic stem cell Cd133-Positive Hematopoietic Stem Cell Is A He... 32 None 2024-12-20 15:05:48.035919+00:00 1
48 5AU7hMOa multi fate stem cell CL:0000048 None multi-fate stem cell|multipotent cell|multifat... A Stem Cell That Can Give Rise To Multiple Lin... 32 None 2024-12-20 15:05:47.986780+00:00 1
52 6Z8jsYOX totipotent stem cell CL:0000052 None totipotential stem cell A Stem Cell From Which All Cells Of The Body C... 32 None 2024-12-20 15:05:47.986982+00:00 1
2000 1J46d5xB intestinal crypt stem cell of anorectum CL:0009061 None anorectum intestinal crypt stem cell An Intestinal Crypt Stem Cell That Is Located ... 32 None 2024-12-20 15:05:48.087333+00:00 1
38 2U8xapxu hematopoietic stem cell CL:0000037 None blood forming stem cell|hemopoietic stem cell A Stem Cell From Which All Cells Of The Lympho... 32 None 2024-12-20 15:05:47.986265+00:00 1
1100 fQaazBGV long term hematopoietic stem cell CL:0002034 None LT stem cell|LT-HSC A Hematopoietic Stem Cell With Long Term Self ... 32 None 2024-12-20 15:05:48.040894+00:00 1
1967 5aMQ7VXC intestinal crypt stem cell of appendix CL:0009028 None intestinal crypt stem cell of vermiform append... An Intestinal Crypt Stem Cell That Is Located ... 32 None 2024-12-20 15:05:48.085638+00:00 1
987 1yjJyVS8 Kit and Sca1-positive hematopoietic stem cell CL:0001008 None LSK stem cell|Sca1-positive hematopoietic stem... A Hematopoietic Stem Cell That Has Plasma Memb... 32 None 2024-12-20 15:05:48.035096+00:00 1
15 3dsBAMM1 germ line stem cell CL:0000014 None germline stem cell A Stem Cell That Is The Precursor Of Gametes. 32 None 2024-12-20 15:05:47.985089+00:00 1
1596 4cuSaXq3 amnion mesenchymal stem cell CL:0002537 None amniotic membrane stem cell A Mesenchymal Stem Cell Of The Amnion Membrane. 32 None 2024-12-20 15:05:48.066500+00:00 1
36 58RHatFb single fate stem cell CL:0000035 None unipotent stem cell|unipotential stem cell A Stem Cell That Self-Renews As Well As Give R... 32 None 2024-12-20 15:05:47.986163+00:00 1
1257 3sriqGUG hepatic stem cell CL:0002195 None None A Stem Cell That Can Give Rise To The Cells Of... 32 None 2024-12-20 15:05:48.048965+00:00 1
Query: b cell
uid name ontology_id abbr synonyms description source_id run_id created_at created_by_id
id
231 ryEtgi1y B cell CL:0000236 None B lymphocyte|B-cell|B-lymphocyte A Lymphocyte Of B Lineage That Is Capable Of B... 32 None 2024-12-20 15:05:47.996135+00:00 1
938 7JU5AZLF T2 B cell CL:0000959 None T2 B lymphocyte|T2 B-cell|transitional stage 2... A Transitional Stage B Cell That Has The Pheno... 32 None 2024-12-20 15:05:48.032565+00:00 1
949 3tAsGFFs unswitched memory B cell CL:0000970 None unswitched memory B lymphocyte|unswitched memo... An Unswitched Memory B Cell Is A Memory B Cell... 32 None 2024-12-20 15:05:48.033132+00:00 1
950 5QR8GcfH IgM memory B cell CL:0000971 None memory IgM B cell|memory IgM B-lymphocyte|IgM ... An Igm Memory B Cell Is An Unswitched Memory B... 32 None 2024-12-20 15:05:48.033183+00:00 1
927 vUMLrFZL IgE memory B cell CL:0000948 None IgE memory B lymphocyte|IgE memory B-cell|memo... A Class Switched Memory B Cell That Expresses ... 32 None 2024-12-20 15:05:48.032006+00:00 1
937 3YZGNlzS T1 B cell CL:0000958 None T1 B lymphocyte|T1 B-cell|T1 B-lymphocyte|tran... A Transitional Stage B Cell That Migrates From... 32 None 2024-12-20 15:05:48.032514+00:00 1
952 6T4HiL2K IgA memory B cell CL:0000973 None IgA memory B lymphocyte|IgA memory B-cell|memo... A Class Switched Memory B Cell That Expresses ... 32 None 2024-12-20 15:05:48.033285+00:00 1
943 5C2KpHBh Bm2' B cell CL:0000964 None Bm2' B lymphocyte|Bm2' B-cell|Bm2-prime B cell... A Germinal Center B Cell That Founds A Germina... 32 None 2024-12-20 15:05:48.032828+00:00 1
798 75GaqGOI transitional stage B cell CL:0000818 None transitional B cell|transitional stage B-cell|... An Immature B Cell Of An Intermediate Stage Be... 32 None 2024-12-20 15:05:48.025385+00:00 1
823 2EhFTUoZ follicular B cell CL:0000843 None follicular B lymphocyte|Fo B-cell|Fo B cell|fo... A Resting Mature B Cell That Has The Phenotype... 32 None 2024-12-20 15:05:48.026661+00:00 1
801 26E9jKKt B-1b B cell CL:0000821 None B1b B-lymphocyte|B-1b B-lymphocyte|B1b B cell|... A B-1 B Cell That Has The Phenotype Cd5-Negati... 32 None 2024-12-20 15:05:48.025537+00:00 1
825 2rco39P1 marginal zone B cell of spleen CL:0000845 None B cell of marginal zone of spleen|marginal zon... A Mature B Cell That Is Located In The Margina... 32 None 2024-12-20 15:05:48.026772+00:00 1
800 3fXg2Aru B-1a B cell CL:0000820 None B1a B lymphocyte|B-1a B-lymphocyte|B1a B-cell|... A B-1 B Cell That Has The Phenotype Cd5-Positive. 32 None 2024-12-20 15:05:48.025486+00:00 1
799 3VMOKHg2 B-1 B cell CL:0000819 None B1 B-cell|B-1 B-lymphocyte|B-1 B-cell|B1 cell|... A B Cell Of Distinct Lineage And Surface Marke... 32 None 2024-12-20 15:05:48.025436+00:00 1
958 74TtdefA IgG memory B cell CL:0000979 None IgG memory B-lymphocyte|memory IgG B-cell|memo... An Igg Memory B Cell Is A Class Switched Memor... 32 None 2024-12-20 15:05:48.033590+00:00 1
824 4IowPafD germinal center B cell CL:0000844 None GC B-lymphocyte|germinal center B-cell|GC B ce... A Rapidly Cycling Mature B Cell That Has Disti... 32 None 2024-12-20 15:05:48.026721+00:00 1
802 1jrUVVsT B-2 B cell CL:0000822 None B2 B lymphocyte|B-2 B-cell|B2 B-lymphocyte|B-2... A Conventional B Cell Subject To Antigenic Sti... 32 None 2024-12-20 15:05:48.025588+00:00 1
939 6wMDn1pw T3 B cell CL:0000960 None T3 B-lymphocyte|T3 B-cell|T3 B lymphocyte|An1 ... A Transitional Stage B Cell That Expresses Sur... 32 None 2024-12-20 15:05:48.032616+00:00 1
796 6VBn74jE immature B cell CL:0000816 None immature B lymphocyte|immature B-cell|immature... An Immature B Cell Is A B Cell That Has The Ph... 32 None 2024-12-20 15:05:48.025284+00:00 1
960 6gGCcUx5 double negative memory B cell CL:0000981 None dn memory B-lymphocyte|dn memory B cell|dn mem... A Memory B Cell With The Phenotype Igd-Negativ... 32 None 2024-12-20 15:05:48.033692+00:00 1
Query: regulatory B cell
uid name ontology_id abbr synonyms description source_id run_id created_at created_by_id
id
948 5b0DoJIx regulatory B cell CL:0000969 None B(reg)|regulatory B lymphocyte|B10 cell|regula... A Mature B Cell That Has The Phenotype Cd1D-Po... 32 None 2024-12-20 15:05:48.033081+00:00 1
Query: Be2 cell
uid name ontology_id abbr synonyms description source_id run_id created_at created_by_id
id
923 7Hxc3PWU Be2 cell CL:0000944 None B effector 2 cell A Be Cell That Facilitates Development Of T-He... 32 None 2024-12-20 15:05:48.031804+00:00 1
Query: adipocyte
uid name ontology_id abbr synonyms description source_id run_id created_at created_by_id
id
135 wdLgwUXo adipocyte CL:0000136 None fat cell|adipose cell A Fat-Storing Cell Found Mostly In The Abdomin... 32 None 2024-12-20 15:05:47.991236+00:00 1
1672 5ikCt2mr adipocyte of omentum tissue CL:0002615 None omental fat cell|omental adipocyte An Adipocyte That Is Part Of Omentum Tissue. 32 None 2024-12-20 15:05:48.070391+00:00 1
1673 5IngQdBq perirenal adipocyte CL:0002616 None perirenal fat cell|perirenal adipocyte cell An Adipocyte Of Perirenal Fat Tissue. 32 None 2024-12-20 15:05:48.070442+00:00 1
1674 4ruvHG7A adipocyte of breast CL:0002617 None breast adipocyte|fat cell of breast An Adipocyte That Is Part Of The Breast. 32 None 2024-12-20 15:05:48.070493+00:00 1
2219 6GvX8eJQ epicardial adipocyte CL:1000309 None epicardial fat cell|adipocyte of epicardial fat An Adipocyte That Is Part Of The Epicardial Fat. 32 None 2024-12-20 15:05:48.099063+00:00 1
1046 3ccnEzNw beige adipocyte CL:0001070 None brite cell|beige/brite adipocyte|brite fat cel... An Adipocyte That Is Beige In Color, Thermogen... 32 None 2024-12-20 15:05:48.038125+00:00 1
2221 3zeirA0G adipocyte of epicardial fat of left ventricle CL:1000311 None epicardial fat cell of left ventricle|epicardi... An Adipocyte That Is Part Of The Epicardial Fa... 32 None 2024-12-20 15:05:48.099164+00:00 1
2220 5KdaaofT adipocyte of epicardial fat of right ventricle CL:1000310 None epicardial adipocyte of right ventricle|epicar... An Adipocyte That Is Part Of The Epicardial Fa... 32 None 2024-12-20 15:05:48.099113+00:00 1
1580 17EZdnrz subcutaneous adipocyte CL:0002521 None subcutaneous fat cell An Adipocyte That Is Part Of Subcutaneous Adip... 32 None 2024-12-20 15:05:48.065676+00:00 1
439 34sV4lgF white adipocyte CL:0000448 None white adipose cell An Adipocyte With Light Coloration And Few Mit... 32 None 2024-12-20 15:05:48.006746+00:00 1
1393 12Qj99kX neural crest derived adipocyte CL:0002333 None None An Adipocyte Derived From A Neural Crest Cell. 32 None 2024-12-20 15:05:48.055974+00:00 1
1395 8dEt6lpw brown preadipocyte CL:0002335 None None A Preadipocyte That Is Capable Of Differentiat... 32 None 2024-12-20 15:05:48.056077+00:00 1
2505 6bv1KRQr obsolete breast adipocyte CL:1001583 None None Obsolete: Adipocytes Found In The Subcutaneous... 32 None 2024-12-20 15:05:48.113772+00:00 1
440 1tWDTF2O brown adipocyte CL:0000449 None brown adipose cell|brown fat cell A Cell From The Thermogenic Form Of Adipose Ti... 32 None 2024-12-20 15:05:48.006796+00:00 1
1638 2ulPN3Ro preadipocyte of the breast CL:0002580 None None A Preadipocyte That Is Part Of The Breast. 32 None 2024-12-20 15:05:48.068646+00:00 1
1636 1f8VN83l mesenteric preadipocyte CL:0002578 None None A Preadipocyte Found In Mesenteric Tissue. 32 None 2024-12-20 15:05:48.068545+00:00 1
1637 4PFgXW99 omentum preadipocyte CL:0002579 None None A Preadipocyte That Is Part Of An Omentum. 32 None 2024-12-20 15:05:48.068596+00:00 1
1639 4jbSQ8Df perirenal preadipocyte CL:0002581 None None A Preadipocyte That Is Part Of A Perirenal Fat... 32 None 2024-12-20 15:05:48.068705+00:00 1
1640 3WK2FeBD visceral preadipocyte CL:0002582 None None A Preadipocyte That Is Part Of Visceral Tissue. 32 None 2024-12-20 15:05:48.068756+00:00 1
1641 2Bn2LN0B subcutaneous preadipocyte CL:0002583 None None A Preadipocyte That Is Part Of Subcutaneous Ti... 32 None 2024-12-20 15:05:48.068807+00:00 1
for query in SEARCH_QUERIES_CONTAINS:
    print("Query:", query)
    qs = bt.CellType.search(query)
    display(qs.df())

    top_record = qs[0]
    query = query.lower()
    assert query in top_record.name.lower() or query in top_record.synonyms.lower()
Hide code cell output
Query: t cel
uid name ontology_id abbr synonyms description source_id run_id created_at created_by_id
id
83 22LvKd01 T cell CL:0000084 None T lymphocyte|T-lymphocyte|T-cell A Type Of Lymphocyte Whose Defining Characteri... 32 None 2024-12-20 15:05:47.988563+00:00 1
1479 2OTzqBTM mature T cell CL:0002419 None CD3e-positive T cell|mature T-cell A T Cell That Expresses A T Cell Receptor Comp... 32 None 2024-12-20 15:05:48.060502+00:00 1
908 2pwBnFT3 CD4-negative, CD8-negative type I NK T cell se... CL:0000929 None CD4-negative, CD8-negative type I NK T-cell se... A Mature Nk T Cell That Secretes Interferon-Ga... 32 None 2024-12-20 15:05:48.031030+00:00 1
900 5zF2I6dJ type I NK T cell CL:0000921 None type I NK T-lymphocyte|type I NKT cell|classic... An Alpha-Beta T Cell Expressing Nk Cell Marker... 32 None 2024-12-20 15:05:48.030614+00:00 1
906 hjbsTsgP CD4-positive type I NK T cell secreting interl... CL:0000927 None CD4-positive type I NK T cell secreting IL-4|C... A Mature Nk T Cell That Predominantly Secretes... 32 None 2024-12-20 15:05:48.030928+00:00 1
1017 5yjQPSaM CD8-positive, CXCR3-positive, alpha-beta regul... CL:0001041 None CD8-positive, CXCR3-positive, Treg|CD8-positiv... A Cd8-Positive Alpha-Beta-Positive T Cell With... 32 None 2024-12-20 15:05:48.036632+00:00 1
909 5FzW4l9l CD4-negative, CD8-negative type I NK T cell se... CL:0000930 None CD4-negative, CD8-negative type I NKT cell sec... A Mature Nk T Cell That Secretes Interleukin-4... 32 None 2024-12-20 15:05:48.031081+00:00 1
892 1zkEPMSu effector memory CD8-positive, alpha-beta T cell CL:0000913 None effector CD8-positive, alpha-beta memory T-lym... Cd8-Positive, Alpha-Beta Memory T Cell With Th... 32 None 2024-12-20 15:05:48.030206+00:00 1
899 ut1VvtNT CD8-positive, CD28-negative, alpha-beta regula... CL:0000920 None CD8-positive, CD28-negative Treg|CD8+CD28- T c... Cd8-Positive, Alpha-Beta Positive Regulatory T... 32 None 2024-12-20 15:05:48.030562+00:00 1
777 1xUOm7V2 CD8-positive, alpha-beta regulatory T cell CL:0000795 None CD8-positive Treg|CD8-positive, alpha-beta Tre... A Cd8-Positive, Alpha-Beta T Cell That Regulat... 32 None 2024-12-20 15:05:48.024310+00:00 1
911 rdl67uwf type II NK T cell secreting interferon-gamma CL:0000932 None type II NK T-lymphocyte secreting interferon-g... A Type Ii Nk T Cell That Has Been Recently Act... 32 None 2024-12-20 15:05:48.031183+00:00 1
780 1HuNn2EP gamma-delta T cell CL:0000798 None gammadelta T cell|gamma-delta T-cell|gamma-del... A T Cell That Expresses A Gamma-Delta T Cell R... 32 None 2024-12-20 15:05:48.024463+00:00 1
905 3oNvdpFX CD4-positive type I NK T cell secreting interf... CL:0000926 None CD4-positive type I NK T lymphocyte secreting ... A Mature Nk T Cell That Secretes Interferon-Ga... 32 None 2024-12-20 15:05:48.030877+00:00 1
912 7UFMOmjH type II NK T cell secreting interleukin-4 CL:0000933 None type II NKT cell secreting interleukin-4|type ... A Type Ii Nk T Cell That Has Been Recently Act... 32 None 2024-12-20 15:05:48.031234+00:00 1
794 3muVF5Bn mature NK T cell CL:0000814 None mature NK T lymphocyte|mature NK T-lymphocyte|... A Mature Alpha-Beta T Cell Of A Distinct Linea... 32 None 2024-12-20 15:05:48.025182+00:00 1
883 3jz6b7gZ central memory CD4-positive, alpha-beta T cell CL:0000904 None central CD4-positive, alpha-beta memory T-lymp... Cd4-Positive, Alpha-Beta Memory T Cell With Th... 32 None 2024-12-20 15:05:48.029748+00:00 1
884 4ZpcwVPJ effector memory CD4-positive, alpha-beta T cell CL:0000905 None effector memory CD4-positive, alpha-beta T lym... Cd4-Positive, Alpha-Beta Memory T Cell With Th... 32 None 2024-12-20 15:05:48.029799+00:00 1
886 7SLcmrYh central memory CD8-positive, alpha-beta T cell CL:0000907 None central CD8-positive, alpha-beta memory T-lymp... Cd8-Positive, Alpha-Beta Memory T Cell With Th... 32 None 2024-12-20 15:05:48.029900+00:00 1
898 2qIhoZK4 CD8-positive, CD25-positive, alpha-beta regula... CL:0000919 None CD8-positive, CD25-positive, alpha-beta regula... A Cd8-Positive Alpha Beta-Positive T Cell With... 32 None 2024-12-20 15:05:48.030511+00:00 1
1962 78mumrXE small intestine Peyer's patch T cell CL:0009023 None T cell of Peyer's patch of small intestine|T c... A T Cell Which Resides In The Peyer'S Patch Of... 32 None 2024-12-20 15:05:48.085385+00:00 1
Query: t-cel
uid name ontology_id abbr synonyms description source_id run_id created_at created_by_id
id
83 22LvKd01 T cell CL:0000084 None T lymphocyte|T-lymphocyte|T-cell A Type Of Lymphocyte Whose Defining Characteri... 32 None 2024-12-20 15:05:47.988563+00:00 1
893 7CdLN14l immature NK T cell CL:0000914 None immature NK T-lymphocyte|immature NK T lymphoc... An Immature Alpha-Beta T-Cell That Express Egr... 32 None 2024-12-20 15:05:48.030257+00:00 1
472 53tIhlSK mucosal type mast cell CL:0000485 None MCT|T mast cells|MC(T) Mast Cell Subtype That Contains Only The Serin... 32 None 2024-12-20 15:05:48.008426+00:00 1
532 5ytbq1dA T-helper 1 cell CL:0000545 None Th1 T lymphocyte|Th1 T cell|Th1 T-cell|T(H)-1 ... A Cd4-Positive, Alpha-Beta T Cell That Has The... 32 None 2024-12-20 15:05:48.011501+00:00 1
533 2UjVV0Nv T-helper 2 cell CL:0000546 None T helper cells type 2|Th2 T lymphocyte|T(H)-2 ... A Cd4-Positive, Alpha-Beta T Cell That Has The... 32 None 2024-12-20 15:05:48.011552+00:00 1
597 15VPL6kO eosinophil progenitor cell CL:0000611 None None Any Granulocytopoietic Cell That Has Part Some... 32 None 2024-12-20 15:05:48.014835+00:00 1
611 6IC9NGJE CD8-positive, alpha-beta T cell CL:0000625 None CD8-positive, alpha-beta T lymphocyte|CD8-posi... A T Cell Expressing An Alpha-Beta T Cell Recep... 32 None 2024-12-20 15:05:48.015544+00:00 1
778 aRVHACby CD8-alpha-beta-positive, alpha-beta intraepith... CL:0000796 None CD8-positive, alpha-beta intraepithelial T lym... A Alpha-Beta Intraepithelial T Cell Found In T... 32 None 2024-12-20 15:05:48.024361+00:00 1
771 6By01L04 alpha-beta T cell CL:0000789 None alpha-beta T lymphocyte|alpha-beta T-cell|alph... A T Cell That Expresses An Alpha-Beta T Cell R... 32 None 2024-12-20 15:05:48.024007+00:00 1
772 5lSF7sli immature alpha-beta T cell CL:0000790 None immature alpha-beta T-cell|immature alpha-beta... An Alpha-Beta T Cell That Has An Immature Phen... 32 None 2024-12-20 15:05:48.024058+00:00 1
773 4BEwsp1Q mature alpha-beta T cell CL:0000791 None mature alpha-beta T-cell|mature alpha-beta T-l... A Alpha-Beta T Cell That Has A Mature Phenotype. 32 None 2024-12-20 15:05:48.024108+00:00 1
774 6gNM3N49 CD4-positive, CD25-positive, alpha-beta regula... CL:0000792 None CD4-positive, CD25-positive, alpha-beta regula... A Cd4-Positive, Cd25-Positive, Alpha-Beta T Ce... 32 None 2024-12-20 15:05:48.024159+00:00 1
775 wHU3gybJ CD4-positive, alpha-beta intraepithelial T cell CL:0000793 None CD4-positive, alpha-beta intraepithelial T-cel... A Cd4-Positive, Alpha-Beta T Cell That Is Foun... 32 None 2024-12-20 15:05:48.024209+00:00 1
776 Mv6woHvO CD8-positive, alpha-beta cytotoxic T cell CL:0000794 None CD8-positive, alpha-beta cytotoxic T lymphocyt... A Cd8-Positive, Alpha-Beta T Cell That Is Capa... 32 None 2024-12-20 15:05:48.024260+00:00 1
777 1xUOm7V2 CD8-positive, alpha-beta regulatory T cell CL:0000795 None CD8-positive Treg|CD8-positive, alpha-beta Tre... A Cd8-Positive, Alpha-Beta T Cell That Regulat... 32 None 2024-12-20 15:05:48.024310+00:00 1
610 4PSMdO3I CD4-positive, alpha-beta T cell CL:0000624 None CD4-positive, alpha-beta T lymphocyte|CD4-posi... A Mature Alpha-Beta T Cell That Expresses An A... 32 None 2024-12-20 15:05:48.015494+00:00 1
779 5CyKE0bS alpha-beta intraepithelial T cell CL:0000797 None alpha-beta intraepithelial T-cell|alpha-beta i... A Mature Alpha-Beta T Cell Of The Columnar Epi... 32 None 2024-12-20 15:05:48.024412+00:00 1
780 1HuNn2EP gamma-delta T cell CL:0000798 None gammadelta T cell|gamma-delta T-cell|gamma-del... A T Cell That Expresses A Gamma-Delta T Cell R... 32 None 2024-12-20 15:05:48.024463+00:00 1
781 70lHcCNw immature gamma-delta T cell CL:0000799 None immature gamma-delta T lymphocyte|immature gam... A Gamma-Delta T Cell That Has An Immature Phen... 32 None 2024-12-20 15:05:48.024514+00:00 1
479 531hEapj CD4-positive helper T cell CL:0000492 None CD4-positive helper T-lymphocyte|CD4-positive ... A Cd4-Positive, Alpha-Beta T Cell That Coopera... 32 None 2024-12-20 15:05:48.008790+00:00 1
Query: neural
uid name ontology_id abbr synonyms description source_id run_id created_at created_by_id
id
6 2ANSKgCO neural crest derived fibroblast CL:0000005 None fibroblast neural crest derived Any Fibroblast That Is Derived From The Neural... 32 None 2024-12-20 15:05:47.984609+00:00 1
2601 6GETDXmI migratory cardiac neural crest cell CL:2000073 None cardiac neural crest cell Any Migratory Neural Crest Cell That Is Part O... 32 None 2024-12-20 15:05:48.118706+00:00 1
30 2K4t7Szl neural crest derived neuron CL:0000029 None neuron neural crest derived Any Neuron That Develops From Some Migratory N... 32 None 2024-12-20 15:05:47.985860+00:00 1
12 3YAM45TD migratory trunk neural crest cell CL:0000011 None None Cell That Is Part Of The Migratory Trunk Neura... 32 None 2024-12-20 15:05:47.984935+00:00 1
9 uzxSEqax migratory cranial neural crest cell CL:0000008 None None Cell That Is Part Of The Migratory Cranial Neu... 32 None 2024-12-20 15:05:47.984781+00:00 1
28 3iHAmhkV smooth muscle cell neural crest derived CL:0000027 None None A Smooth Muscle Cell Derived From The Neural C... 32 None 2024-12-20 15:05:47.985758+00:00 1
2097 6whcJUgV neural progenitor cell CL:0011020 None None An Undifferentiated Cell That Originates From ... 32 None 2024-12-20 15:05:48.092329+00:00 1
1875 vcVrFvwF premigratory neural crest cell CL:0007004 None None Cell That Is Part Of The Neural Crest Region O... 32 None 2024-12-20 15:05:48.080921+00:00 1
2094 2osXrTI3 vagal neural crest cell CL:0011017 None None Cell That Is Part Of The Vagal Neural Crest Po... 32 None 2024-12-20 15:05:48.092175+00:00 1
327 17PFT8np migratory neural crest cell CL:0000333 None None A Cell Derived From The Specialized Ectoderm F... 32 None 2024-12-20 15:05:48.001033+00:00 1
1393 12Qj99kX neural crest derived adipocyte CL:0002333 None None An Adipocyte Derived From A Neural Crest Cell. 32 None 2024-12-20 15:05:48.055974+00:00 1
1664 2Cgzp1mO migratory enteric neural crest cell CL:0002607 None None A Neural Crest Cell That Gives Rise To Cells O... 32 None 2024-12-20 15:05:48.069983+00:00 1
47 1Fbr1GYr neural stem cell CL:0000047 None neuronal stem cell|NSC An Undifferentiated Neural Cell That Originate... 32 None 2024-12-20 15:05:47.986729+00:00 1
1733 2700Dq8O neural crest derived neuroblast CL:0002676 None None A Neuroblast Derived From A Neural Crest Cell. 32 None 2024-12-20 15:05:48.073595+00:00 1
2089 1g7Tg3bV neural crest cell CL:0011012 None None A Cell Of The Neural Crest. Neural Crest Cells... 32 None 2024-12-20 15:05:48.091920+00:00 1
422 53iZrx0n iridophore CL:0000431 None None A Pigment Cell Derived From The Neural Crest. ... 32 None 2024-12-20 15:05:48.005879+00:00 1
421 2sWB95jz xanthophore cell CL:0000430 None None A Pigment Cell Derived From The Neural Crest. ... 32 None 2024-12-20 15:05:48.005828+00:00 1
332 iHIaVIeB glioblast (sensu Vertebrata) CL:0000339 None spongioblast An Early Neural Cell Developing From The Early... 32 None 2024-12-20 15:05:48.001286+00:00 1
331 1MiaIeuD neuroblast (sensu Nematoda and Protostomia) CL:0000338 None None A Neural Precursor Of The Central Nervous System. 32 None 2024-12-20 15:05:48.001235+00:00 1
528 5a15kv4E melanoblast CL:0000541 None None A Cell That Originates From The Neural Crest A... 32 None 2024-12-20 15:05:48.011299+00:00 1
Query: kidney
uid name ontology_id abbr synonyms description source_id run_id created_at created_by_id
id
2384 6L22Q8yk kidney cortex tubule cell CL:1000615 None None Any Kidney Tubule Cell That Is Part Of Some Re... 32 None 2024-12-20 15:05:48.107542+00:00 1
2397 6d672m5q kidney resident dendritic cell CL:1000699 None None A Resident-Dendritic Cell That Is Part Of A Ki... 32 None 2024-12-20 15:05:48.108213+00:00 1
2368 4xMzxsTK kidney interstitial cell CL:1000500 None None A Cell That Is Part Of Kidney Interstitium. 32 None 2024-12-20 15:05:48.106726+00:00 1
2382 40ZjMXYx kidney nerve cell CL:1000606 None None Any Neuron That Has Its Soma Located In Some K... 32 None 2024-12-20 15:05:48.107440+00:00 1
2385 5pWp8yD8 kidney outer medulla cell CL:1000616 None None Any Kidney Medulla Cell That Is Part Of Some O... 32 None 2024-12-20 15:05:48.107593+00:00 1
2396 3GTV51hu kidney resident macrophage CL:1000698 None None A Tissue-Resident Macrophage That Is Part Of S... 32 None 2024-12-20 15:05:48.108162+00:00 1
637 6Jre47Wq podocyte CL:0000653 None glomerular podocyte|renal podocyte|glomerular ... A Specialized Kidney Epithelial Cell, Containe... 32 None 2024-12-20 15:05:48.016877+00:00 1
2367 6uz6J9Iu kidney cell CL:1000497 None None A Cell That Is Part Of A Kidney. 32 None 2024-12-20 15:05:48.106667+00:00 1
2372 aCd99zbB kidney glomerular epithelial cell CL:1000510 None None Any Kidney Epithelial Cell That Is Part Of Som... 32 None 2024-12-20 15:05:48.106929+00:00 1
2377 49gyr9eq kidney papillary duct principal epithelial cell CL:1000550 None None Any Kidney Cell That Is Part Of Some Papillary... 32 None 2024-12-20 15:05:48.107183+00:00 1
1577 33oeJRC2 kidney epithelial cell CL:0002518 None None An Epithelial Cell Of The Kidney. 32 None 2024-12-20 15:05:48.065523+00:00 1
634 2NbSmHfh mesangial cell CL:0000650 None kidney mesangial cell A Cell Type That Encapsulates The Capillaries ... 32 None 2024-12-20 15:05:48.016724+00:00 1
2386 29Q26GZo kidney inner medulla cell CL:1000617 None None Any Kidney Medulla Cell That Is Part Of Some I... 32 None 2024-12-20 15:05:48.107644+00:00 1
2391 6WI9ajDn kidney interstitial fibroblast CL:1000692 None None A Fibroblast That Is Part Of An Interstitial C... 32 None 2024-12-20 15:05:48.107907+00:00 1
1738 47edWu9P kidney cortical cell CL:0002681 None None A Cell That Is Part Of A Cortex Of Kidney. 32 None 2024-12-20 15:05:48.073860+00:00 1
1366 35I44SqG epithelial cell of distal tubule CL:0002305 None kidney distal tubule epithelial cell An Epithelial Cell Of The Distal Convoluted Tu... 32 None 2024-12-20 15:05:48.054586+00:00 1
1367 dKh1IfTu epithelial cell of proximal tubule CL:0002306 None kidney proximal tubule epithelial cell An Epithelial Cell Of The Proximal Tubule Of T... 32 None 2024-12-20 15:05:48.054637+00:00 1
2165 5oNUNCyF obsolete kidney collecting duct beta-intercala... CL:0700009 None B-IC|kidney collecting duct intercalated cell ... Obsolete. A Renal Beta-Intercalated Cell That ... 32 None 2024-12-20 15:05:48.096289+00:00 1
632 10kkFFar kidney granular cell CL:0000648 None JG cell|renin secreting cell A Smooth Muscle Cell That Synthesizes, Stores,... 32 None 2024-12-20 15:05:48.016614+00:00 1
2398 5z2I0IY0 kidney pelvis smooth muscle cell CL:1000702 None None Any Smooth Muscle Cell That Is Part Of Some Ki... 32 None 2024-12-20 15:05:48.108264+00:00 1
Query: kidne
uid name ontology_id abbr synonyms description source_id run_id created_at created_by_id
id
2384 6L22Q8yk kidney cortex tubule cell CL:1000615 None None Any Kidney Tubule Cell That Is Part Of Some Re... 32 None 2024-12-20 15:05:48.107542+00:00 1
2397 6d672m5q kidney resident dendritic cell CL:1000699 None None A Resident-Dendritic Cell That Is Part Of A Ki... 32 None 2024-12-20 15:05:48.108213+00:00 1
2368 4xMzxsTK kidney interstitial cell CL:1000500 None None A Cell That Is Part Of Kidney Interstitium. 32 None 2024-12-20 15:05:48.106726+00:00 1
2382 40ZjMXYx kidney nerve cell CL:1000606 None None Any Neuron That Has Its Soma Located In Some K... 32 None 2024-12-20 15:05:48.107440+00:00 1
2385 5pWp8yD8 kidney outer medulla cell CL:1000616 None None Any Kidney Medulla Cell That Is Part Of Some O... 32 None 2024-12-20 15:05:48.107593+00:00 1
2396 3GTV51hu kidney resident macrophage CL:1000698 None None A Tissue-Resident Macrophage That Is Part Of S... 32 None 2024-12-20 15:05:48.108162+00:00 1
637 6Jre47Wq podocyte CL:0000653 None glomerular podocyte|renal podocyte|glomerular ... A Specialized Kidney Epithelial Cell, Containe... 32 None 2024-12-20 15:05:48.016877+00:00 1
2367 6uz6J9Iu kidney cell CL:1000497 None None A Cell That Is Part Of A Kidney. 32 None 2024-12-20 15:05:48.106667+00:00 1
2372 aCd99zbB kidney glomerular epithelial cell CL:1000510 None None Any Kidney Epithelial Cell That Is Part Of Som... 32 None 2024-12-20 15:05:48.106929+00:00 1
2377 49gyr9eq kidney papillary duct principal epithelial cell CL:1000550 None None Any Kidney Cell That Is Part Of Some Papillary... 32 None 2024-12-20 15:05:48.107183+00:00 1
1577 33oeJRC2 kidney epithelial cell CL:0002518 None None An Epithelial Cell Of The Kidney. 32 None 2024-12-20 15:05:48.065523+00:00 1
634 2NbSmHfh mesangial cell CL:0000650 None kidney mesangial cell A Cell Type That Encapsulates The Capillaries ... 32 None 2024-12-20 15:05:48.016724+00:00 1
2386 29Q26GZo kidney inner medulla cell CL:1000617 None None Any Kidney Medulla Cell That Is Part Of Some I... 32 None 2024-12-20 15:05:48.107644+00:00 1
2391 6WI9ajDn kidney interstitial fibroblast CL:1000692 None None A Fibroblast That Is Part Of An Interstitial C... 32 None 2024-12-20 15:05:48.107907+00:00 1
1738 47edWu9P kidney cortical cell CL:0002681 None None A Cell That Is Part Of A Cortex Of Kidney. 32 None 2024-12-20 15:05:48.073860+00:00 1
1366 35I44SqG epithelial cell of distal tubule CL:0002305 None kidney distal tubule epithelial cell An Epithelial Cell Of The Distal Convoluted Tu... 32 None 2024-12-20 15:05:48.054586+00:00 1
1367 dKh1IfTu epithelial cell of proximal tubule CL:0002306 None kidney proximal tubule epithelial cell An Epithelial Cell Of The Proximal Tubule Of T... 32 None 2024-12-20 15:05:48.054637+00:00 1
2165 5oNUNCyF obsolete kidney collecting duct beta-intercala... CL:0700009 None B-IC|kidney collecting duct intercalated cell ... Obsolete. A Renal Beta-Intercalated Cell That ... 32 None 2024-12-20 15:05:48.096289+00:00 1
632 10kkFFar kidney granular cell CL:0000648 None JG cell|renin secreting cell A Smooth Muscle Cell That Synthesizes, Stores,... 32 None 2024-12-20 15:05:48.016614+00:00 1
2398 5z2I0IY0 kidney pelvis smooth muscle cell CL:1000702 None None Any Smooth Muscle Cell That Is Part Of Some Ki... 32 None 2024-12-20 15:05:48.108264+00:00 1

Check escaping of special characters.

assert len(ln.ULabel.search("cat[")) == 1
assert len(ln.ULabel.search("*_*")) == 1

Search the public ontology

ct_public = bt.CellType.public()

df = ct_public.search("b cell", limit=20)
assert df.iloc[0]["name"] == "B cell"
df
Hide code cell output
name definition synonyms parents
ontology_id
CL:0000236 B cell A Lymphocyte Of B Lineage That Is Capable Of B... B lymphocyte|B-cell|B-lymphocyte [CL:0000945]
CL:0000822 B-2 B cell A Conventional B Cell Subject To Antigenic Sti... B2 B lymphocyte|B-2 B-cell|B2 B-lymphocyte|B-2... [CL:0000785]
CL:0000843 follicular B cell A Resting Mature B Cell That Has The Phenotype... follicular B lymphocyte|Fo B-cell|Fo B cell|fo... [CL:0000822]
CL:0000844 germinal center B cell A Rapidly Cycling Mature B Cell That Has Disti... GC B-lymphocyte|germinal center B-cell|GC B ce... [CL:0000785]
CL:0000816 immature B cell An Immature B Cell Is A B Cell That Has The Ph... immature B lymphocyte|immature B-cell|immature... [CL:0001201]
CL:0000845 marginal zone B cell of spleen A Mature B Cell That Is Located In The Margina... B cell of marginal zone of spleen|marginal zon... [CL:2000074, CL:0000785]
CL:0000819 B-1 B cell A B Cell Of Distinct Lineage And Surface Marke... B1 B-cell|B-1 B-lymphocyte|B-1 B-cell|B1 cell|... [CL:0000785]
CL:0000820 B-1a B cell A B-1 B Cell That Has The Phenotype Cd5-Positive. B1a B lymphocyte|B-1a B-lymphocyte|B1a B-cell|... [CL:0000819]
CL:0000821 B-1b B cell A B-1 B Cell That Has The Phenotype Cd5-Negati... B1b B-lymphocyte|B-1b B-lymphocyte|B1b B cell|... [CL:0000819]
CL:0000818 transitional stage B cell An Immature B Cell Of An Intermediate Stage Be... transitional B cell|transitional stage B-cell|... [CL:0001201]
CL:0000958 T1 B cell A Transitional Stage B Cell That Migrates From... T1 B lymphocyte|T1 B-cell|T1 B-lymphocyte|tran... [CL:0000818]
CL:0000959 T2 B cell A Transitional Stage B Cell That Has The Pheno... T2 B lymphocyte|T2 B-cell|transitional stage 2... [CL:0000818]
CL:0000960 T3 B cell A Transitional Stage B Cell That Expresses Sur... T3 B-lymphocyte|T3 B-cell|T3 B lymphocyte|An1 ... [CL:0000818]
CL:0000948 IgE memory B cell A Class Switched Memory B Cell That Expresses ... IgE memory B lymphocyte|IgE memory B-cell|memo... [CL:0000972]
CL:0000971 IgM memory B cell An Igm Memory B Cell Is An Unswitched Memory B... memory IgM B cell|memory IgM B-lymphocyte|IgM ... [CL:0001053]
CL:0000970 unswitched memory B cell An Unswitched Memory B Cell Is A Memory B Cell... unswitched memory B lymphocyte|unswitched memo... [CL:0000787]
CL:0000979 IgG memory B cell An Igg Memory B Cell Is A Class Switched Memor... IgG memory B-lymphocyte|memory IgG B-cell|memo... [CL:0000972]
CL:0000964 Bm2' B cell A Germinal Center B Cell That Founds A Germina... Bm2' B lymphocyte|Bm2' B-cell|Bm2-prime B cell... [CL:0000844]
CL:0001053 IgD-negative memory B cell A Memory B Cell That Lacks Expression Of Surfa... IgD- memory B cell [CL:0000787]
CL:0000981 double negative memory B cell A Memory B Cell With The Phenotype Igd-Negativ... dn memory B-lymphocyte|dn memory B cell|dn mem... [CL:0001053]
Hide code cell content
!docker stop pgtest && docker rm pgtest
!lamin delete --force benchmark_search
pgtest
pgtest
! delete() does not yet affect your Postgres database at postgresql://postgres:[email protected]:5432/pgtest
 deleting instance testuser1/benchmark_search