The package rbiolink
provides an interface to the BioLink
API.
You can install the development version from Github.
# install.packages("devtools")
devtools::install_github("frequena/rbiolink")
library(rbiolink)
biolink_bioentity(ref_id = 'gene', id = 'HGNC:2865', query_id = 'anatomy')
#> # A tibble: 20 x 16
#> id type subject$taxon$id $$label $id $label $iri $category
#> <chr> <lgl> <chr> <chr> <chr> <chr> <chr> <list>
#> 1 4fde… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> 2 d7de… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> 3 8002… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> 4 cba3… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> 5 351c… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> 6 d8d3… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> 7 bbb2… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> 8 2ae7… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> 9 0726… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> 10 abbd… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> 11 b18f… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> 12 52bb… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> 13 c3f2… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> 14 42bf… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> 15 9a4d… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> 16 9712… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> 17 532c… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> 18 cba8… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> 19 e84b… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> 20 e0cd… NA NCBITaxon:9606 Homo s… HGNC… DHH http… <chr [1]>
#> # … with 23 more variables: subject_eq <lgl>, subject_extensions <lgl>,
#> # object$taxon$id <chr>, $$label <chr>, $id <chr>, $label <chr>,
#> # $iri <chr>, $category <list>, object_eq <lgl>,
#> # object_extensions <lgl>, relation$inverse <lgl>, $id <chr>,
#> # $label <chr>, $iri <chr>, $category <lgl>, slim <lgl>, negated <lgl>,
#> # qualifiers <lgl>, evidence_graph$nodes <list>, $edges <list>,
#> # evidence_types <list>, provided_by <list>, publications <list>
This is a basic example which shows you how to solve a common problem:
abstract_input <- 'Marfan syndrome is a multisystemic genetic condition affecting connective tissue. It carries a reduced life expectancy, largely dependent on cardiovascular complications. More common cardiac manifestations such as aortic dissection and aortic valve incompetence have been widely documented in the literature. Mitral valve prolapse (MVP), however, has remained poorly documented. This article aims at exploring the existing literature on the pathophysiology and diagnosis of MVP in patients with Marfan syndrome, defining its current management and outlining the future developments surrounding it.'
result <- biolink_annotate('nlp/annotate', content = abstract_input)
result$content
#> # A tibble: 3 x 3
#> name id category
#> <chr> <chr> <chr>
#> 1 "\"Tissue" WBbt:0005729 anatomical entity
#> 2 connective tissue UBERON:0002384 anatomical entity
#> 3 tissue UBERON:0000479 "anatomical entity\""
biolink_search_similar(id = c('HP:0001166', 'HP:0030029'), metric = 'symmetric_resnik')
#> # A tibble: 100 x 8
#> rank score significance pairwise_match type taxon$id $label id
#> <chr> <dbl> <dbl> <list> <chr> <chr> <chr> <chr>
#> 1 1 4.93 NaN <df[,3] [1 × … dise… NCBITax… Homo … MOND…
#> 2 1 4.93 NaN <df[,3] [1 × … dise… NCBITax… Homo … MOND…
#> 3 1 4.93 NaN <df[,3] [1 × … dise… NCBITax… Homo … MOND…
#> 4 1 4.93 NaN <df[,3] [1 × … dise… NCBITax… Homo … MOND…
#> 5 1 4.93 NaN <df[,3] [1 × … dise… NCBITax… Homo … MOND…
#> 6 1 4.93 NaN <df[,3] [1 × … dise… NCBITax… Homo … MOND…
#> 7 1 4.93 NaN <df[,3] [1 × … dise… <NA> <NA> OMIA…
#> 8 1 4.93 NaN <df[,3] [1 × … dise… NCBITax… Homo … MOND…
#> 9 1 4.93 NaN <df[,3] [1 × … dise… NCBITax… Homo … MOND…
#> 10 2 4.89 NaN <df[,3] [1 × … dise… NCBITax… Homo … MOND…
#> # … with 90 more rows, and 1 more variable: label <chr>
biolink_similarity(ref_id = c('HP:0001166', 'HP:0030029'),
query_id = c('HP:0001627', 'HP:0004095'),
metric = 'symmetric_resnik')$lcs_ic
#> [1] 4.934727
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.