<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Herr, B.W., Hardi, J., Quardokus, E.M. et al. Specimen, biological structure, and spatial
ontologies in support of a Human Reference Atlas. Sci Data</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.1093/nar/gkac888</article-id>
      <title-group>
        <article-title>CellCards: Development of a dynamic ontology-derived ETL pipeline for automatic cell information extraction and analysis</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Mary Czelusniak</string-name>
          <email>czmary@umich.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Emily Tran</string-name>
          <email>etran@umich.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fatima Oudeif</string-name>
          <email>faoudeif@wccnet.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jie Zheng</string-name>
          <email>jiezhen@med.umich.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>William D. Duncan</string-name>
          <email>wdduncan@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alexander D. Diehl</string-name>
          <email>addiehl@buffalo.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yongqun He</string-name>
          <email>yongqunh@med.umich.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Cell</institution>
          ,
          <addr-line>Ontology, Cell Ontology, Uber-anatomy Ontology, Gene Ontology, Cell Line Ontology, Common Coordinate Framework Ontology, Knowledgebase, ETL (Extract, Transform, Load), Python, SPARQL, Multi-Threading</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University at Buffalo</institution>
          ,
          <addr-line>Buffalo, NY</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Florida</institution>
          ,
          <addr-line>Gainesville, FL</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>University of Michigan</institution>
          ,
          <addr-line>Ann Arbor, MI</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2007</year>
      </pub-date>
      <volume>10</volume>
      <issue>171</issue>
      <fpage>8</fpage>
      <lpage>9</lpage>
      <abstract>
        <p>The CellCards knowledgebase aims to systematically gather, and represent individual cell types. This study presents our development of a dynamic extraction, transformation, and loading (ETL) pipeline designed to automatically populate the CellCards database with a vast array of cells from ontologies, including the Cell Ontology (CL) and Cell Line Ontology (CLO). The CellCards database schema includes five tables, with a key feature being the use of one table to encompass all necessary terms from the ontologies and another table to outline the relationships among these terms. The ETL process is powered by a Python script that embeds SPARQL queries directed at the Ontobee SPARQL endpoint. The final ETL program successfully extracted and loaded over 3,500 cell types from CL and 40,000 cell line entries from CLO into the new CellCards database, including the cell type name, parent cell type, synonyms, anatomical locations, etc. The gene biomarkers of cells were automatically extracted from the Common Coordinate Framework Ontology (CCFO). This enhanced database will be used to update the website and query program, with these updates scheduled for summer 2024.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        CellCards (https://cellcards.org) is an innovative, ontology-based knowledge system designed to
systematically collect and integrate cell type information from a variety of sources about the diverse
array of cells of the human body [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. By doing so, CellCards aims to utilize the hierarchical
organization of cellular data, paving the way for a structured approach to understanding cellular
functions and relationships.
      </p>
      <p>Ontologies have been widely used to consistently and semantically represent the knowledge
about various cell types. The Cell Ontology (CL) [2] and Cell Line Ontology (CLO) [3] are two
community-based ontologies for representing various cell types and cell line cells, respectively,
which were used as our primary source of data extraction and reference for associating each cell
type’s annotations and relationships correctly. Other cell-related ontologies utilized include Uberon
Anatomic Entity Ontology [4], used primarily for fetching anatomical entities that have
relationships with cells from CL or CLO, Common Coordinate Framework Ontology (CCFO) [5] as
the primary source of biomarker data, and the HUGO Gene Nomenclature Committee (HGNC) [6]
as the source for related biomarkers IDs.</p>
      <p>This paper reports our development of an enhanced ETL (Extract, Transform, Load) data
pipeline that extracts, transforms, and loads over 3,000 cell types from CL and 35,000 cell lines from</p>
      <p>CLO, adding to around 45,000 rows of data across the tables in the CellCards database, utilizing
methods such as multi-threading, and REST API requests, programs such as MySQL Workbench to
manage the database, different query languages such as SPARQL and SQL to extract and load data,
and Python that executes the ETL pipeline.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Methods</title>
      <p>Data sources: Cell information is extracted from the CL [2] and CLO [3], gene names/labels and its
association with each cell type contained within the aforementioned ontologies come from CCFO [5]
and its annotation comes from HGNC [6].</p>
      <p>Updated design of CellCards MySQL database schema: The new database schema is based
on the Genomics Unified Schema (GUS) Schema that was originally developed for the VEuPathDB
project (https://github.com/VEuPathDB/GusSchema). Instead of having each type of entity (such as
cell, cell line, anatomical entity, gene, etc.) as a table, the GUS schema uses a small number of general
tables to represent different types of entities.</p>
      <p>ETL development: The ETL data extraction method automates the data insertion process into
the various tables within the CellCards MySQL database. A Python script was developed to streamline
this workflow. The ETL process can be broken down into three main steps: (1) Extract: The ETL
program embeds specific SPARQL query scripts to extract data from the ontologies. The most efficient
scripts were integrated into the Python script through use of the SPARQLWrapper library
(https://github.com/RDFLib/sparqlwrapper). This step involves taking an input cell ID (e.g.,
CL_0000653) and its relevant ontology (such as CL or CLO) and appending them to an
Internationalized Resource Identifier (IRI) prefix to perform the SPARQL query appropriately. (2)
Transform: Once the data is extracted, the next step is to transform it into the desired format. This
might involve operations such as trimming whitespace, adding semicolons, or compiling multiple
values into a single list if storage in a single column is desired. (3) Load: This final step involves all
the operations required to load transformed data into its appropriate table in the CellCards database.</p>
      <p>A slightly different approach was taken to obtain the biomarker information during the extraction
and transformation steps. Firstly, a SPARQL query on the CCFO ontology was executed to get each
cell's biomarker IDs (HGNC IDs) and names. Then, three data structures were utilized to efficiently
associate each biomarker with its corresponding cells: a set that contained all distinct HGNC IDs
returned from the SPARQL query and two hashmaps. The first hashmap mapped a CL IRI to its key
in the t_cells table, allowing a quick lookup of cell information. The second hashmap mapped an
HGNC ID to a list of strings, with the gene's label as its first entry. This list of strings was then
populated by the t_cells IDs of the cells associated with this biomarker as the results from the SPARQL
query were parsed, where each cell's t_cells ID was obtained through its association to its CL IRI in
the first hashmap mentioned, ensuring that each cell type's biomarker data was accurately linked to
its database entry.</p>
      <p>Once the initial associations were made, the set of HGNC IDs was used to perform a request on
the HGNC REST API to obtain the gene's NCBI Entrez Gene [7] and PR [8] IDs. Since a set was used
as its container, we were guaranteed non-repeated HGNC IDs, meaning no unnecessary requests
would be made. Four threads were then utilized to perform this task, where each executed the request
to the REST API with a quarter of the HGNC set while respecting the API's limits of 10 requests per
second. Implementing multi-threading was crucial for run-time efficiency, as without multiple
threads, this process would take about 30 minutes to complete compared to the current 2-minute total
run time, significantly speeding up the data extraction process and ensuring that the large volume of
biomarker data was processed promptly without overloading the API. The Ontology of Genes and
Genomes (OGG) identifiers were calculated based on its associated NCBI Entrez Gene IDs and the
OGG ID generation rule [9].</p>
      <p>After this process was done, the results from the threads were combined into another hashmap,
where the HGNC ID mapped to a list of size 3, containing, in order, its PR ID, NCBI Gene ID, and
description, which was then used to perform the insertion into the t_gene_proteins table in a similar
fashion as the preceding tables.</p>
      <p>Testing and evaluation: Our team utilized a manually generated podocyte CellCard to determine
the specific information we needed to retrieve for each cell type. By closely examining the
relationships and attributes listed on the podocyte CellCard, we could refine our data extraction and
transformation processes to ensure we captured all relevant details. Several different ways of
inputting data into the script were also developed, such as command line options for reading in CSV
files (file input redirection) or creating a CSV file with the results from the queries.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Results</title>
      <p>3.1</p>
      <sec id="sec-3-1">
        <title>CellCards database schema design</title>
        <p>Our updated CellCards MySQL database includes 5 populated tables (Figure 2). The table t_cells
contains general information about the cell type and an ID that links a cell type to its biomarkers in
the t_gene_proteins table, t_synonyms lists alternative names and identifiers, t_ontology_term
catalogs its ontology data, t_ontology_term_relation outlines the relationships within its original
ontology, and t_gene_proteins records its associated biomarkers and their identifiers across NCBI,
HGNC, OGG and PR.</p>
      </sec>
      <sec id="sec-3-2">
        <title>Ontology-based ETL extraction of cell information</title>
        <p>Using the ETL data extraction method, we successfully loaded all of the data present in CL and CLO
into the CellCards database tables t_cells, t_synonyms, t_ontology_term, t_gene_proteins, and
t_ontology_term_relation, while optimizing run times by employing multi-threading, significantly
reducing processing time when requesting data through the HGNC REST API.</p>
        <p>Currently, 2 SPARQL scripts are implemented into the Python ETL and it collectively fetches
information such as: cell ID, name, definition, “part of” relationships, synonyms, database references,
and HGNC IDs. This integration formed a flexible and robust scaffold capable of retrieving all of the
required attributes and characteristics associated with an arbitrary cell ID from either CL or CLO.</p>
        <p>Figure 3 provides a comprehensive illustration of the data available for "podocyte" (CL_0000653)
across the tables t_cells, t_synonyms, t_ontology_term, t_ontology_term_relation, and
t_gene_proteins. The figure highlights the detailed and interconnected nature of the data.</p>
        <p>The database now holds over 45,000 rows of data across these five tables. Each table serves a
distinct purpose in encapsulating the vast array of information derived from the CL and CLO. This
includes not just basic cell type data but also complex relational data that ties together synonyms,
ontology terms, and biomarker information, thereby offering a robust and comprehensive resource
for researchers. This extensive dataset ensures that researchers have access to a wealth of information
for in-depth analysis and study, further advancing our understanding of cellular biology and
ontology.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Discussion</title>
      <p>The CellCards ETL (Extract, Transform, Load) method proved to be highly efficient in extracting,
transforming, and loading thousands of cell records from both the Cell Ontology (CL) and the Cell
Line Ontology (CLO) into the CellCards database. This process not only established a comprehensive
foundation for unifying diverse cell type data but also enabled the detailed mapping of cell type
connections, relationships, and interactions. By doing so, it provides a robust backend infrastructure
for the CellCards website.</p>
      <p>Developed with semantically enabled interoperable ontologies, CellCards ensures that its data is
both machine-readable and human-readable, facilitating better understanding and utilization of cell
data. This design allows the database to seamlessly integrate with various programs, enhancing its
utility across a wide range of applications, including bioinformatics, computational biology, clinical
research, and drug development. The ability to integrate CellCards into different computational and
analytical contexts significantly broadens its applicability and effectiveness in supporting scientific
research and innovation.</p>
      <p>Future direction: The plan for the web interface is to be simple yet powerful, allowing users to
navigate and access information efficiently. Future enhancements will include additional
computational analysis tools that leverage the extensive knowledge within the database.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgements References</title>
      <p>We acknowledge the Undergraduate Research Opportunity Program (UROP) of the University of
Michigan for supporting MC’s research on the project.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>He</surname>
            <given-names>Y</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Duncan</surname>
            <given-names>W</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Oudeif</surname>
            <given-names>F</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lloyd</surname>
            <given-names>A</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tian</surname>
            <given-names>Y</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            <given-names>Y</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cooke</surname>
            <given-names>M</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Diehl</surname>
            <given-names>AD</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mungall</surname>
            <given-names>C</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hur</surname>
            <given-names>J</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Clarkson</surname>
            <given-names>M</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ferrez</surname>
            <given-names>M</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bvrd</surname>
            <given-names>JB</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schaub</surname>
            <given-names>J</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sarder</surname>
            <given-names>P</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jain</surname>
            <given-names>S.</given-names>
          </string-name>
          <article-title>CellCards: An ontology-based knowledgebase for categorization and analysis of individual cells and cell connectomes</article-title>
          .
          <source>The 6th International Cells in Experimental Life Science Workshop (CELLS</source>
          <year>2022</year>
          )
          <article-title>, in association with the 2022 International Conference on Biomedical Ontologies (ICBO-</article-title>
          <year>2022</year>
          ), Ann Arbor, MI, USA.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <given-names>A. D.</given-names>
            <surname>Diehl</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. F.</given-names>
            <surname>Meehan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y. M.</given-names>
            <surname>Bradford</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. H.</given-names>
            <surname>Brush</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W. M.</given-names>
            <surname>Dahdul</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Dougall</surname>
          </string-name>
          , et al.,
          <source>"The Cell Ontology</source>
          <year>2016</year>
          :
          <article-title>enhanced content, modularization, and ontology interoperability," J Biomed Semantics</article-title>
          , vol.
          <volume>7</volume>
          , p.
          <fpage>44</fpage>
          ,
          <string-name>
            <surname>July</surname>
            <given-names>4</given-names>
          </string-name>
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <given-names>S.</given-names>
            <surname>Shantivijai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Xiang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. F.</given-names>
            <surname>Meehan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. D.</given-names>
            <surname>Diehl</surname>
          </string-name>
          , U. D.
          <string-name>
            <surname>Vempati</surname>
          </string-name>
          , et al.,
          <article-title>"CLO: The Cell Line Ontology," J Biomed Semantics</article-title>
          , vol.
          <volume>5</volume>
          , p.
          <fpage>37</fpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>C. J. Mungall</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Torniai</surname>
            ,
            <given-names>G. V.</given-names>
          </string-name>
          <string-name>
            <surname>Gkoutos</surname>
            ,
            <given-names>S. E.</given-names>
          </string-name>
          <string-name>
            <surname>Lewis</surname>
            , and
            <given-names>M. A.</given-names>
          </string-name>
          <string-name>
            <surname>Haendel</surname>
          </string-name>
          ,
          <article-title>"Uberon, an integrative multi-species anatomy ontology,"</article-title>
          <source>Genome Biol</source>
          , vol.
          <volume>13</volume>
          , p.
          <fpage>R5</fpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>