Skip to contents

Introduction

Cellosaurus is a comprehensive knowledge resource dedicated to cell lines, providing a wealth of information about various types of cells used in biomedical research. It serves as a centralized repository that offers detailed data on cell lines, including their origins, characteristics, authentication methods, references, and more. Please view the Cellosaurus website at https://web.expasy.org/cellosaurus/ for more information and a detailed description can be found at https://www.cellosaurus.org/description.html.

The AnnotationGx package provides a wrapper around the Cellosaurus API to map cell line identifiers to the Cellosaurus database fields.

Setup

library(AnnotationGx)
library(data.table)

# set options to warn to quiet info logs
options("log_level" = "WARN")

Mapping from Cell Line name to Accession id

The main function that is provided by the package is mapCell2Accession. This function takes in a vector of cell line identifiers and returns a data.table.

By default, the function will try to map using the common identifiers and synonyms (from = "idsy") and will return the the Standardized Identifier as cellLineName and the Cellosaurus Accession ID accession. The function also returns an additional column query which can be used to identify the original query if needed.

Let’s see how we can use this function to map the “HeLa” and “A549” cell line names to the Cellosaurus database.

mapCell2Accession("hela")
#> [22:04:18][INFO][AnnotationGx::mapCell2Accession] Creating Cellosaurus queries 
#> [22:04:18][INFO][AnnotationGx::mapCell2Accession] Building Cellosaurus requests 
#> [22:04:18][INFO][AnnotationGx::mapCell2Accession] Performing Cellosaurus queries 
#> [22:04:20][INFO][AnnotationGx::mapCell2Accession] Parsing Cellosaurus responses 
#>    cellLineName accession  query
#>          <char>    <char> <char>
#> 1:         HeLa CVCL_0030   hela
mapCell2Accession("A549")
#> [22:04:22][INFO][AnnotationGx::mapCell2Accession] Creating Cellosaurus queries 
#> [22:04:22][INFO][AnnotationGx::mapCell2Accession] Building Cellosaurus requests 
#> [22:04:22][INFO][AnnotationGx::mapCell2Accession] Performing Cellosaurus queries 
#> [22:04:23][INFO][AnnotationGx::mapCell2Accession] Parsing Cellosaurus responses 
#>    cellLineName accession  query
#>          <char>    <char> <char>
#> 1:        A-549 CVCL_0023   A549

Functionality for mapping multiple cell lines is also supported.

mapCell2Accession(c("A549", "THIS SHOULD FAIL", "BT474"))
#> [22:04:26][INFO][AnnotationGx::mapCell2Accession] Creating Cellosaurus queries 
#> [22:04:26][INFO][AnnotationGx::mapCell2Accession] Building Cellosaurus requests 
#> [22:04:26][INFO][AnnotationGx::mapCell2Accession] Performing Cellosaurus queries 
#> [22:04:27][INFO][AnnotationGx::mapCell2Accession] Parsing Cellosaurus responses 
#>    cellLineName accession            query
#>          <char>    <char>           <char>
#> 1:        A-549 CVCL_0023             A549
#> 2:         <NA>      <NA> THIS SHOULD FAIL
#> 3:       BT-474 CVCL_0179            BT474

By default, the function will parse the API responses to return the most common mapping. To return all possible mappings, set parsed = FALSE.

# parsed
mapCell2Accession(c("A549", "hela", "BT474"), parsed = TRUE)
#> [22:04:30][INFO][AnnotationGx::mapCell2Accession] Creating Cellosaurus queries 
#> [22:04:30][INFO][AnnotationGx::mapCell2Accession] Building Cellosaurus requests 
#> [22:04:30][INFO][AnnotationGx::mapCell2Accession] Performing Cellosaurus queries 
#> [22:04:30][INFO][AnnotationGx::mapCell2Accession] Parsing Cellosaurus responses 
#>    cellLineName accession  query
#>          <char>    <char> <char>
#> 1:        A-549 CVCL_0023   A549
#> 2:         HeLa CVCL_0030   hela
#> 3:       BT-474 CVCL_0179  BT474

# no parsing
mapCell2Accession(c("A549", "hela", "BT474"), parsed = FALSE)
#> [22:04:33][INFO][AnnotationGx::mapCell2Accession] Creating Cellosaurus queries 
#> [22:04:33][INFO][AnnotationGx::mapCell2Accession] Building Cellosaurus requests 
#> [22:04:33][INFO][AnnotationGx::mapCell2Accession] Performing Cellosaurus queries 
#> [22:04:34][INFO][AnnotationGx::mapCell2Accession] Parsing Cellosaurus responses 
#>       cellLineName accession  query
#>             <char>    <char> <char>
#>    1:        A-549 CVCL_0023   A549
#>    2:   A549(VM)28 CVCL_4V06   A549
#>    3:   A549(VP)28 CVCL_4V07   A549
#>    4:  A549.EpoB40 CVCL_4Z15   A549
#>    5:    A549-Dual CVCL_5I73   A549
#>   ---                              
#> 2587:  BT474-LAPRa CVCL_EI02  BT474
#> 2588:  BT474-LAPRb CVCL_EI03  BT474
#> 2589:     BT474-LR CVCL_VL01  BT474
#> 2590:     BT474 A3 CVCL_YX79  BT474
#> 2591:     BT474-J4 CVCL_ZL46  BT474

Misspellings and synonyms

The backend of the function also tries to map any misspellings or synonyms of the cell line names.


samples <- c("SK23", "SJCRH30")
mapCell2Accession(samples)
#> [22:04:37][INFO][AnnotationGx::mapCell2Accession] Creating Cellosaurus queries 
#> [22:04:37][INFO][AnnotationGx::mapCell2Accession] Building Cellosaurus requests 
#> [22:04:37][INFO][AnnotationGx::mapCell2Accession] Performing Cellosaurus queries 
#> [22:04:37][INFO][AnnotationGx::mapCell2Accession] Parsing Cellosaurus responses 
#>    cellLineName accession   query
#>          <char>    <char>  <char>
#> 1:    SK-MEL-23 CVCL_6027    SK23
#> 2:         Rh30 CVCL_0041 SJCRH30

If some cell lines still cannot be found, there is an additional parameter for fuzzy searching


# No fuzzy 
mapCell2Accession("DOR 13")
#> [22:04:37][INFO][AnnotationGx::mapCell2Accession] Creating Cellosaurus queries 
#> [22:04:37][INFO][AnnotationGx::mapCell2Accession] Building Cellosaurus requests 
#> [22:04:37][INFO][AnnotationGx::mapCell2Accession] Performing Cellosaurus queries 
#> [22:04:37][INFO][AnnotationGx::mapCell2Accession] Parsing Cellosaurus responses 
#> [22:04:37][WARNING]No results found for DOR 13 
#>     query
#>    <char>
#> 1: DOR 13

# Fuzzy
mapCell2Accession("DOR 13", fuzzy =T)
#> [22:04:37][INFO][AnnotationGx::mapCell2Accession] Creating Cellosaurus queries 
#> [22:04:37][INFO][AnnotationGx::mapCell2Accession] Building Cellosaurus requests 
#> [22:04:37][INFO][AnnotationGx::mapCell2Accession] Performing Cellosaurus queries 
#> [22:04:37][INFO][AnnotationGx::mapCell2Accession] Parsing Cellosaurus responses 
#>    cellLineName accession  query
#>          <char>    <char> <char>
#> 1:        DOV13 CVCL_6774 DOR 13

Annotating Cellosaurus Accessions

Once accession IDs are obtained and the mappings are satisfactory, they can then be mapped to other fields in the Cellosaurus database. A list of available fields can be found using cellosaurus_fields()

cellosaurus_fields()
#>  [1] "id"                 "sy"                 "idsy"              
#>  [4] "ac"                 "acas"               "dr"                
#>  [7] "ref"                "rx"                 "ra"                
#> [10] "rt"                 "rl"                 "ww"                
#> [13] "genome-ancestry"    "hla"                "registration"      
#> [16] "sequence-variation" "anecdotal"          "biotechnology"     
#> [19] "breed"              "caution"            "cell-type"         
#> [22] "characteristics"    "donor-info"         "derived-from-site" 
#> [25] "discontinued"       "doubling-time"      "from"              
#> [28] "group"              "karyotype"          "knockout"          
#> [31] "msi"                "miscellaneous"      "misspelling"       
#> [34] "mab-isotype"        "mab-target"         "omics"             
#> [37] "part-of"            "population"         "problematic"       
#> [40] "resistance"         "senescence"         "transfected"       
#> [43] "transformant"       "virology"           "cc"                
#> [46] "str"                "di"                 "din"               
#> [49] "dio"                "ox"                 "sx"                
#> [52] "ag"                 "oi"                 "hi"                
#> [55] "ch"                 "ca"                 "dt"                
#> [58] "dtc"                "dtu"                "dtv"

The annotateCellAccession() function can be used to map the accession IDs to the desired fields. By default the function will try to map to "id", "ac", "hi", "sy", "ca", "sx", "ag", "di", "derived-from-site", "misspelling", "dt"


# Annotate the A549 cell line
mappedAccessions <- mapCell2Accession("A549")
#> [22:04:38][INFO][AnnotationGx::mapCell2Accession] Creating Cellosaurus queries 
#> [22:04:38][INFO][AnnotationGx::mapCell2Accession] Building Cellosaurus requests 
#> [22:04:38][INFO][AnnotationGx::mapCell2Accession] Performing Cellosaurus queries 
#> [22:04:39][INFO][AnnotationGx::mapCell2Accession] Parsing Cellosaurus responses 

annotateCellAccession(accessions = mappedAccessions$accession)
#> [22:04:42][INFO][AnnotationGx::annotateCellAccession] Building Cellosaurus requests... 
#> [22:04:42][INFO][AnnotationGx::annotateCellAccession] Performing Requests... 
#> [22:04:42][INFO][AnnotationGx::annotateCellAccession] Parsing Responses... 
#>    cellLineName accession         category
#>          <char>    <char>           <char>
#> 1:        A-549 CVCL_0023 Cancer cell line
#>                                                      date ageAtSampling
#>                                                    <char>        <char>
#> 1: Created: 04-04-12; Last updated: 30-01-24; Version: 47           58Y
#>    sexOfCell                                             synonyms  diseases
#>       <char>                                               <list>    <list>
#> 1:      Male A 549,A549,NCI-A549,A549/ATCC,A549 ATCC,A549ATCC,... <list[1]>
#>    crossReferences hierarchy  comments
#>             <char>    <char>    <list>
#> 1:            <NA>      <NA> <list[2]>