Skip to contents

Pure. Reads the DISEASE comments of an entry.

Usage

uniprot_parse_diseases(body)

Arguments

body

A parsed UniProtKB entry.

Value

A tibble of id, name, acronym, mim, causal, and source_url. NULL when the entry curates no disease involvement.

The causal distinction

UniProt's disease notes separate two very different claims. "The disease is caused by variants affecting the gene" is a Mendelian statement; "may be involved in the pathogenesis" is far weaker. Both arrive as DISEASE comments, so treating them alike would promote a speculative association to a causal one. causal carries the distinction, read from the note text.

Examples

body <- list(comments = list(list(
  commentType = "DISEASE",
  disease = list(
    diseaseAccession = "DI-00218", diseaseId = "Li-Fraumeni syndrome",
    acronym = "LFS", diseaseCrossReference = list(database = "MIM", id = "151623")
  ),
  note = list(texts = list(list(value = "The disease is caused by variants")))
)))
uniprot_parse_diseases(body)
#> # A tibble: 1 × 6
#>   id       name                 acronym mim    causal source_url                
#>   <chr>    <chr>                <chr>   <chr>  <lgl>  <chr>                     
#> 1 DI-00218 Li-Fraumeni syndrome LFS     151623 TRUE   https://www.uniprot.org/d…