From 61ed1c301723bc04999ce1703626804e1ffc306f Mon Sep 17 00:00:00 2001 From: allenbaron Date: Fri, 15 Mar 2024 20:34:10 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20DiseaseO?= =?UTF-8?q?ntology/DO.utils@f6dc1f3b35777384a2115a527a8526523de7befe=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- news/index.html | 2 ++ pkgdown.yml | 2 +- reference/plot_citedby.html | 31 ++++++++++++++++++++++++++----- search.json | 2 +- 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/news/index.html b/news/index.html index 14e2440..068bf01 100644 --- a/news/index.html +++ b/news/index.html @@ -61,6 +61,8 @@

DO Management & Analysi

Updated

New

diff --git a/pkgdown.yml b/pkgdown.yml index c2e5a00..f6f98b4 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -4,7 +4,7 @@ pkgdown_sha: ~ articles: obtain_use_records: obtain_use_records.html use-reticulate-python: use-reticulate-python.html -last_built: 2024-02-28T17:51Z +last_built: 2024-03-15T20:33Z urls: reference: https://allenbaron.github.io/DO.utils/reference article: https://allenbaron.github.io/DO.utils/articles diff --git a/reference/plot_citedby.html b/reference/plot_citedby.html index 9a0234e..3c28e48 100644 --- a/reference/plot_citedby.html +++ b/reference/plot_citedby.html @@ -58,7 +58,9 @@

Usage
plot_citedby(
   data_file = "data/citedby/DO_citedby.csv",
   out_dir = "graphics/website",
-  color_set = c("#C45055", "#934FBB", "#95B1BB", "#83C85F", "#B9964B", "#4C3E45"),
+  color_set = c(Article = "#4C3E45", `Clinical Trial` = "#B9964B", Book = "#83C85F",
+    Conference = "#95B1BB", Review = "#934FBB", Other = "#C45055", Retracted = "#000000"),
+  retracted = "warn",
   w = 6,
   h = 3.15
 )
@@ -77,10 +79,17 @@

ArgumentsDO_colors. Available sets include: "sat", "accent1", "accent2", -and "orange". The default and light versions of the specified color set -will be used.

+

A named set of 7 colors, one for each of +the possible publication types (see Colors section) or the +prefix of the color set to use from DO_colors, as a character vector.

+ + +
retracted
+

How to handle retracted publications, as a string. +One of:

  • "warn" (default) to drop them with a warning.

  • +
  • "include" to display them in the plot in their own category.

  • +
  • "other" to include them in the "Other" category.

  • +
w
@@ -97,6 +106,18 @@

Data PreparationTo prepare data, execute scripts/citedby_full_procedure.R.

+
+

Colors

+ + +

If specifying a color set manually, one color should be included for each of +the following publication types: "Article", "Book", "Clinical Trial", +"Conference", "Review", "Other", "Retracted". "Other" serves as a catch all +category (generally a small subset of otherwise uncategorized publications).

+

Sets available in DO_colors include: "sat" (saturated), "accent1", +"accent2", and "orange". The default and light versions of the specified +color set will be used to generate a gradient.

+
diff --git a/search.json b/search.json index e9392fa..362b9b6 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"CC0 1.0 Universal","title":"CC0 1.0 Universal","text":"CREATIVE COMMONS CORPORATION LAW FIRM PROVIDE LEGAL SERVICES. DISTRIBUTION DOCUMENT CREATE ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES INFORMATION “-” BASIS. CREATIVE COMMONS MAKES WARRANTIES REGARDING USE DOCUMENT INFORMATION WORKS PROVIDED HEREUNDER, DISCLAIMS LIABILITY DAMAGES RESULTING USE DOCUMENT INFORMATION WORKS PROVIDED HEREUNDER.","code":""},{"path":"https://allenbaron.github.io/DO.utils/LICENSE.html","id":"statement-of-purpose","dir":"","previous_headings":"","what":"Statement of Purpose","title":"CC0 1.0 Universal","text":"laws jurisdictions throughout world automatically confer exclusive Copyright Related Rights (defined ) upon creator subsequent owner(s) (, “owner”) original work authorship /database (, “Work”). Certain owners wish permanently relinquish rights Work purpose contributing commons creative, cultural scientific works (“Commons”) public can reliably without fear later claims infringement build upon, modify, incorporate works, reuse redistribute freely possible form whatsoever purposes, including without limitation commercial purposes. owners may contribute Commons promote ideal free culture production creative, cultural scientific works, gain reputation greater distribution Work part use efforts others. /purposes motivations, without expectation additional consideration compensation, person associating CC0 Work (“Affirmer”), extent owner Copyright Related Rights Work, voluntarily elects apply CC0 Work publicly distribute Work terms, knowledge Copyright Related Rights Work meaning intended legal effect CC0 rights. Copyright Related Rights. Work made available CC0 may protected copyright related neighboring rights (“Copyright Related Rights”). Copyright Related Rights include, limited , following: right reproduce, adapt, distribute, perform, display, communicate, translate Work; moral rights retained original author(s) /performer(s); publicity privacy rights pertaining person’s image likeness depicted Work; rights protecting unfair competition regards Work, subject limitations paragraph 4(), ; rights protecting extraction, dissemination, use reuse data Work; database rights (arising Directive 96/9/EC European Parliament Council 11 March 1996 legal protection databases, national implementation thereof, including amended successor version directive); similar, equivalent corresponding rights throughout world based applicable law treaty, national implementations thereof. Waiver. greatest extent permitted , contravention , applicable law, Affirmer hereby overtly, fully, permanently, irrevocably unconditionally waives, abandons, surrenders Affirmer’s Copyright Related Rights associated claims causes action, whether now known unknown (including existing well future claims causes action), Work () territories worldwide, (ii) maximum duration provided applicable law treaty (including future time extensions), (iii) current future medium number copies, (iv) purpose whatsoever, including without limitation commercial, advertising promotional purposes (“Waiver”). Affirmer makes Waiver benefit member public large detriment Affirmer’s heirs successors, fully intending Waiver shall subject revocation, rescission, cancellation, termination, legal equitable action disrupt quiet enjoyment Work public contemplated Affirmer’s express Statement Purpose. Public License Fallback. part Waiver reason judged legally invalid ineffective applicable law, Waiver shall preserved maximum extent permitted taking account Affirmer’s express Statement Purpose. addition, extent Waiver judged Affirmer hereby grants affected person royalty-free, non transferable, non sublicensable, non exclusive, irrevocable unconditional license exercise Affirmer’s Copyright Related Rights Work () territories worldwide, (ii) maximum duration provided applicable law treaty (including future time extensions), (iii) current future medium number copies, (iv) purpose whatsoever, including without limitation commercial, advertising promotional purposes (“License”). License shall deemed effective date CC0 applied Affirmer Work. part License reason judged legally invalid ineffective applicable law, partial invalidity ineffectiveness shall invalidate remainder License, case Affirmer hereby affirms () exercise remaining Copyright Related Rights Work (ii) assert associated claims causes action respect Work, either case contrary Affirmer’s express Statement Purpose. Limitations Disclaimers. trademark patent rights held Affirmer waived, abandoned, surrendered, licensed otherwise affected document. Affirmer offers Work -makes representations warranties kind concerning Work, express, implied, statutory otherwise, including without limitation warranties title, merchantability, fitness particular purpose, non infringement, absence latent defects, accuracy, present absence errors, whether discoverable, greatest extent permissible applicable law. Affirmer disclaims responsibility clearing rights persons may apply Work use thereof, including without limitation person’s Copyright Related Rights Work. , Affirmer disclaims responsibility obtaining necessary consents, permissions rights required use Work. Affirmer understands acknowledges Creative Commons party document duty obligation respect CC0 use Work.","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"overview","dir":"Articles","previous_headings":"","what":"Overview","title":"Assessing Resource Use: Obtaining Use Records","text":"first step Assessing Resource Use workflow obtain use records published literature databases. .utils supports obtaining records 3 ways: using publications resource identify publications cited (referred “cited ”). Via search. parsing loading MyNCBI collection. .utils can obtain records via “cited ” PubMed Scopus databases via search PubMed PubMed Central (PMC) databases. Additionally, europepmc R package can used search Europe PMC database. can used singly combination obtain records published literature likely use resource.","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"api_key","dir":"Articles","previous_headings":"","what":"Setup and API keys","title":"Assessing Resource Use: Obtaining Use Records","text":"API keys generally needed access publication record databases. specific keys needed listed database . team’s preferred method storing retrieving API keys R save system credential store using keyring package retrieve needed. save key, use keyring::key_set(), replacing default key name specified relevant section , paste/enter key prompt. retrieve key, use keyring::key_get().","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"pubmedpmc","dir":"Articles","previous_headings":"Setup and API keys","what":"PubMed/PMC","title":"Assessing Resource Use: Obtaining Use Records","text":".utils may able access PubMed PMC databases without user preparation. However, NCBI set rate limits services free API key recommended. information obtaining API key, refer NCBI’s support article obtain API Key NCBI account? Entrez Programming Utilities Help book (“General Introduction E-utilities” > “Usage Guidelines Requirements” > “API Keys”). Default key name: ENTREZ_KEY Alternate methods saving using Entrez Utilities API key documented vignette(\"rentrez_tutorial\", package = \"rentrez\") (rentrez package used .utils hood).","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"scopus","dir":"Articles","previous_headings":"Setup and API keys","what":"Scopus","title":"Assessing Resource Use: Obtaining Use Records","text":"institutional subscription user API key required access Scopus API. addition, Scopus requires “institutional token” “cited ” access (refer Scopus developer FAQ, question “Q: can obtain list articles (cited-list) cite articles interest ?”). API key can obtained Elsevier https://dev.elsevier.com/. obtain institutional token, institution’s librarian information specialist must email Elsevier account manager customer consultant, describe use case, request institutional token. Default key names: API key = Elsevier_API Institutional token = Elsevier_insttoken additional, limited, documentation see vignette(\"api_key\", package = \"rscopus\") (rscopus package used .utils hood).","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"europe-pmc","dir":"Articles","previous_headings":"Setup and API keys","what":"Europe PMC","title":"Assessing Resource Use: Obtaining Use Records","text":"Europe PMC can accessed europepmc R package require API key (time writing).","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"tutorial-obtaining-use-records","dir":"Articles","previous_headings":"","what":"Tutorial: Obtaining Use Records","title":"Assessing Resource Use: Obtaining Use Records","text":"","code":"library(DO.utils) suppressPackageStartupMessages(library(dplyr))"},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"cited-by","dir":"Articles","previous_headings":"Tutorial: Obtaining Use Records","what":"Cited By","title":"Assessing Resource Use: Obtaining Use Records","text":"tutorial, citations two official publications describing Human Disease Ontology copied PubMed (). information citations used .utils identify publications “cited ” bolded (titles PubMed IDs). Schriml LM, Mitraka E. Disease Ontology: fostering interoperability biological clinical human disease-related data. Mamm Genome. 2015 Oct;26(9-10):584-9. doi: 10.1007/s00335-015-9576-9. Epub 2015 Jun 21. PMID: 26093607; PMCID: PMC4602048. Bello SM, Shimoyama M, Mitraka E, Laulederkind SJF, Smith CL, Eppig JT, Schriml LM. Disease Ontology: improving unifying disease annotations across species. Dis Model Mech. 2018 Mar 12;11(3):dmm032839. doi: 10.1242/dmm.032839. PMID: 29590633; PMCID: PMC5897730.","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"pubmed","dir":"Articles","previous_headings":"Tutorial: Obtaining Use Records > Cited By","what":"PubMed","title":"Assessing Resource Use: Obtaining Use Records","text":"Obtain “cited ” records PubMed follows: Make Entrez Utilities API key available (see Setup API keys set ). Obtain records PubMed using resource publication PubMed IDs (pmid), optionally include publication record cites specifying by_id = TRUE. full results returned list can saved disk R object (?save) later analysis desired. Tidy records data.frame (limited information retained). Result:","code":"set_entrez_key(keyring::key_get(\"ENTREZ_KEY\")) cb_pm_res <- citedby_pubmed(id = c(\"26093607\", \"29590633\"), by_id = TRUE) cb_pm <- tidy_pub_records(cb_pm_res) #> # A tibble: 58 × 10 #> first_author title journal pub_date doi pmid pmcid cites pub_type #> #> 1 Amberger JS OMIM… Nuclei… 2019-01-08 10.1… 3044… PMC6… 2959… Journal… #> 2 Baldarelli RM The … Nuclei… 2021-01-08 10.1… 3310… PMC7… 2959… Journal… #> 3 Bello SM Dise… Dis Mo… 2018-03-12 10.1… 2959… PMC5… 2609… Journal… #> 4 Bradford YM Zebr… ILAR J 2017-07-01 10.1… 2883… PMC5… 2609… Journal… #> 5 Casaletto J Fede… Cell G… 2022-03-09 10.1… 3537… PMC8… 2609… Journal… #> 6 El-Sappagh S DMTO… J Biom… 2018-02-06 10.1… 2940… PMC5… 2609… Journal… #> 7 Elmore SA A Re… ILAR J 2018-12-01 10.1… 3047… PMC6… 2959… Journal… #> 8 Eppig JT Mous… ILAR J 2017-07-01 10.1… 2883… PMC5… 2609… Journal… #> 9 Fernández-To… Inte… Nat Co… 2022-09-09 10.1… 3608… PMC9… 2959… Journal… #> 10 Finke MT Inte… J Am M… 2019-02-01 10.1… 3062… PMC7… 2609… Journal… #> # … with 48 more rows, and 1 more variable: added_dt "},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"scopus-1","dir":"Articles","previous_headings":"Tutorial: Obtaining Use Records > Cited By","what":"Scopus","title":"Assessing Resource Use: Obtaining Use Records","text":"Obtain “cited ” records PubMed follows: Make Scopus API key institutional token available. Obtain records Scopus using resource publication titles, optionally include publication record cites specifying by_id = TRUE providing identifiers (id; titles long use identifiers). , PubMed IDs serve user-provided identifiers titles used actually obtain “cited ” records Scopus search API. full results returned list can saved disk R object (?save) later analysis desired. Tidy records data.frame (limited information retained). Result:","code":"set_scopus_keys( api_key = keyring::key_get(\"Elsevier_API\"), insttoken = keyring::key_get(\"Elsevier_insttoken\") ) cb_scopus_res <- citedby_scopus( title = c( \"The Disease Ontology: fostering interoperability between biological and clinical human disease-related data\", \"Disease Ontology: improving and unifying disease annotations across species\" ), by_id = TRUE, id = c(\"26093607\", \"29590633\") ) cb_scopus <- tidy_pub_records(cb_scopus_res) #> # A tibble: 92 × 10 #> first_author title journal pub_date doi pmid scopus_eid cites #> #> 1 Abburu S Ontolo… Internat… 2018-07-01 10.4… 2-s2.0-85… 2609… #> 2 Abburu S Ontolo… Geospati… 2019-01-01 10.4… 2-s2.0-85… 2609… #> 3 Al-Mubaid H Gene m… Journal … 2018-10-01 10.1… 3041… 2-s2.0-85… 2609… #> 4 Amberger JS OMIM.o… Nucleic … 2019-01-08 10.1… 3044… 2-s2.0-85… 2959… #> 5 Baldarelli RM The mo… Nucleic … 2021-01-08 10.1… 3310… 2-s2.0-85… 2959… #> 6 Barcellos Al… Ontolo… Journal … 2017-11-01 10.1… 2-s2.0-85… 2609… #> 7 Bello SM Diseas… DMM Dise… 2018-03-01 10.1… 2959… 2-s2.0-85… 2609… #> 8 Bradford Y Zebraf… ILAR Jou… 2017-07-01 10.1… 2883… 2-s2.0-85… 2609… #> 9 Chen F Identi… Patholog… 2018-12-01 10.1… 3047… 2-s2.0-85… 2609… #> 10 Chen F Identi… Journal … 2019-06-01 10.1… 3053… 2-s2.0-85… 2609… #> # … with 82 more rows, and 2 more variables: pub_type , #> # added_dt "},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"search","dir":"Articles","previous_headings":"Tutorial: Obtaining Use Records","what":"Search","title":"Assessing Resource Use: Obtaining Use Records","text":"can search PubMed PubMed Central searches use NCBI websites (e.g. MeSH terms PubMed). terms used carefully selected identify publications use resource, particular effort made avoid false positive results. example, publications use Disease Ontology can found doid \"disease-ontology.org\" search terms. quotes used within search, case \"disease-ontology.org\", must escaped (prevent confusion R) outer single quotes must used. Make Entrez Utilities API key available, necessary (already done tutorial doesn’t need done ). Search PubMed (search_pubmed()), PubMed Central (search_pmc()), /Europe PMC (use europepmc::epmc_search() function europepmc package) desired search terms. tutorial PubMed searched two different search terms; second primarily show quoted terms entered. Search results PubMed & PubMed Central include publication identifiers currently. Results doid search: large number results expected, considering creating web_history object using instead (documented vignette(\"rentrez_tutorial\", package = \"rentrez\")). Obtain publication details using unique PubMed IDs identified searches input (search results combined example). full results returned list can saved disk R object (?save) later analysis desired. Tidy records data.frame (limited information retained). Result:","code":"pm_doid <- search_pubmed(\"doid\") pm_full_nm <- search_pubmed(\"\\\"human disease ontology\\\"\") #> Entrez search result with 7 hits (object contains 7 IDs and no web_history object) #> Search term (as translated): \"doid\"[All Fields] #> [1] \"36509991\" \"35599774\" \"30441083\" \"27638616\" \"27577487\" \"25841438\" #> [7] \"22080554\" search_pmids <- unique(c(pm_doid$ids, pm_full_nm$ids)) pm_doid_res <- pubmed_summary(search_pmids) search_pm <- tidy_pub_records(pm_doid_res) #> # A tibble: 22 × 9 #> first_author title journal pub_date doi pmid pmcid pub_type #> #> 1 Althubaiti S Combinin… J Biomed… 2020-01-13 10.11… 3193… PMC6… Journal… #> 2 Fang H DcGO: da… Nucleic … 2013-01-01 10.10… 2316… PMC3… Journal… #> 3 Good BM Mining t… BMC Geno… 2011-12-13 10.11… 2216… PMC3… Journal… #> 4 Hoehndorf R Identify… Bioinfor… 2012-08-15 10.10… 2271… PMC3… Journal… #> 5 Hofer P Semi-Aut… Stud Hea… 2016-01-01 2757… Journal… #> 6 Jupp S Logical … J Biomed… 2012-04-24 10.11… 2254… PMC3… Journal… #> 7 Kibbe WA Disease … Nucleic … 2015-01-01 10.10… 2534… PMC4… Journal… #> 8 LePendu P Enabling… J Biomed… 2011-12-01 10.10… 2155… PMC3… Journal… #> 9 Maes M Aberrati… Front Ps… 2022-05-06 10.33… 3559… PMC9… Journal… #> 10 Marquet G Aligning… Stud Hea… 2006-01-01 1710… Journal… #> # … with 12 more rows, and 1 more variable: added_dt "},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"myncbi-collection","dir":"Articles","previous_headings":"Tutorial: Obtaining Use Records","what":"MyNCBI Collection","title":"Assessing Resource Use: Obtaining Use Records","text":"instructions create add MyNCBI collection refer “Collections” chapter NCBI help book. load collection R .utils follows: Open collection NCBI’s website web browser. Select “Send :”. Select “File” option “Summary (text)” format. Click “Create File” specify save (tutorial records ’s collection saved collection.txt vignette). Provide local path saved file read_pubmed_txt() .utils read & parse records. Currently, publication identifiers full citation returned data.frame. sufficient merging “cited ” search results, come downsides. Result: Optionally, use pubmed_summary() PubMed IDs get data format “cited ” search. full results returned list can saved disk R object (?save) later analysis desired. Tidy records data.frame (limited information retained). Result:","code":"myncbi_col <- read_pubmed_txt(\"collection.txt\") #> # A tibble: 5 × 5 #> n pmid pmcid doi citation #> #> 1 1 26609498 PMC4655879 1. Guha R, Nguyen … #> 2 2 26507285 PMC4622021 10.1093/database/bav104. 2. Collier N, Groz… #> 3 3 26507230 PMC4626853 10.1128/mBio.01263-15. 3. Ni Y, Li J, Pan… #> 4 4 26413258 PMC4582726 10.1186/s13326-015-0034-0. 4. Rabattu PY, Mas… #> 5 5 26320941 PMC4553261 10.3402/jev.v4.27497. 5. Subramanian SL,… myncbi_res <- pubmed_summary(myncbi_col$pmid) myncbi_pm <- tidy_pub_records(myncbi_res) #> # A tibble: 5 × 9 #> first_author title journal pub_date doi pmid pmcid pub_type #> #> 1 Collier N PhenoMin… Databas… 2015-10-27 10.10… 2650… PMC4… Journal… #> 2 Guha R Dealing … Curr Pr… 2012-09-01 10.10… 2660… PMC4… Journal… #> 3 Ni Y A Molecu… mBio 2015-10-27 10.11… 2650… PMC4… Journal… #> 4 Rabattu PY My Corpo… J Biome… 2015-09-24 10.11… 2641… PMC4… Journal… #> 5 Subramanian SL Integrat… J Extra… 2015-08-28 10.34… 2632… PMC4… Journal… #> # … with 1 more variable: added_dt "},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"matching-and-merging-records","dir":"Articles","previous_headings":"Tutorial: Obtaining Use Records","what":"Matching and Merging Records","title":"Assessing Resource Use: Obtaining Use Records","text":"one set records obtained, likely want match merge one datasets make review easier. .utils can match publication records using standard identifiers (identified matching column names; see ?match_citations details) currently provide merging, complex process due variation records. tutorial, procedure matching merging previously obtained record sets (“cited ”, search, MyNCBI collection records) single dataset shown. NOTE: practice, team usually keeps “cited ” search records separate feel makes review easier.","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"matching","dir":"Articles","previous_headings":"Tutorial: Obtaining Use Records > Matching and Merging Records","what":"Matching","title":"Assessing Resource Use: Obtaining Use Records","text":"two datasets matched, matched recursively (shown step #4 ). Choose starting record set number records. Use match_citations() add matching record numbers first set another set. identifiers used matching listed order used. Number records second set without matches first. Repeat steps 2 & 3 identify matches record set previously matched set.","code":"cb_pm <- dplyr::mutate(cb_pm, record_n = dplyr::row_number()) cb_scopus <- match_citations(cb_scopus, cb_pm, add_col = \"record_n\") #> Matching by types: #> * pmid #> * doi cb_scopus <- dplyr::mutate( cb_scopus, record_n = dplyr::if_else( !is.na(record_n), record_n, cumsum(is.na(record_n)) + max(cb_pm$record_n) ) ) # matching search search_pm <- match_citations(search_pm, cb_scopus, add_col = \"record_n\") |> dplyr::mutate( record_n = dplyr::if_else( !is.na(record_n), record_n, cumsum(is.na(record_n)) + max(cb_scopus$record_n) ) ) #> Matching by types: #> * pmid #> * doi # merging myncbi_collection myncbi_pm <- match_citations(myncbi_pm, search_pm, add_col = \"record_n\") |> dplyr::mutate( record_n = dplyr::if_else( !is.na(record_n), record_n, cumsum(is.na(record_n)) + max(search_pm$record_n) ) ) #> Matching by types: #> * pmid #> * pmcid #> * doi"},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"merging","dir":"Articles","previous_headings":"Tutorial: Obtaining Use Records > Matching and Merging Records","what":"Merging","title":"Assessing Resource Use: Obtaining Use Records","text":"Prior merging datasets recommend adding information indicate record obtained. can done mutate dplyr package. compound identifier column (source) added record set indicate approach database used obtain . Merge record sets. can done number ways perfect solution currently exists. tutorial, two separate ways demonstrated. first, records unique may slight data loss. second, zero data loss records may unique. 2A. Unique records, slight data loss: Combine record sets single data.frame, concatenate source information, drop duplicates. approach currently used team merge record sets later review. NOTE: Records added earlier preferentially retained. Result: matches PubMed Scopus “cited ” results, additional information record obtained Scopus may lost. 2B. data loss, possible duplication: Combine record sets specifying columns concatenate unique values collapse_col() (see ?collapse_col details). values columns , one retained. differ, concatenated. minimum, record number record set identifier columns collapsed. NOTE: collapse_col() collapse records identical non-collapsing columns. Even small differences punctuation case prevent record de-duplication favor preserving information. Records increasingly de-duplicated columns specified collapse care taken avoid merging truly distinct records. Result:","code":"# cited by record sets cb_pm <- dplyr::mutate(cb_pm, source = \"citedby-pubmed\") cb_scopus <- dplyr::mutate(cb_scopus, source = \"citedby-scopus\") # search record set search_pm <- dplyr::mutate(search_pm, source = \"search-pubmed\") # MyNCBI collection record set myncbi_pm <- dplyr::mutate(myncbi_pm, source = \"myncbi_collection-pubmed\") uniq_records <- dplyr::bind_rows(cb_pm, cb_scopus, search_pm, myncbi_pm) |> # concatenate source info dplyr::group_by(record_n) |> dplyr::mutate(source = paste0(unique(source), collapse = \"; \")) |> dplyr::ungroup() |> # drop duplicates dplyr::filter(duplicated(record_n)) uniq_records #> # A tibble: 56 × 13 #> first_author title journal pub_date doi pmid pmcid cites pub_type #> #> 1 Amberger JS OMIM… Nuclei… 2019-01-08 10.1… 3044… 2959… Journal… #> 2 Baldarelli RM The … Nuclei… 2021-01-08 10.1… 3310… 2959… Journal… #> 3 Bello SM Dise… DMM Di… 2018-03-01 10.1… 2959… 2609… Journal… #> 4 Bradford Y Zebr… ILAR J… 2017-07-01 10.1… 2883… 2609… Journal… #> 5 De Evsikova … The … Journa… 2019-06-01 10.3… 2959… Journal… #> 6 El-Sappagh S DMTO… Journa… 2018-02-06 10.1… 2940… 2609… Journal… #> 7 Elmore SA A Re… ILAR J… 2018-12-01 10.1… 3047… 2959… Journal… #> 8 Eppig JT Mous… ILAR J… 2017-07-01 10.1… 2883… 2609… Journal… #> 9 Fernández-To… Inte… Nature… 2022-12-01 10.1… 3608… 2959… Journal… #> 10 Finke MT Inte… Journa… 2019-02-01 10.1… 3062… 2609… Journal… #> # … with 46 more rows, and 4 more variables: added_dt , #> # record_n , source , scopus_eid complete_records <- dplyr::bind_rows(cb_pm, cb_scopus) |> collapse_col(.cols = c(record_n, source)) complete_records #> # A tibble: 150 × 13 #> first_author title journal pub_date doi pmid pmcid cites pub_type #> #> 1 Abburu S Onto… Intern… 2018-07-01 10.4… 2609… Journal… #> 2 Abburu S Onto… Geospa… 2019-01-01 10.4… 2609… Book|Bo… #> 3 Al-Mubaid H Gene… Journa… 2018-10-01 10.1… 3041… 2609… Journal… #> 4 Amberger JS OMIM… Nuclei… 2019-01-08 10.1… 3044… 2959… Journal… #> 5 Amberger JS OMIM… Nuclei… 2019-01-08 10.1… 3044… PMC6… 2959… Journal… #> 6 Baldarelli RM The … Nuclei… 2021-01-08 10.1… 3310… 2959… Journal… #> 7 Baldarelli RM The … Nuclei… 2021-01-08 10.1… 3310… PMC7… 2959… Journal… #> 8 Barcellos Al… Onto… Journa… 2017-11-01 10.1… 2609… Journal… #> 9 Bello SM Dise… DMM Di… 2018-03-01 10.1… 2959… 2609… Journal… #> 10 Bello SM Dise… Dis Mo… 2018-03-12 10.1… 2959… PMC5… 2609… Journal… #> # … with 140 more rows, and 4 more variables: added_dt , #> # record_n , source , scopus_eid "},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"saving-merged-records","dir":"Articles","previous_headings":"Tutorial: Obtaining Use Records","what":"Saving Merged Records","title":"Assessing Resource Use: Obtaining Use Records","text":"Merged records can saved Google Sheet (shown) file (csv/Excel). NOTE: Google Sheet (proper case) Google’s .xlsx file equivalent. confused sheet (written lowercase ), tab within Google Sheet equivalent sheet within .xlsx file. save data existing Google Sheet (team’s preference): Copy URL Google Sheet data saved. Save data googlesheets4 package, optionally specifying sheet within Google Sheet save data . saving options, see documentation googlesheets4::write_sheet().","code":"library(googlesheets4) gs_url <- googlesheets4::write_sheet( data = uniq_records, ss = \"https://docs.google.com/spreadsheets/d/1soEnbGY2uVVDEC_xKOpjs9WQg-wQcLiXqmh_iJ-2qsM/\", sheet = \"new_tab\" )"},{"path":"https://allenbaron.github.io/DO.utils/articles/use-reticulate-python.html","id":"what-does-python-add","dir":"Articles","previous_headings":"","what":"What does Python add?","title":"Using DO.utils with reticulate and Python","text":".utils designed balance functionality ease use, goal reproducibility. functionality just available R, ’s less reproducible harder manage. Python fills gaps. Specifically using Python powers functions : R SPARQL engines require database management (virtuoso) work SPARQL 1.1 (rdflib). update data releases analyze unexpected changes files. Utilizing biopragmatics stack: bioregistry, biomappings, etc.; pyobo; INDRA labs’ GILDA","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/use-reticulate-python.html","id":"why-use-python-via-reticulate","dir":"Articles","previous_headings":"","what":"Why use Python via reticulate?","title":"Using DO.utils with reticulate and Python","text":"Generally, R-python connection allows data integration R data frames can easily managed, explored, analyzed. specifically, reticulate help manage Python python module dependencies simplify user setup/use.","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/use-reticulate-python.html","id":"how-to-use-python-dependent-do-utils-functions","dir":"Articles","previous_headings":"","what":"How to use python-dependent DO.utils functions?","title":"Using DO.utils with reticulate and Python","text":"functions work standard R functions. cases internal data extractor functions written eliminate need non-standard user data munging.","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/use-reticulate-python.html","id":"python-setup","dir":"Articles","previous_headings":"How to use python-dependent DO.utils functions?","what":"Python Setup","title":"Using DO.utils with reticulate and Python","text":"Although tested yet, use reticulate handle installation python /python modules automatically require little user input. default attempt identify use python already installed. work, reticulate install python needed modules via miniconda.","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/use-reticulate-python.html","id":"customization","dir":"Articles","previous_headings":"How to use python-dependent DO.utils functions? > Python Setup","what":"Customization","title":"Using DO.utils with reticulate and Python","text":"user control can achieved installation (like using pip venv instead miniconda) using reticulate install python create virtual environment calling library(.utils) first time. basic procedure execute following: Note Virtual Environments reticulate can create conda environments venv/virtualenv virtual environments. Non-conda virtual environment options described briefly similar options approaches available conda environments via reticulate. r-reticulate default virtual environment name promoted developers reticulate packages depend reticulate, goals 1) promoting interoperability packages depend reticulate python 2) better manage python module dependencies, use single virtual environment. Alternatives default environment can specified modifying first argument envname virtualenv_create(). name (without slashes) create virtual environment name default location (see virtualenv_root()); relative absolute path (slashes) create virtual environment specified directory, can nice want python virtual environment associated specific project. Note Python Module Installation possible specify python modules install time virtual environment created later activating virtual environment executing virtualenv_install(). .utils dependencies desired, necessary first execution library(.utils) active virtual environment install python module dependencies .utils automatically. python module need installed user, modules used .utils can found “Config/reticulate” section ’s DESCRIPTION file.","code":"library(reticulate) # installs with DO.utils py_version <- \"3.9\" # or whatever version you prefer venv_name <- \"r-reticulate\" py_path <- install_python(py_version) virtualenv_create(venv_name, py_path, version = py_version)"},{"path":"https://allenbaron.github.io/DO.utils/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"J. Allen Baron. Maintainer.","code":""},{"path":"https://allenbaron.github.io/DO.utils/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Baron JA (2024). .utils: Public Resource Utilities Designed /Disease Ontology. R package version 0.3.1.9000, https://diseaseontology.github.io/.utils/.","code":"@Manual{, title = {DO.utils: Public Resource Utilities Designed by/for the Disease Ontology}, author = {J. Allen Baron}, year = {2024}, note = {R package version 0.3.1.9000}, url = {https://diseaseontology.github.io/DO.utils/}, }"},{"path":"https://allenbaron.github.io/DO.utils/index.html","id":"doutils","dir":"","previous_headings":"","what":"Public Resource Utilities Designed by/for the Disease Ontology","title":"Public Resource Utilities Designed by/for the Disease Ontology","text":".utils R package primarily designed support operations Human Disease Ontology (; disease-ontology.org) number capabilities useful broader scientific community : brief summary can found Assessing Resource Use (Bibliometrics/Scientometrics). detailed description refer “Assessing Resource Use: Obtaining Use Records” tutorial included package (vignette(\"obtain_use_records\", package = \".utils\")) peer-reviewed article: J. Allen Baron, Lynn M Schriml, Assessing resource use: case study Human Disease Ontology, Database, Volume 2023, 2023, baad007. PMID:36856688, https://doi.org/10.1093/database/baad007. Simplifying common R tasks (see General Utilities section). Operations specific use, analysis, maintenance, improvement ontology described briefly Improvement & Analysis section. .utils work progress. interested contributing, please reach . Note goal work collaboratively make functions broadly useful possible.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/index.html","id":"installing-prerequisites","dir":"","previous_headings":"Installation","what":"Installing Prerequisites","title":"Public Resource Utilities Designed by/for the Disease Ontology","text":"use .utils must first install R CRAN. Installing RStudio can also useful required. devtools package also required can obtain executing install.packages(\"devtools\") within R.","code":""},{"path":"https://allenbaron.github.io/DO.utils/index.html","id":"installing-doutils","dir":"","previous_headings":"Installation","what":"Installing DO.utils","title":"Public Resource Utilities Designed by/for the Disease Ontology","text":".utils can installed Github persistent, open-access repository hosted Zenodo. install Github, run devtools::install_github(\"DiseaseOntology/.utils\") within R. install Zenodo, first download .utils (DOI: 10.5281/zenodo.7467668) local machine. , within R run devtools::install_git(), replacing local path .utils.","code":""},{"path":"https://allenbaron.github.io/DO.utils/index.html","id":"assess_use","dir":"","previous_headings":"","what":"Assessing Resource Use & Impact (Bibliometrics/Scientometrics)","title":"Public Resource Utilities Designed by/for the Disease Ontology","text":".utils includes functions assist assessing resource used measuring impact use. functions may broadly useful anyone trying accomplish tasks, much smaller number specific measuring ’s impact. Components broadly useful resource can: Citations one article(s) published resource (“cited ”; citedby_pubmed() citedby_scopus()). PubMed PubMed Central (PMC) search results (search_pubmed() search_pmc()). MyNCBI collection (read_pubmed_txt()). Identify matching publication records different record sets (must formatted data.frames; see match_citations()). interested Bioconductor package download statistics,get_bioc_pkg_stats() may useful, measures impact designed specifically mind (e.g. count_alliance_records()).","code":""},{"path":"https://allenbaron.github.io/DO.utils/index.html","id":"do_specific","dir":"","previous_headings":"","what":"DO Improvement & Analysis","title":"Public Resource Utilities Designed by/for the Disease Ontology","text":".utils provides following capabilities used improvement analysis: Git repo management, iterative execution across git repository tags, SPARQL queries implemented wrappers (DOrepo(), owl_xml()) around related pyDOID python package. Statistics plots (see https://disease-ontology.org//statistics) Semi-automated html rendering build various pages including Use Cases, Imports, Slims, new Symptom Ontology Pathogen Transmission Ontology pages. Definition source URL validation. Prediction mappings/cross-references resources & , via PyOBO/GILDA approximate string matching. Simplified system installation OBO tool ROBOT.","code":""},{"path":"https://allenbaron.github.io/DO.utils/index.html","id":"general","dir":"","previous_headings":"","what":"General Utilities","title":"Public Resource Utilities Designed by/for the Disease Ontology","text":".utils includes general utilities make programming R easier including, example, assist : Type/content testing – is_blank(), is_positive(), is_vctr_or_df(), all_duplicated() Vector--scalar conversion – collapse_to_string(), unique_if_invariant() Data reduction – collapse_col(), drop_blank() Value replacement – replace_null(), replace_blank() Sorting (specified priority) Dates – cur_yr(), today_datestamp() Temporary bug workarounds – restore_names()","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/DO.utils-package.html","id":null,"dir":"Reference","previous_headings":"","what":"DO.utils: Public Resource Utilities Designed by/for the Disease Ontology — DO.utils-package","title":"DO.utils: Public Resource Utilities Designed by/for the Disease Ontology — DO.utils-package","text":"Generally useful tools assess use public resources scientific literature (\"cited \", search, etc.) simplify common R tasks, along tools specifically designed analysis improvement Human Disease Ontology (; https://disease-ontology.org).","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/DO_colors.html","id":null,"dir":"Reference","previous_headings":"","what":"Human Disease Ontology Official Colors — DO_colors","title":"Human Disease Ontology Official Colors — DO_colors","text":"Named, hexadecimal colors official use.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/DO_colors.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Human Disease Ontology Official Colors — DO_colors","text":"","code":"DO_colors"},{"path":"https://allenbaron.github.io/DO.utils/reference/DO_colors.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Human Disease Ontology Official Colors — DO_colors","text":"named, vector 17 colors hexadecimal format, including: main teal-ish colors: default, mid, light, website, websafe saturated versions (better plotting): sat, sat_mid, sat_light older, infrequently used orange colors: orange, orange_mid, orange_light NEW lavender-ish accent colors: accent1, accent1_mid, accent1_light NEW yellow-ish accent colors: accent2, accent2_mid, accent2_light","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/DO_colors.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Human Disease Ontology Official Colors — DO_colors","text":"Updated J. Allen Baron 2023-04-05.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/DOrepo.html","id":null,"dir":"Reference","previous_headings":"","what":"Instantiate a DO Repository — DOrepo","title":"Instantiate a DO Repository — DOrepo","text":"Instantiate DOrepo object pyDOID package (powered reticulate).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/DOrepo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Instantiate a DO Repository — DOrepo","text":"","code":"DOrepo(path)"},{"path":"https://allenbaron.github.io/DO.utils/reference/DOrepo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Instantiate a DO Repository — DOrepo","text":"path local path HumanDiseaseOntology git repository, string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/DOrepo.html","id":"classes-amp-methods","dir":"Reference","previous_headings":"","what":"Classes & Methods","title":"Instantiate a DO Repository — DOrepo","text":"DOrepo class inherits methods & subclasses GitPython.Repo class, along following: DOrepo$tag_iterate(function, start = [str], end = [str]): Iterate releases (tags) start end executing function . start end optional; unspecified first last release/tag repo assumed. DOrepo$capture_head(): Capture current head repo; useful restoring state git checkout(s). USE: assigned variable x, restore state x$checkout(). DOrepo$doid DOrepo$doid_merged: Access doid.owl doid-merged.owl files repository. inherit pyDOID.owl.xml class, see owl_xml() methods. NOTE , unlike owl_xml(), doid.owl doid-merged.owl loaded memory upon instantiation DOrepo, loaded automatically first $query() executed manually via $load().","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/access_DOrepo.html","id":null,"dir":"Reference","previous_headings":"","what":"Access DOrepo (INTERNAL) — access_DOrepo","title":"Access DOrepo (INTERNAL) — access_DOrepo","text":"Access x 'pyDOID.repo.DOrepo' confirming class, already instantiated, instantiating object given path.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/access_DOrepo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Access DOrepo (INTERNAL) — access_DOrepo","text":"","code":"access_DOrepo(x)"},{"path":"https://allenbaron.github.io/DO.utils/reference/access_DOrepo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Access DOrepo (INTERNAL) — access_DOrepo","text":"x 'pyDOID.repo.DOrepo' object path local copy HumanDiseaseOntology repository.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/access_owl_xml.html","id":null,"dir":"Reference","previous_headings":"","what":"Access OWL/RDF XML (INTERNAL) — access_owl_xml","title":"Access OWL/RDF XML (INTERNAL) — access_owl_xml","text":"Access x 'pyDOID.owl.xml' confirming class, already instantiated, instantiating object given path.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/access_owl_xml.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Access OWL/RDF XML (INTERNAL) — access_owl_xml","text":"","code":"access_owl_xml(x)"},{"path":"https://allenbaron.github.io/DO.utils/reference/access_owl_xml.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Access OWL/RDF XML (INTERNAL) — access_owl_xml","text":"x 'pyDOID.owl.xml' object path OWL/RDF XML file can instantiated object owl_xml().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/all_duplicated.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify all duplicates — all_duplicated","title":"Identify all duplicates — all_duplicated","text":"Built base::duplicated() , unlike base::duplicated(), identifies duplicates including first occurrence.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/all_duplicated.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify all duplicates — all_duplicated","text":"","code":"all_duplicated(x, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/all_duplicated.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify all duplicates — all_duplicated","text":"x vector data frame array NULL. ... arguments particular methods.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/append_empty_col.html","id":null,"dir":"Reference","previous_headings":"","what":"Append Empty Columns — append_empty_col","title":"Append Empty Columns — append_empty_col","text":"Appends empty columns (value = NA) data.frame.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/append_empty_col.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Append Empty Columns — append_empty_col","text":"","code":"append_empty_col(df, col, order = FALSE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/append_empty_col.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Append Empty Columns — append_empty_col","text":"df data.frame. col name(s) one columns desired final data.frame, character vector. names currently data.frame added empty columns; present remain unchanged. order Whether reorder data.frame match order col, boolean (default: FALSE). FALSE empty columns added right. order = TRUE, col used specify column order. Thus, addition names empty columns append, col must include column names df. append_empty_col() subset/select columns.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/append_to_url.html","id":null,"dir":"Reference","previous_headings":"","what":"Append to URL — append_to_url","title":"Append to URL — append_to_url","text":"Append one value(s) corresponding URL.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/append_to_url.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Append to URL — append_to_url","text":"","code":"append_to_url(x, url, sep = \"\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/append_to_url.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Append to URL — append_to_url","text":"x Value(s) append, character vector. url One URLs URL names recognized package, character vector. one value provided, recycled; otherwise length url x must match. See get_url() recognized base URL names. sep One separators use url x, character vector. one value provided (e.g. default = \"\"), recycled; otherwise length sep x must match. url ends corresponding sep, additional sep added.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/append_to_url.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Append to URL — append_to_url","text":"URL validation performed.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/append_to_url.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Append to URL — append_to_url","text":"","code":"append_to_url(\"blah\", \"http://fake.url.com/\") #> [1] \"http://fake.url.com/blah\" # separator can be specified and will not be duplicated append_to_url(\"blah\", \"http://fake.url.com/\", sep = \"?q=\") #> [1] \"http://fake.url.com/?q=blah\" append_to_url(\"blah\", \"http://fake.url.com/\", sep = \"/\") #> [1] \"http://fake.url.com/blah\" # vectorized w/recycling append_to_url(c(\"blah\", \"ugh\"), \"http://fake.url.com\", sep = \"/\") #> [1] \"http://fake.url.com/blah\" \"http://fake.url.com/ugh\" append_to_url( c(\"blah\", \"ugh\"), c(\"http://fake.url.com\", \"https://madeup.url.com/\"), sep = \"/\" ) #> [1] \"http://fake.url.com/blah\" \"https://madeup.url.com/ugh\" append_to_url( c(\"blah\", \"ugh\"), c(\"http://fake.url.com\", \"https://madeup.url.com/\"), sep = c(\"/\", \"?q=\") ) #> [1] \"http://fake.url.com/blah\" \"https://madeup.url.com/?q=ugh\" # missing values in `x` or `url` are preserved append_to_url( c(NA, \"uhhh\"), c(\"http://fake.url.com\", \"https://this.is.it.com/\"), sep = \"/\" ) #> [1] NA \"https://this.is.it.com/uhhh\" append_to_url( c(NA, \"uhhh\"), c(\"http://fake.url.com\", NA_character_), c(\"=\", NA) ) #> [1] NA NA # `sep` must not be missing for non-missing values of `x` and `url` try( append_to_url( c(NA, \"uhhh\"), c(\"http://fake.url.com\", \"https://this.is.it.com/\"), sep = c(\"/\", NA) ) ) #> Error in purrr::pmap_chr(list(url, x, sep, ignore_sep), function(.u, .x, : #> ℹ In index: 2. #> Caused by error in `paste()`: #> ! invalid separator"},{"path":"https://allenbaron.github.io/DO.utils/reference/as_tibble.esummary_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert esummary Object into Tibble — as_tibble.esummary_list","title":"Convert esummary Object into Tibble — as_tibble.esummary_list","text":"Converts esummary object tibble.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/as_tibble.esummary_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert esummary Object into Tibble — as_tibble.esummary_list","text":"","code":"# S3 method for esummary_list as_tibble(x, ...) # S3 method for esummary_list_nested as_tibble(x, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/as_tibble.esummary_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert esummary Object into Tibble — as_tibble.esummary_list","text":"x esummary object (esummary_list esummary_list_nested) ... Ignored; included extensibility.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/as_tibble.esummary_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert esummary Object into Tibble — as_tibble.esummary_list","text":"untidy, esummary_id input identifier. esummary_list_nested objects additional cites column.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/as_tibble.esummary_list.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Convert esummary Object into Tibble — as_tibble.esummary_list","text":"single inputs rentrez::entrez_summary(), always_return_list must TRUE.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/as_tibble.scopus_search.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert scopus_search Object into Tibble — as_tibble.scopus_search","title":"Convert scopus_search Object into Tibble — as_tibble.scopus_search","text":"Converts scopus_search object tibble.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/as_tibble.scopus_search.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert scopus_search Object into Tibble — as_tibble.scopus_search","text":"","code":"# S3 method for scopus_search as_tibble(x, ...) # S3 method for scopus_search_list as_tibble(x, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/as_tibble.scopus_search.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert scopus_search Object into Tibble — as_tibble.scopus_search","text":"x scopus_search scopus_search_list object. ... Ignored; included extensibility.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/as_tibble.scopus_search.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert scopus_search Object into Tibble — as_tibble.scopus_search","text":"untidy tibble. scopus_search_list objects additional cites column.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/batch_id_converter.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert IDs in Batches — batch_id_converter","title":"Convert IDs in Batches — batch_id_converter","text":"Batches inputs convert number IDs using PubMed Centrals ID converter API, via rcrossref::id_converter. Input missing values unique.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/batch_id_converter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert IDs in Batches — batch_id_converter","text":"","code":"batch_id_converter(x, type = NULL, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/batch_id_converter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert IDs in Batches — batch_id_converter","text":"x (character) One : doi, pmid, pmcid, manuscript id, see examples. required. type (character) one doi, pmid, pmcid, manuscript id ... Curl args passed crul::verb-GET","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/build_hyperlink.html","id":null,"dir":"Reference","previous_headings":"","what":"Build Hyperlinks — build_hyperlink","title":"Build Hyperlinks — build_hyperlink","text":"Builds hyperlinks Google Sheets, Excel, HTML appending value end base url.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/build_hyperlink.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build Hyperlinks — build_hyperlink","text":"","code":"build_hyperlink(x, url, as, ..., sep = \"\", text = x, preserve = \"text\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/build_hyperlink.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Build Hyperlinks — build_hyperlink","text":"x Value(s) append, character vector. url One URLs URL names recognized package, character vector. one value provided, recycled; otherwise length url x must match. See get_url() recognized base URL names. format use hyperlink, string; one \"gs\" (Google Sheet), \"xlsx\" (Excel), \"html\". ... (= \"html\") One name-value pairs html <> attributes. sep One separators use url x, character vector. one value provided (e.g. default = \"\"), recycled; otherwise length sep x must match. url ends corresponding sep, additional sep added. text (OPTIONAL) text display link, character vector. default uses x text. NULL, full URL serve text. string, value used text hyperlink. preserve value return url NA, string. One \"url\" \"text\" (default). Note default build_hyperlink() opposite default format_hyperlink() text provided default.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/build_hyperlink.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Build Hyperlinks — build_hyperlink","text":"","code":"build_hyperlink( x = \"DiseaseOntology\", url = \"github\", as = \"html\", text = \"A hyperlink!\" ) #> [1] \"A hyperlink!<\/a>\" # create CURIE links by passing local identifiers as `x` and prefixes as `url` build_hyperlink( x = c(\"4\", \"D004194\"), url = c(\"DOID\", \"MESH\"), as = \"gs\", text = c(\"DOID:4\", \"MESH:D004194\") ) #> #> [1] =HYPERLINK(\"http://purl.obolibrary.org/obo/DOID_4\", \"DOID:4\") #> [2] =HYPERLINK(\"https://meshb.nlm.nih.gov/record/ui?ui=D004194\", \"MESH:D004194\") # provide internal URL names or direct URLs to append to # BE SURE to use `preserve = 'url'` when text is `NA`. build_hyperlink( x = c(\"4\", \"fakeID\"), url = c(\"DOID\", \"https://madeup.url.com\"), as = \"gs\", text = c(\"DOID:4\", NA), sep = c(\"_\", \"/\"), preserve = \"url\" ) #> #> [1] =HYPERLINK(\"http://purl.obolibrary.org/obo/DOID_4\", \"DOID:4\") #> [2] =HYPERLINK(\"https://madeup.url.com/fakeID\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/char_val_predicates.html","id":null,"dir":"Reference","previous_headings":"","what":"Character value predicates — char_val_predicates","title":"Character value predicates — char_val_predicates","text":"value predicates designed identify common values appear character vectors.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/char_val_predicates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Character value predicates — char_val_predicates","text":"","code":"is_blank(x) is_missing(x)"},{"path":"https://allenbaron.github.io/DO.utils/reference/char_val_predicates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Character value predicates — char_val_predicates","text":"x vector tested","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/char_val_predicates.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Character value predicates — char_val_predicates","text":"is_blank() identifies \"\" whitespace length is_missing() identifies NA's blanks","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/chunk.html","id":null,"dir":"Reference","previous_headings":"","what":"Partition vectors — chunk","title":"Partition vectors — chunk","text":"partition divides vectors partitions specified length returns list. x completely divisible n last list item less n elements. Similar functions may named \"chunk\".","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/chunk.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Partition vectors — chunk","text":"","code":"partition(x, n)"},{"path":"https://allenbaron.github.io/DO.utils/reference/chunk.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Partition vectors — chunk","text":"x vector. n integer specifying instances per partition.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/chunk.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Partition vectors — chunk","text":"list x/n items (rounded ) containing n elements x. x %% n != 0 last list item < n elements x.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/chunk.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Partition vectors — chunk","text":"","code":"partition(letters[1:10], 5) #> $`0` #> [1] \"a\" \"b\" \"c\" \"d\" \"e\" #> #> $`1` #> [1] \"f\" \"g\" \"h\" \"i\" \"j\" #> partition(1:10, 3) #> $`0` #> [1] 1 2 3 #> #> $`1` #> [1] 4 5 6 #> #> $`2` #> [1] 7 8 9 #> #> $`3` #> [1] 10 #>"},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_pmid.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Cited By PMIDs from PubMed — citedby_pmid","title":"Get Cited By PMIDs from PubMed — citedby_pmid","text":"List PubMed IDs publications citing specified web_history id, potentially split by_id. citedby_pmid() can handle cases number input IDs >200 automatically (unlike rentrez::entrez_link).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_pmid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Cited By PMIDs from PubMed — citedby_pmid","text":"","code":"citedby_pmid(id = NULL, web_history = NULL, by_id = FALSE, config = NULL, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_pmid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Cited By PMIDs from PubMed — citedby_pmid","text":"id PubMed IDs retrieve \"cited \", character vector. web_history Entrez History object used instead id, generated modified rentrez::entrez_post() fork https://github.com/allenbaron/rentrez (see NOTE); used \"cited \" information desired >200 IDs. by_id Whether split \"cited \" publications ID cite, boolean (default: TRUE); FALSE returns unified list unique cited publications without reference ID cite. config Configuration options passed httr::GET(). ... Additional terms add request, see NCBI documentation ESearch complete list.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_pmid.html","id":"note","dir":"Reference","previous_headings":"","what":"NOTE","title":"Get Cited By PMIDs from PubMed — citedby_pmid","text":"rentrez fork https://github.com/allenbaron/rentrez implements pull request #174, yet implemented CRAN rentrez required rentrez::entrez_post() function fully.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_pubmed.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Cited By List from PubMed — citedby_pubmed","title":"Get Cited By List from PubMed — citedby_pubmed","text":"List PubMed publications citing specified id, optionally split by_id.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_pubmed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Cited By List from PubMed — citedby_pubmed","text":"","code":"citedby_pubmed( id = NULL, web_history = NULL, by_id = FALSE, no_result = \"warning\", config = NULL, version = \"2.0\", retmode = \"xml\", ... )"},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_pubmed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Cited By List from PubMed — citedby_pubmed","text":"id PubMed IDs retrieve \"cited \", character vector. web_history Entrez History object used instead id, generated modified rentrez::entrez_post() fork https://github.com/allenbaron/rentrez (see NOTE); used \"cited \" information desired >200 IDs. by_id Whether split \"cited \" publications ID cite, boolean (default: TRUE); FALSE returns unified list unique cited publications without reference ID cite. no_result type condition signaled PubMed results exist response; one \"error\", \"warning\" (default), \"message\" \"none\". config Configuration options passed httr::GET(). version Argument included flexibility, best left defaults set; see rentrez::entrez_summary() details. retmode \"xml\" (default) \"json\"; \"xml\" preferred higher response limit. default opposite rentrez::entrez_summary() default. ... Additional terms add request, see NCBI documentation ESearch complete list.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_scopus.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Cited By List from Scopus — citedby_scopus","title":"Get Cited By List from Scopus — citedby_scopus","text":"List Scopus publications citing specified title, optionally split by_id.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_scopus.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Cited By List from Scopus — citedby_scopus","text":"","code":"citedby_scopus( title, by_id = FALSE, id = NULL, api_key = NULL, insttoken = NULL, no_result = \"warning\", view = \"STANDARD\", start = 0, count = NULL, max_count = 20000, headers = NULL, wait_time = 0, verbose = FALSE, ... )"},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_scopus.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Cited By List from Scopus — citedby_scopus","text":"title Publication title(s) used Scopus Search API REFTITLE() query, character vector; see https://dev.elsevier.com/sc_search_tips.html. by_id Whether split \"cited \" publications ID cite, boolean (default: TRUE); FALSE returns unified list unique cited publications without reference ID cite. id Unique IDs used identify title input, character vector length title; REQUIRED by_id = TRUE, otherwise ignored. api_key API Key Elsevier insttoken Elsevier institutional token (REQUIRED). See vignette(\"obtain_use_records\") details. no_result type condition signaled Scopus results exist response; one \"error\", \"warning\" (default), \"message\" \"none\". view type view give, see https://api.elsevier.com/documentation/ScopusSearchAPI.wadl start records start gathering count number records retrieve (200 STANDARD, 25 COMPLETE views, see https://dev.elsevier.com/api_key_settings.html). max_count Maximum count records returned. headers Additional headers added httr::add_headers(). wait_time time seconds wait across consecutive requests single search (records > 25) verbose Print diagnostic messages ... Named arguments passed httr::GET(). Available arguments listed Scopus Search Documentation: API Specification.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_scopus.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Cited By List from Scopus — citedby_scopus","text":"by_id = FALSE, list result Scopus Search API (produced rscopus::scopus_search). by_id = TRUE, id named list scopus_search result lists.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col.html","id":null,"dir":"Reference","previous_headings":"","what":"Collapse Column(s) — collapse_col","title":"Collapse Column(s) — collapse_col","text":"Collapses values column(s) specified, concatenating unique values columns record (record defined unique row including columns specified .cols).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Collapse Column(s) — collapse_col","text":"","code":"collapse_col(df, .cols, delim = \"|\", method = \"unique\", na.rm = FALSE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Collapse Column(s) — collapse_col","text":"df data.frame .cols name column data.frame collapse delim delimiter place vector elements (default: \"|\"). method string identifying function use; one \"unique\", \"first\", \"last\". na.rm logical scalar indicating whether NA values removed (default: FALSE).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Collapse Column(s) — collapse_col","text":"data.frame specified columns collapsed. Also NOTE following: Collapsed columns converted character. Rows reordered unique combination columns collapsed (due dplyr::group_by() use).","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Collapse Column(s) — collapse_col","text":"","code":"cc_df <- tibble::tibble( x = c(1, 2, 3, 3, 4, 4, 4), y = c(\"a\", \"a\", \"b\", \"b\", \"c\", \"c\", \"e\"), z = c(\"Z\", \"Y\", \"X\", \"X\", \"W\", \"V\", \"U\") ) cc_df #> # A tibble: 7 × 3 #> x y z #> #> 1 1 a Z #> 2 2 a Y #> 3 3 b X #> 4 3 b X #> 5 4 c W #> 6 4 c V #> 7 4 e U # completely duplicated rows (3-4) are collapsed with any .cols specified collapse_col(cc_df, y) #> # A tibble: 6 × 3 #> x y z #> #> 1 1 a Z #> 2 2 a Y #> 3 3 b X #> 4 4 e U #> 5 4 c V #> 6 4 c W collapse_col(cc_df, x) #> # A tibble: 6 × 3 #> x y z #> #> 1 2 a Y #> 2 1 a Z #> 3 3 b X #> 4 4 c V #> 5 4 c W #> 6 4 e U collapse_col(cc_df, z) #> # A tibble: 5 × 3 #> x y z #> #> 1 1 a Z #> 2 2 a Y #> 3 3 b X #> 4 4 c W|V #> 5 4 e U collapse_col(cc_df, c(x, z)) #> # A tibble: 4 × 3 #> x y z #> #> 1 1|2 a Z|Y #> 2 3 b X #> 3 4 c W|V #> 4 4 e U"},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col_flex.html","id":null,"dir":"Reference","previous_headings":"","what":"Collapse Column(s) Flexibly — collapse_col_flex","title":"Collapse Column(s) Flexibly — collapse_col_flex","text":"Collapses values column(s) specified using defined method record, record defined unique observation comprised columns specified collapse).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col_flex.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Collapse Column(s) Flexibly — collapse_col_flex","text":"","code":"collapse_col_flex(df, ..., method = \"unique\", delim = \"|\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col_flex.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Collapse Column(s) Flexibly — collapse_col_flex","text":"df data.frame ... Column-method pairs specifying method use column collapsed; column names can bare variables strings, methods must strings, e.g. column_name = method. method string identifying function use; one \"unique\", \"first\", \"last\" delim delimiter place vector elements (default: \"|\").","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col_flex.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Collapse Column(s) Flexibly — collapse_col_flex","text":"data.frame specified columns collapsed. Also NOTE following: methods, rows reordered unique combination columns collapsed (due dplyr::group_by() use). _For \"unique\" method, collapsed columns converted character.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col_flex.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Collapse Column(s) Flexibly — collapse_col_flex","text":"","code":"cc_df <- tibble::tibble( x = c(1, 2, 3, 3, 4, 4, 4), y = c(\"a\", \"a\", \"b\", \"b\", \"c\", \"c\", \"e\"), z = c(\"Z\", \"Y\", \"X\", \"X\", \"W\", \"V\", \"U\") ) cc_df #> # A tibble: 7 × 3 #> x y z #> #> 1 1 a Z #> 2 2 a Y #> 3 3 b X #> 4 3 b X #> 5 4 c W #> 6 4 c V #> 7 4 e U # completely duplicated rows (3-4) are collapsed with any column(s) specified collapse_col_flex(cc_df, y) #> # A tibble: 6 × 3 #> x y z #> #> 1 1 a Z #> 2 2 a Y #> 3 3 b X #> 4 4 e U #> 5 4 c V #> 6 4 c W # individual columns collapse_col_flex(cc_df, z, method = \"unique\") #> # A tibble: 5 × 3 #> x y z #> #> 1 1 a Z #> 2 2 a Y #> 3 3 b X #> 4 4 c W|V #> 5 4 e U collapse_col_flex(cc_df, z, method = \"first\") #> # A tibble: 5 × 3 #> x y z #> #> 1 1 a Z #> 2 2 a Y #> 3 3 b X #> 4 4 c W #> 5 4 e U collapse_col_flex(cc_df, z, method = \"last\") #> # A tibble: 5 × 3 #> x y z #> #> 1 1 a Z #> 2 2 a Y #> 3 3 b X #> 4 4 c V #> 5 4 e U # multiple columns can be collapsed using the same method collapse_col_flex(cc_df, x, z, method = \"unique\") #> # A tibble: 4 × 3 #> x y z #> #> 1 1|2 a Z|Y #> 2 3 b X #> 3 4 c W|V #> 4 4 e U collapse_col_flex(cc_df, x, z, method = \"first\") #> # A tibble: 4 × 3 #> x y z #> #> 1 1 a Z #> 2 3 b X #> 3 4 c W #> 4 4 e U collapse_col_flex(cc_df, x, z, method = \"last\") #> # A tibble: 4 × 3 #> x y z #> #> 1 2 a Y #> 2 3 b X #> 3 4 c V #> 4 4 e U # ...or using different methods collapse_col_flex(cc_df, x = \"unique\", z = \"unique\") #> # A tibble: 4 × 3 #> x y z #> #> 1 1|2 a Z|Y #> 2 3 b X #> 3 4 c W|V #> 4 4 e U collapse_col_flex(cc_df, x = \"first\", z = \"unique\") #> # A tibble: 4 × 3 #> x y z #> #> 1 1 a Z|Y #> 2 3 b X #> 3 4 c W|V #> 4 4 e U collapse_col_flex(cc_df, x = \"first\", z = \"last\") #> # A tibble: 4 × 3 #> x y z #> #> 1 1 a Y #> 2 3 b X #> 3 4 c V #> 4 4 e U"},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_to_string.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a String from Inputs — collapse_to_string","title":"Create a String from Inputs — collapse_to_string","text":"Creates single string one inputs value separated delim.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_to_string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a String from Inputs — collapse_to_string","text":"","code":"collapse_to_string(..., delim = \"|\", na.rm = FALSE, unique = FALSE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_to_string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a String from Inputs — collapse_to_string","text":"... One R objects (vector, list, data.frame, etc). delim delimiter place vector elements (default: \"|\"). na.rm logical scalar indicating whether NA values removed (default: FALSE). unique Whether include unique values (across inputs), logical.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_to_string.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a String from Inputs — collapse_to_string","text":"","code":"# collapses individual vectors collapse_to_string(1:10) #> [1] \"1|2|3|4|5|6|7|8|9|10\" # input order is preserved collapse_to_string(1:2, letters[1:2]) #> [1] \"1|2|a|b\" collapse_to_string(data.frame(x = 1:2, y = letters[1:2])) #> [1] \"1|2|a|b\" # factor levels are captured (instead of numeric placeholders) collapse_to_string(factor(letters[1:2]), \"c\") #> [1] \"a|b|c\" # unique applies across all inputs, order is determined by first appearance collapse_to_string(c(3, 1, 2), 1:4, unique = FALSE) #> [1] \"3|1|2|1|2|3|4\" collapse_to_string(c(3, 1, 2), 1:4, unique = TRUE) #> [1] \"3|1|2|4\""},{"path":"https://allenbaron.github.io/DO.utils/reference/confine_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert (Nested) List to/from Character Vector — confine_list","title":"Convert (Nested) List to/from Character Vector — confine_list","text":"functions convert (nested) list character vector length, preserving restoring list structure values using JSON strings. perform flattening simplification JSON strings verbose.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/confine_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert (Nested) List to/from Character Vector — confine_list","text":"","code":"confine_list(.list) release_list(.json_chr)"},{"path":"https://allenbaron.github.io/DO.utils/reference/confine_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert (Nested) List to/from Character Vector — confine_list","text":".list (nested) list. .json_chr character vector containing JSON representation (nested) list elements top level.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/convert_to_ofn.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Ontology Files to OFN — convert_to_ofn","title":"Convert Ontology Files to OFN — convert_to_ofn","text":"Converts ontology files OWL functional syntax (OFN) using ROBOT (http://robot.obolibrary.org/).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/convert_to_ofn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Ontology Files to OFN — convert_to_ofn","text":"","code":"convert_to_ofn(path, out_path = NULL, gzip = FALSE, .robot_path = NULL)"},{"path":"https://allenbaron.github.io/DO.utils/reference/convert_to_ofn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Ontology Files to OFN — convert_to_ofn","text":"path path ontology file, string. out_path path desired output OFN output file, string. NULL (default), temporary file created. gzip Whether output gzipped, boolean (default: FALSE). TRUE, output file end '.gz' file extension. .robot_path path ROBOT executable .jar file, string. NULL (default), system ROBOT executable available used, otherwise error signaled. NOTE: .utils caches last ROBOT used future use.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/convert_to_ofn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Ontology Files to OFN — convert_to_ofn","text":"output path OFN file, invisibly.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/count_alliance_records.html","id":null,"dir":"Reference","previous_headings":"","what":"Count Alliance Records — count_alliance_records","title":"Count Alliance Records — count_alliance_records","text":"Counts records data Alliance Genome Resources. Counts can ascribed species record associated Model Organism Database (MOD) curated , optionally object type. count_alliance_records() primarily designed count records Alliance Disease Associations File. guarantee /options work files.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/count_alliance_records.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count Alliance Records — count_alliance_records","text":"","code":"count_alliance_records( alliance_tbl, term_subset = NULL, by_type = TRUE, pivot = TRUE, record_lvl = \"disease-object\", assign_to = c(\"species\", \"curator\") )"},{"path":"https://allenbaron.github.io/DO.utils/reference/count_alliance_records.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count Alliance Records — count_alliance_records","text":"alliance_tbl dataframe derived Alliance data (usually downloaded .tsv file) term_subset character vector DOIDs limit counts by_type logical indicating whether count Alliance object type (.e. gene, allele, model) pivot logical indicating whether pivot values type columns; ignored by_type = FALSE. record_lvl string indicating desired specificity records. assign_to assign records counting; one \"species\" \"curator\" (.e. organization responsible curating record)","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/count_alliance_records.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Count Alliance Records — count_alliance_records","text":"summary tibble count unique object annotations defined record_lvl, aggregated according species/curator (assign_to) , optionally, object type (by_type).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/count_alliance_records.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Count Alliance Records — count_alliance_records","text":"type record information use counting specified record_lvl accepts following values: \"full_record\" counts full non-duplicate records \"disease-object\" counts unique disease-object combinations \"disease\" counts unique diseases \"object\" counts unique MOD objects (.e. gene, allele, model identifiers)","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/count_alliance_records.html","id":"note","dir":"Reference","previous_headings":"","what":"NOTE","title":"Count Alliance Records — count_alliance_records","text":"disease-related data, exact duplicates (reason unknown) records differ seemingly unimportant information (e.g. date differs) existed. types duplicates removed prior record counts.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/count_delim.html","id":null,"dir":"Reference","previous_headings":"","what":"Count Delimited Columns — count_delim","title":"Count Delimited Columns — count_delim","text":"Counts columns values within delimited.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/count_delim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count Delimited Columns — count_delim","text":"","code":"count_delim( data, ..., delim = \"|\", sort = FALSE, name = NULL, trim = TRUE, convert = FALSE )"},{"path":"https://allenbaron.github.io/DO.utils/reference/count_delim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count Delimited Columns — count_delim","text":"data data.frame. ... Variables group . delim delimiter split elements within specified columns (default: \"|\"). sort TRUE, show largest groups top. name name new column output. omitted, default n. already column called n, use nn. column called n nn, 'll use nnn, , adding ns gets new name. trim Whether trim start/end whitespace, boolean (default: TRUE). convert Whether run utils::type.convert() .= TRUE new columns. useful de-concatenated columns integer, numeric logical. NOTE: \"NA\" strings always converted NAs.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/cur_yr.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Current Year — cur_yr","title":"Get Current Year — cur_yr","text":"Returns current 4-digit year string","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/cur_yr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Current Year — cur_yr","text":"","code":"cur_yr()"},{"path":"https://allenbaron.github.io/DO.utils/reference/download_alliance_tsv.html","id":null,"dir":"Reference","previous_headings":"","what":"Download Alliance .tsv.gz File — download_alliance_tsv","title":"Download Alliance .tsv.gz File — download_alliance_tsv","text":"Downloads URL-specified .tsv.gz file Alliance Genome Resources. Files can found https://www.alliancegenome.org/downloads. Right-click \"tsv\" link desired file select \"Copy Link\" get file URL.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_alliance_tsv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download Alliance .tsv.gz File — download_alliance_tsv","text":"","code":"download_alliance_tsv(dest_dir, url = NULL, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/download_alliance_tsv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download Alliance .tsv.gz File — download_alliance_tsv","text":"dest_dir path directory file saved url URL Alliance file; provided, requested console ... Additional arguments passed utils::download.file().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_alliance_tsv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download Alliance .tsv.gz File — download_alliance_tsv","text":"Path saved file.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_alliance_tsv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download Alliance .tsv.gz File — download_alliance_tsv","text":"date stamp indicating download date added base file name.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_alliance_tsv.html","id":"recommendation","dir":"Reference","previous_headings":"","what":"Recommendation","title":"Download Alliance .tsv.gz File — download_alliance_tsv","text":"Although possbile directly read file URL, downloading promotes reproducibility ensures future access needed.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_file.html","id":null,"dir":"Reference","previous_headings":"","what":"Download File(s) from the Internet — download_file","title":"Download File(s) from the Internet — download_file","text":"download_file() vectorized version utils::download.file() rely specifying \"libcurl\" method vectorization.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_file.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download File(s) from the Internet — download_file","text":"","code":"download_file(url, dest_file, on_failure = \"warn\", ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/download_file.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download File(s) from the Internet — download_file","text":"url character vector naming URL resource(s) downloaded. dest_file character vector file path(s) downloaded file(s) saved. on_failure string indicating handle download failure: \"warn\" - produce warning; includes exit codes debugging \"abort\" - abort execution \"list_failed\" - list URLs failed (output format differs, see Value) \"warn-list_failed\" - combination \"warn\" \"list_failed\" \"skip\" - nothing ... Additional arguments passed utils::download.file().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_file.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download File(s) from the Internet — download_file","text":"Unless on_failure includes \"list_failed\", successfully downloaded dest_file(s); otherwise, 2-vector list successful = dest_file(s) failed = url(s).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_obo_ontology.html","id":null,"dir":"Reference","previous_headings":"","what":"Download OBO Foundry Ontology File — download_obo_ontology","title":"Download OBO Foundry Ontology File — download_obo_ontology","text":"Downloads current version one ontologies OBO Foundry.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_obo_ontology.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download OBO Foundry Ontology File — download_obo_ontology","text":"","code":"download_obo_ontology(ontology_id, dest_dir, on_failure = \"warn\", ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/download_obo_ontology.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download OBO Foundry Ontology File — download_obo_ontology","text":"ontology_id character vector OBO Foundry ontology identifier(s) (lowercase, found http://www.obofoundry.org/). reference, ontology identifiers also provided obofoundry_metadata within package. dest_dir Path directory files saved. on_failure string indicating handle download failure: \"warn\" - produce warning; includes exit codes debugging \"abort\" - abort execution \"list_failed\" - list URLs failed (output format differs, see Value) \"warn-list_failed\" - combination \"warn\" \"list_failed\" \"skip\" - nothing ... Additional arguments passed utils::download.file().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_obo_ontology.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download OBO Foundry Ontology File — download_obo_ontology","text":"Unless on_failure includes \"list_failed\", successfully downloaded dest_file(s); otherwise, 2-vector list successful = dest_file(s) failed = url(s).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_omim.html","id":null,"dir":"Reference","previous_headings":"","what":"Download OMIM Files — download_omim","title":"Download OMIM Files — download_omim","text":"Downloads one specified files OMIM (Online catalog Mendelian Inheritance Man). mim2gene.txt file accessible without API key OMIM.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_omim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download OMIM Files — download_omim","text":"","code":"download_omim(omim_file, dest_dir, api_key = NULL, on_failure = \"abort\", ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/download_omim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download OMIM Files — download_omim","text":"omim_file character vector one OMIM file name(s). dest_dir Path directory files saved; OMIM files saved .txt format consist tab-separated values copyright header. api_key API key OMIM, string; required downloading file 'mim2gene.txt'. Register downloads OMIM. on_failure string indicating handle download failure: \"warn\" - produce warning; includes exit codes debugging \"abort\" - abort execution \"list_failed\" - list URLs failed (output format differs, see Value) \"warn-list_failed\" - combination \"warn\" \"list_failed\" \"skip\" - nothing ... Additional arguments passed utils::download.file().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_omim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download OMIM Files — download_omim","text":"Unless on_failure includes \"list_failed\", successfully downloaded dest_file(s); otherwise, 2-vector list successful = dest_file(s) failed = url(s).","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/drop_blank.html","id":null,"dir":"Reference","previous_headings":"","what":"Drop Blanks — drop_blank","title":"Drop Blanks — drop_blank","text":"Drops blank values vector list. See is_blank() constitutes blank value. drop_blank() generic function.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/drop_blank.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Drop Blanks — drop_blank","text":"","code":"drop_blank(x)"},{"path":"https://allenbaron.github.io/DO.utils/reference/drop_blank.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drop Blanks — drop_blank","text":"x character vector list.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/drop_blank.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Drop Blanks — drop_blank","text":"object class length x.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/drop_blank.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Drop Blanks — drop_blank","text":"","code":"drop_blank(c(\"\", \"A\")) #> [1] \"A\" drop_blank( list( c(\"\", \"A\"), c(\"A\", \"B\"), c(\"C\", \"D\", \"\", \"E\", \"\") ) ) #> [[1]] #> [1] \"A\" #> #> [[2]] #> [1] \"A\" \"B\" #> #> [[3]] #> [1] \"C\" \"D\" \"E\" #>"},{"path":"https://allenbaron.github.io/DO.utils/reference/elucidate.html","id":null,"dir":"Reference","previous_headings":"","what":"Elucidate the Data in an Object — elucidate","title":"Elucidate the Data in an Object — elucidate","text":"Elucidates (makes clear) data given object. elucidate() similar utils::str() dplyr::glimpse() provides detail nature data object.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/elucidate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Elucidate the Data in an Object — elucidate","text":"","code":"elucidate(x, type = \"basic\", print = TRUE, ...) # S3 method for omim_inventory elucidate(x, type = \"basic\", print = TRUE, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/elucidate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Elucidate the Data in an Object — elucidate","text":"x R object defined elucidate() method. type type report create, string; either \"basic\" (default) \"full\". See description Value returned individual methods details. print Whether print basic elucidation standard (default: TRUE). ... Additional arguments methods. currently used.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/elucidate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Elucidate the Data in an Object — elucidate","text":"omim_inventory method: type = \"basic\", single tibble OMIM DOID statistical information including total number terms , number OMIM terms present/absent , number deprecated terms, number terms one--many matches (either direction). type = \"full\", \"basic\" statistical tibble additional tibble's containing full records following: doid_deprecated, omim_to_many: Results OMIM ID corresponds multiple DOIDs, excluding skos broad/narrow/related matches. doid_to_many): Results DOID corresponds multiple OMIM IDs, excluding skos broad/narrow/related matches.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_ScoredMatch.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract ScoredMatch Objects (INTERNAL) — extract_ScoredMatch","title":"Extract ScoredMatch Objects (INTERNAL) — extract_ScoredMatch","text":"Extracts mapping results specialized ScoredMatch python objects (defined GILDA) LEVEL individual mappings.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_ScoredMatch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract ScoredMatch Objects (INTERNAL) — extract_ScoredMatch","text":"","code":"extract_ScoredMatch(py_ScoredMatch, prefix = NULL, prefix_sep = \":\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_ScoredMatch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract ScoredMatch Objects (INTERNAL) — extract_ScoredMatch","text":"py_ScoredMatch GILDA ScoredMatch (python) object. prefix Optional prefix add namespace local unique identifiers (LUI; e.g. 4, LUI \"disease\" ), string; preferably create complete namespace ID (e.g. \"DOID:4\"). prefix_sep Optional separator placed prefix namespace LUIs, string. Ignored prefix = NULL.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_as_tidygraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract OWL/RDF as a tidygraph — extract_as_tidygraph","title":"Extract OWL/RDF as a tidygraph — extract_as_tidygraph","text":"Extract 'nodes' 'parents' defined SPARQL query OWL/RDF tidygraph.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_as_tidygraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract OWL/RDF as a tidygraph — extract_as_tidygraph","text":"","code":"extract_as_tidygraph(x, query = NULL, collapse_method = \"first\", debug = FALSE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_as_tidygraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract OWL/RDF as a tidygraph — extract_as_tidygraph","text":"x 'pyDOID.owl.xml' object path OWL/RDF XML file can instantiated object owl_xml(). query SPARQL 1.1 query, string path .sparql/.rq file. NULL, input assumed OBO Foundry ontology oboInOwl:id rdfs:label OBO classes extracted. See \"Query Requirements\" section information. collapse_method method use collapsing extra data columns, string. See \"Query Requirements\" section information. debug [Intended developers ] Whether debug execution. Returns intermediate objects part output.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_as_tidygraph.html","id":"query-requirements","dir":"Reference","previous_headings":"","what":"Query Requirements","title":"Extract OWL/RDF as a tidygraph — extract_as_tidygraph","text":"tidygraph expects unique child-parent relationships, minimum SPARQL query include ?id (identifier 'child') ?parent (identifier child's parent(s)). additional output variables specified SPARQL query treated 'node' annotations collapsed using method collapse_col_flex() prevent duplication records.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_class_axiom.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Class Axioms — extract_class_axiom","title":"Extract Class Axioms — extract_class_axiom","text":"Extract owl:equivalentClass owl:subClassOf axioms doid-edit.owl file.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_class_axiom.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Class Axioms — extract_class_axiom","text":"","code":"extract_class_axiom(DO_repo)"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_class_axiom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Class Axioms — extract_class_axiom","text":"DO_repo local path HumanDiseaseOntology repo, string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_class_axiom.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Class Axioms — extract_class_axiom","text":"list two character vectors (eq subclass) containing axioms OWL functional format.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_eq_axiom.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Equivalent Class Axioms — extract_eq_axiom","title":"Extract Equivalent Class Axioms — extract_eq_axiom","text":"Extract owl:equivalentClass axioms doid-edit.owl file.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_eq_axiom.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Equivalent Class Axioms — extract_eq_axiom","text":"","code":"extract_eq_axiom(DO_repo)"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_eq_axiom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Equivalent Class Axioms — extract_eq_axiom","text":"DO_repo local path HumanDiseaseOntology repo, string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_eq_axiom.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Equivalent Class Axioms — extract_eq_axiom","text":"Equivalent class axioms OWL functional format, character vector.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_ordo_mappings.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract mappings from ORDO — extract_ordo_mappings","title":"Extract mappings from ORDO — extract_ordo_mappings","text":"Extract mappings Orphanet Rare Disease Ontology (ORDO). ORDO uses oboInOwl:hasDbXref mapping annotations indicate exact/broad/narrow-ness. Utilizes robot().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_ordo_mappings.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract mappings from ORDO — extract_ordo_mappings","text":"","code":"extract_ordo_mappings( ordo_path, as_skos = TRUE, output = NULL, tidy_what = \"everything\" )"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_ordo_mappings.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract mappings from ORDO — extract_ordo_mappings","text":"ordo_path path ORDO file, string. as_skos Whether convert ORDO's annotated oboInOwl:hasDbXref mappings Simple Knowledge Organization System (SKOS) equivalents, boolean (default: TRUE). ORDO-skos equivalent predicates follows: \"BTNT\" - skos:narrowMatch \"NTBT\" - skos:broadMatch \"E\" - skos:exactMatch \"ND\" - doid:undefinedMatch (supplements SKOS) \"W\" - doid:notMatch (supplements SKOS) output path output written, string, NULL (default) load data directly. tidy_what elements SPARQL-created data.frame tidy, character vector. One following: \"everything\" apply tidy operations (precedence \"nothing\"). \"header\" remove leading ? header labels. \"unnest\" unnest list columns unnest_cross(). \"uri_to_curie\" convert URIs recognized .utils CURIEs to_curie(). \"lgl_NA_false\" replace NA logical columns FALSE. \"as_tibble\" make output tibble. \"nothing\" prevent tidying.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_ordo_mappings.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract mappings from ORDO — extract_ordo_mappings","text":"output specified, path output file data. Otherwise, data tibble. ORDO mappings data formatted according SSSOM specification, additional status column indicating status (active, deprecated, etc.) ORPHA term. as_skos = FALSE, ORDO's text-based oboInOwl:hasDbXref annotations denoting type relationship Xref represents (simple text code ) included predicate_modifier column.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pm_date.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Publication Date from PubMed Citations — extract_pm_date","title":"Extract Publication Date from PubMed Citations — extract_pm_date","text":"Extracts complete publication date possible Pubmed citations.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pm_date.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Publication Date from PubMed Citations — extract_pm_date","text":"","code":"extract_pm_date(citation)"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pm_date.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Publication Date from PubMed Citations — extract_pm_date","text":"citation character vector PubMed citations","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pm_date.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Publication Date from PubMed Citations — extract_pm_date","text":"function uses step-wise approach, attempting first extract full date, subsequently year & month , available, just year. approach designed prevent accidental matches year values found titles. NOTE: day missing, function return full date using first day month. month day missing, \\ function return first day year.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.elink.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract PubMed ID from elink object — extract_pmid.elink","title":"Extract PubMed ID from elink object — extract_pmid.elink","text":"Extract PubMed ID elink object.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.elink.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract PubMed ID from elink object — extract_pmid.elink","text":"","code":"# S3 method for elink extract_pmid(x, linkname = NULL, quietly = FALSE, no_result = \"error\", ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.elink.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract PubMed ID from elink object — extract_pmid.elink","text":"x elink object, generated rentrez::entrez_link derivatives (e.g. citedby_pmid). linkname linkname specified Entrez API; necessary one linkname returned PubMed. quietly Suppress PubMed linkname message linkname specified multiple results exist elink object. no_result type condition signaled PubMed results exist response; one \"error\", \"warning\" (default), \"message\" \"none\". ... Unused, included generic consistency .","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.elink_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract PubMed ID from elink_list object — extract_pmid.elink_list","title":"Extract PubMed ID from elink_list object — extract_pmid.elink_list","text":"Extract PubMed ID elink_list object.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.elink_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract PubMed ID from elink_list object — extract_pmid.elink_list","text":"","code":"# S3 method for elink_list extract_pmid(x, no_result = \"warning\", ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.elink_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract PubMed ID from elink_list object — extract_pmid.elink_list","text":"x elink_list object, generated rentrez::entrez_link derivatives (e.g. citedby_pmid) by_id = TRUE . no_result type condition signaled PubMed results exist response; one \"error\", \"warning\" (default), \"message\" \"none\". ... Additional arguments passed extract_pmid.elink().","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract PubMed ID — extract_pmid","title":"Extract PubMed ID — extract_pmid","text":"extract_pmid generic function extracts PubMed IDs.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract PubMed ID — extract_pmid","text":"","code":"extract_pmid(x, ...) # S3 method for pm_search extract_pmid(x, ...) # S3 method for pmc_search extract_pmid(x, ...) # S3 method for data.frame extract_pmid(x, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract PubMed ID — extract_pmid","text":"x object. ... Arguments passed methods.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract PubMed ID — extract_pmid","text":"character vector PubMed IDs, except extract_pmid.elink_list method returns list PubMed ID character vectors.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_subclass_axiom.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract 'Subclass Of' Axioms — extract_subclass_axiom","title":"Extract 'Subclass Of' Axioms — extract_subclass_axiom","text":"Extract owl:subClassOf axioms doid-edit.owl file.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_subclass_axiom.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract 'Subclass Of' Axioms — extract_subclass_axiom","text":"","code":"extract_subclass_axiom(DO_repo)"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_subclass_axiom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract 'Subclass Of' Axioms — extract_subclass_axiom","text":"DO_repo local path HumanDiseaseOntology repo, string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_subclass_axiom.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract 'Subclass Of' Axioms — extract_subclass_axiom","text":"'Subclass ' axioms OWL functional format, character vector.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_subtree.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Subtree — extract_subtree","title":"Extract Subtree — extract_subtree","text":"Extracts classes parents subtree pyDOID.owl.xml object.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_subtree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Subtree — extract_subtree","text":"","code":"extract_subtree(x, top_node, reload = FALSE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_subtree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Subtree — extract_subtree","text":"x 'pyDOID.owl.xml' object path OWL/RDF XML file can instantiated object owl_xml(). top_node top node tree, valid DOID (see is_valid_doid() valid input formats). reload Force reload file memory, TRUE FALSE (default).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_subtree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Subtree — extract_subtree","text":"tibble columns: id, label, parent_id, parent_label, one row unique combination subclass including top_node.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/format_axiom.html","id":null,"dir":"Reference","previous_headings":"","what":"Format Logical Axioms — format_axiom","title":"Format Logical Axioms — format_axiom","text":"Format logical axioms style Protege. Input axioms must OWL functional syntax.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_axiom.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format Logical Axioms — format_axiom","text":"","code":"format_axiom( x, property_df = NULL, generify_obo = FALSE, placeholders = c(\"<<<\", \">>>\", \"%%%\", \"@@@\"), max_phrases = 15L )"},{"path":"https://allenbaron.github.io/DO.utils/reference/format_axiom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format Logical Axioms — format_axiom","text":"x Complete logical axioms OWL functional syntax, character vector. property_df [Optional] data.frame consisting relevant annotation object properties may used make properties readable axioms. provided, data.frame include two columns: property: property's URI. label: property's rdfs:label (equivalent). See 'Formatting Options' details. generify_obo Whether make OBO ontology classes properties generic, TRUE FALSE (default). See 'Formatting Options' details. placeholders set 4 strings used internally preserve axiom parentheses [1:2], phrase spacing [3], complete phrases [4], character vector. generally need edited exposed case conflicts within axioms. max_phrases maximum number phrases update axiom, integer. protects infinite loops need edited one Object* OWL functional phrases returned unformatted.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_axiom.html","id":"formatting-options","dir":"Reference","previous_headings":"","what":"Formatting Options","title":"Format Logical Axioms — format_axiom","text":"format_axiom() always rearrange equivalent class subclass logical axioms OWL functional syntax readable form, similar Protege. However, classes properties axioms returned URIs CURIEs (formatted x). may desirable programmatic examination still difficult human read. make readable, property_df generify_obo arguments can used. property_df used replace OBO ontology property URIs CURIEs namespace-prefixed labels: e.g. obo:RO_0004026 become RO:'disease location'. Non-OBO properties modified. generify_obo replaces individual OBO URIs CURIEs either namespace-prefixed types, e.g. obo:UBERON_0001032 become UBERON:anatomy, namespace . format simplifies axioms making basic analysis axiom patterns easier. See documentation generify_obo() details.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_doid.html","id":null,"dir":"Reference","previous_headings":"","what":"Format DOIDs — format_doid","title":"Format DOIDs — format_doid","text":"Convert valid DOIDs /bare numbers specified DOID format. Input may tested ensure matches valid DOID format attempt made confirm bare numbers DOIDs match actual diseases ontology.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_doid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format DOIDs — format_doid","text":"","code":"format_doid(x, as = \"CURIE\", convert_bare = FALSE, validate_input = TRUE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/format_doid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format DOIDs — format_doid","text":"x set IDs, character vector. format convert DOIDs , string. valid formats possible options: \"CURIE\" (default), \"URI\", \"obo_CURIE\", \"basename\". convert_bare Whether bare numbers converted canonical DOIDs, TRUE FALSE (default). validate_input Whether ensure valid DOIDs included x, TRUE (default) FALSE. FALSE, non-DOID input returned unchanged.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_doid.html","id":"caution","dir":"Reference","previous_headings":"","what":"Caution","title":"Format DOIDs — format_doid","text":"extra cautious using format_doid() validate_input = FALSE unexpected text conversion may occur.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/format_doid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format DOIDs — format_doid","text":"","code":"x <- c( \"http://purl.obolibrary.org/obo/DOID_0001816\", \"DOID:4\", \"obo:DOID_14566\", \"DOID_0040001\" ) format_doid(x, as = \"URI\") #> [1] \"http://purl.obolibrary.org/obo/DOID_0001816\" #> [2] \"http://purl.obolibrary.org/obo/DOID_4\" #> [3] \"http://purl.obolibrary.org/obo/DOID_14566\" #> [4] \"http://purl.obolibrary.org/obo/DOID_0040001\" format_doid(x, as = \"CURIE\") #> [1] \"DOID:0001816\" \"DOID:4\" \"DOID:14566\" \"DOID:0040001\" format_doid(x, as = \"obo_CURIE\") #> [1] \"obo:DOID_0001816\" \"obo:DOID_4\" \"obo:DOID_14566\" \"obo:DOID_0040001\" format_doid(x, as = \"basename\") #> [1] \"DOID_0001816\" \"DOID_4\" \"DOID_14566\" \"DOID_0040001\" # bare numbers can be converted to canonical DOIDs, if desired w_bare <- c(x, \"0050117\") format_doid(w_bare, convert_bare = TRUE) #> [1] \"DOID:0001816\" \"DOID:4\" \"DOID:14566\" \"DOID:0040001\" \"DOID:0050117\" # non-DOIDs can be passed as input, if desired mixed_input <- c(x, \"random_text\", \"obo:SYMP_0000000\", \"0050117\") format_doid(mixed_input, validate_input = FALSE) #> [1] \"DOID:0001816\" \"DOID:4\" \"DOID:14566\" \"DOID:0040001\" #> [5] \"random_text\" \"obo:SYMP_0000000\" \"0050117\" format_doid(mixed_input, convert_bare = TRUE, validate_input = FALSE) #> [1] \"DOID:0001816\" \"DOID:4\" \"DOID:14566\" \"DOID:0040001\" #> [5] \"random_text\" \"obo:SYMP_0000000\" \"DOID:0050117\""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_hyperlink.html","id":null,"dir":"Reference","previous_headings":"","what":"Format URLs as Hyperlinks — format_hyperlink","title":"Format URLs as Hyperlinks — format_hyperlink","text":"Formats URLs hyperlinks Google Sheets, Excel, html.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_hyperlink.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format URLs as Hyperlinks — format_hyperlink","text":"","code":"format_hyperlink(url, as, ..., text = NULL, preserve = \"url\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/format_hyperlink.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format URLs as Hyperlinks — format_hyperlink","text":"url One URLs, character vector. format use hyperlink, string; one \"gs\" (Google Sheet), \"xlsx\" (Excel), \"html\". ... (= \"html\") One name-value pairs html <> attributes. text (Optional) text display link, character vector. NULL (default), URL serve text. one value provided, recycled. preserve value return url NA, string. One \"url\" (default) \"text\".","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_hyperlink.html","id":"excel-note","dir":"Reference","previous_headings":"","what":"Excel Note","title":"Format URLs as Hyperlinks — format_hyperlink","text":"Use openxlsx pkg write data hyperlinks Excel.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_hyperlink.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format URLs as Hyperlinks — format_hyperlink","text":"","code":"format_hyperlink(\"https://www.google.com\", \"gs\") #> #> [1] =HYPERLINK(\"https://www.google.com\") format_hyperlink(\"https://www.google.com\", \"xlsx\") #> [1] \"https://www.google.com\" #> attr(,\"class\") #> [1] \"hyperlink\" format_hyperlink(\"https://www.google.com\", \"html\") #> [1] \"https://www.google.com<\/a>\" # with 'text' (argument must be named) format_hyperlink(\"https://www.google.com\", \"gs\", text = \"Google\") #> #> [1] =HYPERLINK(\"https://www.google.com\", \"Google\") format_hyperlink(\"https://www.google.com\", \"xlsx\", text = \"Google\") #> [1] \"=HYPERLINK(\\\"https://www.google.com\\\", \\\"Google\\\")\" #> NULL format_hyperlink(\"https://www.google.com\", \"html\", text = \"Google\") #> [1] \"Google<\/a>\" # html with attributes format_hyperlink( \"https://www.google.com\", \"html\", text = \"Google\", target = \"_blank\", rel = \"external\" ) #> [1] \"Google<\/a>\" # NA values in 'url' are passed through without modification by default. If # 'text' is provided and preferred when 'url' is NA use preserve = \"text\". format_hyperlink(c(\"https://www.google.com\", NA), \"gs\") #> #> [1] =HYPERLINK(\"https://www.google.com\") NA format_hyperlink( c(\"https://www.google.com\", NA), \"gs\", text = c(\"Google\", \"placeholder\") ) #> #> [1] =HYPERLINK(\"https://www.google.com\", \"Google\") #> [2] NA # 'url' is always preserved when 'text' is NA but 'url' is not format_hyperlink( c(\"https://www.google.com/\", \"https://madeup.url.com/fakeID\"), \"html\", text = c(\"google\", NA), preserve = \"text\" ) #> [1] \"google<\/a>\" #> [2] \"https://madeup.url.com/fakeID<\/a>\""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_obo.html","id":null,"dir":"Reference","previous_headings":"","what":"Format OBO Foundry IDs — format_obo","title":"Format OBO Foundry IDs — format_obo","text":"Convert valid OBO Foundry ontology IDs specified format. Input may tested ensure matches valid OBO ID format attempt made confirm IDs match actual terms OBO Foundry ontology.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_obo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format OBO Foundry IDs — format_obo","text":"","code":"format_obo(x, as = \"CURIE\", validate_input = TRUE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/format_obo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format OBO Foundry IDs — format_obo","text":"x set IDs, character vector. format convert OBO IDs , string. following formats possible options: \"CURIE\" (default) \"URI\" \"bracketed_URI\": e.g. \"\" \"ns_lui\": namespace local unique identifier (preserves separator). \"ns\": namespace ontology valid OBO formats, first three formats may modified repeatedly format_obo(). 'ns' formats, hand, valid OBO formats formatted format_obo(). validate_input Whether ensure valid OBO IDs included x,TRUE (default) FALSE. FALSE, non-OBO ID input likely returned unchanged.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_obo.html","id":"caution","dir":"Reference","previous_headings":"","what":"Caution","title":"Format OBO Foundry IDs — format_obo","text":"extra cautious using format_obo() validate_input = FALSE unexpected text conversion may occur.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/format_obo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format OBO Foundry IDs — format_obo","text":"","code":"x <- c( \"http://purl.obolibrary.org/obo/DOID_0001816\", \"\", \"obo:SYMP_0000000\", \"obo:so#has_origin\" ) # reversible format_obo(x, as = \"CURIE\") #> [1] \"obo:DOID_0001816\" \"obo:CL_0000066\" \"obo:SYMP_0000000\" #> [4] \"obo:so#has_origin\" format_obo(x, as = \"URI\") #> [1] \"http://purl.obolibrary.org/obo/DOID_0001816\" #> [2] \"http://purl.obolibrary.org/obo/CL_0000066\" #> [3] \"http://purl.obolibrary.org/obo/SYMP_0000000\" #> [4] \"http://purl.obolibrary.org/obo/so#has_origin\" format_obo(x, as = \"bracketed_URI\") #> [1] \"\" #> [2] \"\" #> [3] \"\" #> [4] \"\" # irreversible format_obo(x, as = \"ns_lui\") #> [1] \"DOID_0001816\" \"CL_0000066\" \"SYMP_0000000\" \"so#has_origin\" format_obo(x, as = \"ns\") #> [1] \"DOID\" \"CL\" \"SYMP\" \"so#\" # non-OBO IDs can be passed as input with caution, if desired mixed_input <- c(x, \"random_text\", \"0050117\", \"obo:SYMP:0000000\") format_obo(mixed_input, validate_input = FALSE) #> [1] \"obo:DOID_0001816\" \"obo:CL_0000066\" \"obo:SYMP_0000000\" #> [4] \"obo:so#has_origin\" \"random_text\" \"0050117\" #> [7] \"obo:SYMP:0000000\""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_subtree.html","id":null,"dir":"Reference","previous_headings":"","what":"Format a Subtree — format_subtree","title":"Format a Subtree — format_subtree","text":"Format subtree, produced extract_subtree(), text-based tree mirroring disease-ontology.org.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_subtree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format a Subtree — format_subtree","text":"","code":"format_subtree(subtree_df, top_node)"},{"path":"https://allenbaron.github.io/DO.utils/reference/format_subtree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format a Subtree — format_subtree","text":"subtree_df dataframe extract_subtree(). top_node top node tree, valid DOID (see is_valid_doid() valid input formats).","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/format_subtree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format a Subtree — format_subtree","text":"","code":"if (FALSE) { do_owl <- {path_to_doid.owl_here} subtree <- extract_subtree(do_owl, \"DOID:3070\") st_formatted <- format_subtree(subtree, \"DOID:3070\") st_formatted }"},{"path":"https://allenbaron.github.io/DO.utils/reference/generify_obo.html","id":null,"dir":"Reference","previous_headings":"","what":"Generify OBO Classes/Properties (INTERNAL) — generify_obo","title":"Generify OBO Classes/Properties (INTERNAL) — generify_obo","text":"format_axiom() internal helper replaces URI/CURIEs defined OBO ontologies namespace-prefixed descriptions/types, defined internally, just namespace. modify non-OBO class URI/CURIEs.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/generify_obo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generify OBO Classes/Properties (INTERNAL) — generify_obo","text":"","code":"generify_obo(x)"},{"path":"https://allenbaron.github.io/DO.utils/reference/generify_obo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generify OBO Classes/Properties (INTERNAL) — generify_obo","text":"x Complete logical axioms OWL functional syntax, character vector.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/generify_obo.html","id":"internally-defined-obo-namespace-types","dir":"Reference","previous_headings":"","what":"Internally-defined OBO namespace-types","title":"Generify OBO Classes/Properties (INTERNAL) — generify_obo","text":"following namespaces 'namespace:types' defined function: CL: 'CL:cell' CHEBI: 'CHEBI:chemical' DISDRIV: 'DISDRIV:disease_driver' DOID: 'DOID:disease' FOODON: 'FOODON:food_material' ECO: 'ECO:evidence' GENO: 'GENO:inheritance_pattern' NCBITaxon: 'NCBITaxon:organism' OMIM: 'OMIM:susceptibility' UBERON: 'UBERON:anatomy' UPHENO: 'UPHENO:phenotype' : ':sequence' SYMP: 'SYMP:symptom' TRANS: 'TRANS:pathogen_transmission' Ontologies multiple object types used (e.g. HP, onset phenotype), imported via DISDRIV (e.g. ExO), used properties (e.g. RO) defined internally formatted namespace . .","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/get_bioc_pkg_stats.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Bioconductor Package Statistics — get_bioc_pkg_stats","title":"Get Bioconductor Package Statistics — get_bioc_pkg_stats","text":"Get download statistics specific Bioconductor packages.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/get_bioc_pkg_stats.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Bioconductor Package Statistics — get_bioc_pkg_stats","text":"","code":"get_bioc_pkg_stats(pkg, pkg_type, yr, delay_rng)"},{"path":"https://allenbaron.github.io/DO.utils/reference/get_bioc_pkg_stats.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Bioconductor Package Statistics — get_bioc_pkg_stats","text":"pkg character vector; name Bioconductor package(s) pkg_type character vector length pkg identifying type Bioconductor package; one \"software\", \"annotation\", \"experiment\", \"workflow\" yr character scalar; 4-digit year stats desired, default = current year (currently implemented single yr) delay_rng c(min, max) number seconds wait requests; default = c(1, 10)","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/get_url.html","id":null,"dir":"Reference","previous_headings":"","what":"Get URL (internal) — get_url","title":"Get URL (internal) — get_url","text":"Get URL used within package. List possible names organized type get_url(\"names\").","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/get_url.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get URL (internal) — get_url","text":"","code":"get_url(.name)"},{"path":"https://allenbaron.github.io/DO.utils/reference/get_url.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get URL (internal) — get_url","text":".name Internal name desired URL, string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/get_url.html","id":"possible-names-organized-by-type-","dir":"Reference","previous_headings":"","what":"Possible Names (organized by type)","title":"Get URL (internal) — get_url","text":"pub_urls: doi, github, orcid, pubmed, pmc xref_urls: ICD9CM, ICD10CM, KEGG, MESH, NCI, ORDO, OMIM, SNOMEDCT_US, UMLS_CUI web: DO_website data_urls: alliance_disease_tsv ns_prefix: ...includes common OBO Foundry SPARQL prefixes; use ns_prefix see complete list.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/get_url.html","id":"note","dir":"Reference","previous_headings":"","what":"NOTE","title":"Get URL (internal) — get_url","text":"get_url() provides prefixes disease-ontology.org style link support. prefixes primarily cross-references (xrefs) generally better creating URLs look information particular entity online may overlap official namespaces ns_prefix, can also accessed get_url(). occurs, prefixes can generally distinguished capitalization, xref prefixes uppercase, e.g. \"MESH\" = \"https://meshb.nlm.nih.gov/record/ui?ui=\", official namespace lowercase, e.g. \"mesh\" = \"https://id.nlm.nih.gov/mesh/\". distinction always guaranteed, care taken prefix related xrefs .","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/identify_obsolete.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify Obsolete (INTERNAL) — identify_obsolete","title":"Identify Obsolete (INTERNAL) — identify_obsolete","text":"Identify obsolete terms Human Disease Ontology.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/identify_obsolete.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify Obsolete (INTERNAL) — identify_obsolete","text":"","code":"identify_obsolete(x, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/identify_obsolete.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify Obsolete (INTERNAL) — identify_obsolete","text":"x object information obsolete terms (use methods() available classes). ... used; included extensibility.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/iff_all_vals.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for All Values — iff_all_vals","title":"Test for All Values — iff_all_vals","text":"Returns TRUE , , values present x values present x.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/iff_all_vals.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for All Values — iff_all_vals","text":"","code":"iff_all_vals(x, values)"},{"path":"https://allenbaron.github.io/DO.utils/reference/iff_all_vals.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for All Values — iff_all_vals","text":"x vector. values values ensure exist x.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/iff_all_vals.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for All Values — iff_all_vals","text":"TRUE FALSE. FALSE, missing /extra attributes included assist identifying non-conformity.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/install_robot.html","id":null,"dir":"Reference","previous_headings":"","what":"Install OBO Foundry ROBOT Tool (Mac/Linux ONLY) — install_robot","title":"Install OBO Foundry ROBOT Tool (Mac/Linux ONLY) — install_robot","text":"Installs latest ROBOT robot.jar files default system path (/usr/local/bin). tested Macs also likely work Linux.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/install_robot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Install OBO Foundry ROBOT Tool (Mac/Linux ONLY) — install_robot","text":"","code":"install_robot(...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/install_robot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Install OBO Foundry ROBOT Tool (Mac/Linux ONLY) — install_robot","text":"... arguments passed utils::download.file(); needed","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/install_robot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Install OBO Foundry ROBOT Tool (Mac/Linux ONLY) — install_robot","text":"version robot.jar, successful, otherwise warning indicating failures occurred along non-zero integer codes. See documentation utils::download.file() (download robot/robot.jar) system2() (making robot executable; uses system chmod) \"Value\" details.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/inventory_omim.html","id":null,"dir":"Reference","previous_headings":"","what":"Assess whether OMIM Data is in DO — inventory_omim","title":"Assess whether OMIM Data is in DO — inventory_omim","text":"Assesses whether OMIM identifiers present Human Disease Ontology mappings (either xrefs skos mappings). Utilizes robot() comparison.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/inventory_omim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assess whether OMIM Data is in DO — inventory_omim","text":"","code":"inventory_omim( onto_path, omim_input, keep_mim = c(\"#\", \"%\"), include_pred = c(\"skos:exactMatch\", \"skos:closeMatch\", \"oboInOwl:hasDbXref\"), when_pred_NA = \"error\" )"},{"path":"https://allenbaron.github.io/DO.utils/reference/inventory_omim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assess whether OMIM Data is in DO — inventory_omim","text":"onto_path path ontology file, string. omim_input omim_tbl created read_omim() path .tsv .csv file (possibly compressed) can read read_omim() includes OMIM data compare mappings ontology. NOTE: omim_tbl provided, keep_mim ignored. keep_mim [OMIM search data ] MIM symbols representing data types keep, character vector, NULL retain (default: \"#\" \"%\"). OMIM defined MIM symbols : include_pred predicates include testing one--multiple mappings, character vector (default: skos:exactMatch, skos:closeMatch, oboInOwl:hasDbXref). predicates ignored. when_pred_NA missing predicates detected, string; one \"error\" (default), \"warn\", NULL (nothing). NA predicates always ignored mapping exists (.e. one corresponding values x y /also NA).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/inventory_omim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assess whether OMIM Data is in DO — inventory_omim","text":"omim_input 5 additional columns: exists: Logical indicating whether OMIM ID present . mapping_type: mapping predicate(s) OMIM ID disease, present. Multiple predicate(s) OMIM DOID pipe delimited. doid: DOID disease mapped OMIM ID, present. do_label: label disease mapped OMIM ID, present. do_dep: Logical indicating whether disease deprecated , present. multimaps: direction OMIM term maps multiple terms resource, \"omim_to_doid\", \"doid_to_omim\", \"both_ways\" NA. Output class omim_inventory, type class mapping_inventory.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/inventory_omim.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Assess whether OMIM Data is in DO — inventory_omim","text":"","code":"if (FALSE) { # manually copy or download data from https://www.omim.org/phenotypicSeries/PS609060 inventory_omim( onto_path = \"~/Ontologies/HumanDiseaseOntology/src/ontology/doid-edit.owl\", omim_input = \"omimps.csv\", ) }"},{"path":"https://allenbaron.github.io/DO.utils/reference/invert_nm.html","id":null,"dir":"Reference","previous_headings":"","what":"Invert Names and Values (INTERNAL) — invert_nm","title":"Invert Names and Values (INTERNAL) — invert_nm","text":"Currently supports character vectors.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/invert_nm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Invert Names and Values (INTERNAL) — invert_nm","text":"","code":"invert_nm(x)"},{"path":"https://allenbaron.github.io/DO.utils/reference/invert_nm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Invert Names and Values (INTERNAL) — invert_nm","text":"x named object.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/invert_sublists.html","id":null,"dir":"Reference","previous_headings":"","what":"Invert Sublists — invert_sublists","title":"Invert Sublists — invert_sublists","text":"Inverts elements lists within list elements (depth 3) regrouped position name within sublist (depth 2).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/invert_sublists.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Invert Sublists — invert_sublists","text":"","code":"invert_sublists(x, use_sublist_names = FALSE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/invert_sublists.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Invert Sublists — invert_sublists","text":"x list non-empty lists. use_sublist_names Whether use sublist names inversion, TRUE FALSE (default). See 'Details' specifics.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/invert_sublists.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Invert Sublists — invert_sublists","text":"use_sublist_names alters sublists inverted follows: FALSE, sublist elements inverted position within sublists. Sublists must number elements. original sublist names preserved (now depth 3) original depth 3 names (now sublists) dropped. TRUE, sublists elements (depth 3) must named names must duplicated within given sublist. Also, matching names must exist across sublists, names used inversion , well , name inverted sublists (names depth 3 moved depth 2) output. sublists must still number elements.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/invert_sublists.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Invert Sublists — invert_sublists","text":"","code":".l <- list( list(1, \"a\", TRUE), list(2, \"b\", FALSE) ) invert_sublists(.l) #> [[1]] #> [[1]][[1]] #> [1] 1 #> #> [[1]][[2]] #> [1] 2 #> #> #> [[2]] #> [[2]][[1]] #> [1] \"a\" #> #> [[2]][[2]] #> [1] \"b\" #> #> #> [[3]] #> [[3]][[1]] #> [1] TRUE #> #> [[3]][[2]] #> [1] FALSE #> #> # sublist element ('item') names are dropped when inverting by position but # sublist names are retained .l_nm <- list( subl1 = list(item1 = 1, item2 = \"a\", item3 = TRUE), subl2 = list(item1 = 2, item2 = \"b\", item3 = FALSE) ) invert_sublists(.l_nm, use_sublist_names = FALSE) #> [[1]] #> [[1]]$subl1 #> [1] 1 #> #> [[1]]$subl2 #> [1] 2 #> #> #> [[2]] #> [[2]]$subl1 #> [1] \"a\" #> #> [[2]]$subl2 #> [1] \"b\" #> #> #> [[3]] #> [[3]]$subl1 #> [1] TRUE #> #> [[3]]$subl2 #> [1] FALSE #> #> # all names are retained when inverting by name .res1 <- invert_sublists(.l_nm, use_sublist_names = TRUE) .res1 #> $item1 #> $item1$subl1 #> [1] 1 #> #> $item1$subl2 #> [1] 2 #> #> #> $item2 #> $item2$subl1 #> [1] \"a\" #> #> $item2$subl2 #> [1] \"b\" #> #> #> $item3 #> $item3$subl1 #> [1] TRUE #> #> $item3$subl2 #> [1] FALSE #> #> # names are used for inverting, so order can be different .l_nm2 <- list( subl1 = list(item1 = 1, item2 = \"a\", item3 = TRUE), subl2 = list(item2 = \"b\", item3 = FALSE, item1 = 2) # order changed ) ## invert by name -> results the same, despite order change .res2 <- invert_sublists(.l_nm2, use_sublist_names = TRUE) identical(.res1, .res2) #> [1] TRUE ## invert by pos -> results differ .res3 <- invert_sublists(.l_nm2, use_sublist_names = FALSE) identical(.res1, .res3) #> [1] FALSE"},{"path":"https://allenbaron.github.io/DO.utils/reference/is_curie.html","id":null,"dir":"Reference","previous_headings":"","what":"CURIE (RDF ID) Predicate — is_curie","title":"CURIE (RDF ID) Predicate — is_curie","text":"predicate designed validate CURIEs, compact URIs conforming W3C CURIE Syntax 1.0 standard (stricter allowed standard).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/is_curie.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"CURIE (RDF ID) Predicate — is_curie","text":"","code":"is_curie(x, def = \"obo_generic\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/is_curie.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"CURIE (RDF ID) Predicate — is_curie","text":"x set CURIEs, character vector. def definition CURIEs test ; string. One \"obo\", \"obo_generic\" (default), \"w3c\", \"w3c_safe\" (see Notes section details).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/is_curie.html","id":"notes","dir":"Reference","previous_headings":"","what":"Notes","title":"CURIE (RDF ID) Predicate — is_curie","text":"W3C CURIE Syntax 1.0 standard defines general CURIE syntax allowed (def = \"w3c\"; perfect implementation, e.g. U+3000 non-breaking space accepted). Note definition URIs identified CURIEs. desirable distinguish use def = \"w3c_safe\" wrap CURIEs brackets (defined standard. Alternatively, use stricter OBO Foundry-based standards (stated standard, strict definitions CURIEs can defined). \"obo\" corresponds official OBO Foundry definition CURIE stated OBO Foundry ID Policy. work class CURIEs OBO Foundry ontologies recognize obo:IDSPACE_LOCALID formatted CURIEs CURIEs letters symbols local unique identifier. allow set still restricting CURIE patterns found OBO Foundry ontologies, use \"obo_generic\".","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/is_curie.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"CURIE (RDF ID) Predicate — is_curie","text":"","code":"id <- c( #### pass all #### \"DOID:0001816\", \"CL:0000066\", #### pass \"obo_generic\" & \"w3c\" #### \"obo:DOID_4\", \"obo:so#has_origin\", # obo prefixed CURIEs \"oboInOwl:hasDbXref\", \"skos:exactMatch\", # obo object properties \"alfred:LO362836C\", # not OBO but conforms to `\"obo_generic\"` pattern #### pass only \"w3c\" #### \"4dn.biosource:4DNSR73BT2A2\", \"aceview.worm:aap-1\", #### always fail #### \"0001816\", # bare number without prefix \" obo:HP_0000001\", # must have NO `[:space:]` characters \"http://purl.obolibrary.org/obo/DOID_0001816\" # URI )"},{"path":"https://allenbaron.github.io/DO.utils/reference/is_invariant.html","id":null,"dir":"Reference","previous_headings":"","what":"Test if an Object is Invariant — is_invariant","title":"Test if an Object is Invariant — is_invariant","text":"Test object invariant (.e. values equal, within given tolerance numeric vectors).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/is_invariant.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test if an Object is Invariant — is_invariant","text":"","code":"is_invariant(x, ...) # S3 method for default is_invariant(x, na.rm = FALSE, ...) # S3 method for numeric is_invariant(x, na.rm = FALSE, tol = sqrt(.Machine$double.eps), ...) # S3 method for list is_invariant(x, incl_nm = TRUE, ...) # S3 method for data.frame is_invariant(x, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/is_invariant.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test if an Object is Invariant — is_invariant","text":"x object tested ... unused; extensibility na.rm logical indicating whether exclude NA values tol double, tolerance use (numeric vectors) incl_nm Whether top-level names included determining list invariant (default: TRUE).","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/length_sort.html","id":null,"dir":"Reference","previous_headings":"","what":"Sort by Character Length — length_sort","title":"Sort by Character Length — length_sort","text":"Sort vector (length_sort()) data.frame (length_order()) character length. Multiple elements length secondarily sorted order appearance.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/length_sort.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sort by Character Length — length_sort","text":"","code":"length_sort(x, by_name = FALSE, ...) length_order(data, cols, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/length_sort.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sort by Character Length — length_sort","text":"x vector. by_name Whether sort vector name instead value, boolean. ... Arguments passed base::order decreasing logical. sort order increasing decreasing? \"radix\" method, can vector length equal number arguments .... methods, must length one. na.last controlling treatment NAs. TRUE, missing values data put last; FALSE, put first; NA, removed (see ‘Note’.) method method used: partial matches allowed. default (\"auto\") implies \"radix\" short numeric vectors, integer vectors, logical vectors factors. Otherwise, implies \"shell\". details methods \"shell\", \"quick\", \"radix\", see help sort. data data.frame. cols columns data order .","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/length_sort.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sort by Character Length — length_sort","text":"","code":"# Sorting vectors x <- c(\"ccc\", \"aaaa\", \"eee\", \"b\", \"DDD\") length_sort(x) #> [1] \"b\" \"ccc\" \"eee\" \"DDD\" \"aaaa\" length_sort(x, decreasing = TRUE) #> [1] \"aaaa\" \"ccc\" \"eee\" \"DDD\" \"b\" x2 <- c(1:9, NA, 100, 10) length_sort(x2) #> [1] 1 2 3 4 5 6 7 8 9 10 100 NA length_sort(x2, decreasing = TRUE) #> [1] 100 10 1 2 3 4 5 6 7 8 9 NA length_sort(x2, na.last = NA) #> [1] 1 2 3 4 5 6 7 8 9 10 100 x3 <- c(bb = 333, ccc = 1, a = 22) length_sort(x3, by_name = TRUE) #> a bb ccc #> 22 333 1 # Ordering data.frames x <- tibble::tibble( x = 1:3, y = c(\"b\", \"aa\", \"c\"), z = c(\"bb\", \"a\", \"c\") ) length_order(x, \"y\") #> # A tibble: 3 × 3 #> x y z #> #> 1 1 b bb #> 2 3 c c #> 3 2 aa a length_order(x, \"z\") #> # A tibble: 3 × 3 #> x y z #> #> 1 2 aa a #> 2 3 c c #> 3 1 b bb length_order(x, c(\"y\", \"z\")) #> # A tibble: 3 × 3 #> x y z #> #> 1 3 c c #> 2 1 b bb #> 3 2 aa a length_order(x, c(\"y\", \"z\"), decreasing = TRUE) #> # A tibble: 3 × 3 #> x y z #> #> 1 2 aa a #> 2 1 b bb #> 3 3 c c"},{"path":"https://allenbaron.github.io/DO.utils/reference/lengthen_col.html","id":null,"dir":"Reference","previous_headings":"","what":"Lengthen Column(s) — lengthen_col","title":"Lengthen Column(s) — lengthen_col","text":"Lengthens values column(s) specified, de-concatenating values columns, resulting duplicated rows differ values cols. NOTE: lengthen_col() exact reverse collapse_col(); see examples.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/lengthen_col.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Lengthen Column(s) — lengthen_col","text":"","code":"lengthen_col(data, cols, delim = \"|\", trim = TRUE, convert = FALSE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/lengthen_col.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Lengthen Column(s) — lengthen_col","text":"data data.frame. cols name column(s) data.frame lengthen. delim delimiter split elements within specified columns (default: \"|\"). trim Whether trim start/end whitespace, boolean (default: TRUE). convert Whether run utils::type.convert() .= TRUE new columns. useful de-concatenated columns integer, numeric logical. NOTE: \"NA\" strings always converted NAs.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/lengthen_col.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Lengthen Column(s) — lengthen_col","text":"data.frame specified columns lengthened.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/lengthen_col.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Lengthen Column(s) — lengthen_col","text":"","code":"z_unique <- tibble::tibble( x = c(1, 2, 3, 4, 4), y = c(\"a\", \"a\", \"b\", \"c\", \"e\"), z = c(\"Z\", \"Y\", \"X\", \"W|V\", \"U\") ) lengthen_col(z_unique, z) #> # A tibble: 6 × 3 #> x y z #> #> 1 1 a Z #> 2 2 a Y #> 3 3 b X #> 4 4 c W #> 5 4 c V #> 6 4 e U # Data will likely differ after round trip through `collapse_col()` and # `lengthen_col()` because: # 1. Duplicate rows (cc_df, row 4) are lost # 2. New crosses are created (cc_df2, row 6-8) # 3. Output is sorted by `cols` due to use of `dplyr::group_by()` # internally. cc_df <- tibble::tibble( x = c(1, 2, 3, 3, 4, 4, 4), y = c(\"a\", \"a\", \"b\", \"b\", \"c\", \"c\", \"e\"), z = c(\"Z\", \"Y\", \"X\", \"X\", \"W\", \"V\", \"U\") ) cc_df2 <- lengthen_col( collapse_col(cc_df, c(y, z)), c(y, z) ) if (rlang::is_installed(\"waldo\")) { waldo::compare(cc_df, cc_df2) } else { cc_df cc_df2 } #> `attr(old, 'row.names')[5:7]`: 5 6 7 #> `attr(new, 'row.names')[5:9]`: 5 6 7 8 9 #> #> old vs new #> x y z #> old[1, ] 1 a Z #> old[2, ] 2 a Y #> old[3, ] 3 b X #> - old[4, ] 3 b X #> old[5, ] 4 c W #> old[6, ] 4 c V #> + new[6, ] 4 c U #> + new[7, ] 4 e W #> + new[8, ] 4 e V #> old[7, ] 4 e U #> #> `old$x[4:7]`: 3 4 4 4 #> `new$x`: 1 2 3 4 4 4 4 4 4 #> #> `old$y[4:7]`: \"b\" \"c\" \"c\" \"e\" #> `new$y`: \"a\" \"a\" \"b\" \"c\" \"c\" \"c\" \"e\" \"e\" \"e\" #> #> `old$z`: \"Z\" \"Y\" \"X\" \"X\" \"W\" \"V\" \"U\" #> `new$z`: \"Z\" \"Y\" \"X\" \"W\" \"V\" \"U\" \"W\" \"V\" \"U\""},{"path":"https://allenbaron.github.io/DO.utils/reference/lexiclean.html","id":null,"dir":"Reference","previous_headings":"","what":"Prepare Text for Matching — lexiclean","title":"Prepare Text for Matching — lexiclean","text":"Process text improve exact, quasi-exact /lexical text matching (e.g. \"lexical cleaning\").","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/lexiclean.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prepare Text for Matching — lexiclean","text":"","code":"lexiclean(x, mod = \"all\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/lexiclean.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prepare Text for Matching — lexiclean","text":"x character vector. mod Desired modifications, character string: \"\" : Use modifications. \"lc\" : Convert lowercase. \"roman\" : Convert numbers roman numerals. \"rm_space\" : Remove spaces, defined [:space:], see regex(). \"rm_punct\" : Remove punctuation, defined [:punct:], see regex().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/lexiclean.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prepare Text for Matching — lexiclean","text":"character vector specified modifications applied.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/lexiclean.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Prepare Text for Matching — lexiclean","text":"","code":"x <- c(\"disease\", \"X-linked exudative vitreoretinopathy 2\", \"hepatitis D\", \"dilated cardiomyopathy 1FF\", \"chromosome 15q25 deletion syndrome\", \"spinocerebellar ataxia type 19/22\", \"Addison's disease\", \"disease type II\", \"B-lymphoblastic leukemia/lymphoma, BCR-ABL1–like\") lexiclean(x) #> [1] \"disease\" #> [2] \"xlinkedexudativevitreoretinopathyii\" #> [3] \"hepatitisd\" #> [4] \"dilatedcardiomyopathyiff\" #> [5] \"chromosomexvqxxvdeletionsyndrome\" #> [6] \"spinocerebellarataxiatypexixxxii\" #> [7] \"addisonsdisease\" #> [8] \"diseasetypeii\" #> [9] \"blymphoblasticleukemialymphomabcrablilike\" lexiclean(x, \"roman\") #> [1] \"disease\" #> [2] \"X-linked exudative vitreoretinopathy II\" #> [3] \"hepatitis D\" #> [4] \"dilated cardiomyopathy IFF\" #> [5] \"chromosome XVqXXV deletion syndrome\" #> [6] \"spinocerebellar ataxia type XIX/XXII\" #> [7] \"Addison's disease\" #> [8] \"disease type II\" #> [9] \"B-lymphoblastic leukemia/lymphoma, BCR-ABLI–like\""},{"path":"https://allenbaron.github.io/DO.utils/reference/lgl_predicates.html","id":null,"dir":"Reference","previous_headings":"","what":"Logical predicate — lgl_predicates","title":"Logical predicate — lgl_predicates","text":"predicate designed identify boolean vectors (.e. length 1 logical vectors).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/lgl_predicates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logical predicate — lgl_predicates","text":"","code":"is_boolean(x)"},{"path":"https://allenbaron.github.io/DO.utils/reference/lgl_predicates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logical predicate — lgl_predicates","text":"x vector tested","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/make_contributor_html.html","id":null,"dir":"Reference","previous_headings":"","what":"Make ","title":"Make ","text":"Makes \"Contributor\"
  • elements disease-ontology.org. Can used ontology given appropriate input.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/make_contributor_html.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make ","text":"","code":"make_contributor_html(contrib_df)"},{"path":"https://allenbaron.github.io/DO.utils/reference/make_contributor_html.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make ","text":"contrib_df data.frame information contributors, including required columns: 'name', 'team_member', 'github', 'orcid'. 'github' 'orcid' columns can data missing least one present contributor.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/make_contributor_html.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make ","text":"","code":"if (FALSE) { # interactive() trans_contributors <- googlesheets4::read_sheet( ss = \"1kD7rgOWO2uVUwKYoKFSLBEpv1WZFf-GDhEusAq_H5sM\", sheet = \"TRANS\", col_types = \"c\" ) %>% dplyr::mutate(dplyr::across(dplyr::everything(), readr::parse_guess)) trans_contributors make_contributors_html(trans_contributors) }"},{"path":"https://allenbaron.github.io/DO.utils/reference/make_use_case_html.html","id":null,"dir":"Reference","previous_headings":"","what":"Make HTML for DO Use Case Tables — make_use_case_html","title":"Make HTML for DO Use Case Tables — make_use_case_html","text":"Makes row cell html code various sections/tables disease-ontology.org \"Use Cases\" page team's \"DO_uses\" google sheet. function explicitly avoids including html code defining table provide flexibility. \"html\" output files specified must manually copied pasted disease-ontology.org \"Use Cases\" file appropriate section/table.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/make_use_case_html.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make HTML for DO Use Case Tables — make_use_case_html","text":"","code":"make_use_case_html(out_dir = \"graphics/website\", group = \"all\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/make_use_case_html.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make HTML for DO Use Case Tables — make_use_case_html","text":"out_dir path directory output saved, string. group group(s) generate html , character vector. One : \"\" (default), \"ontology\", \"resource\", \"methodology\".","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/make_use_case_html.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make HTML for DO Use Case Tables — make_use_case_html","text":"One \"html\" file out_dir group named \"DO_use_case-{group}.html\" \"User\" data Google Sheet invisibly.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/make_user_list_html.html","id":null,"dir":"Reference","previous_headings":"","what":"Make HTML for DO User List (DEPRECATED) — make_user_list_html","title":"Make HTML for DO User List (DEPRECATED) — make_user_list_html","text":"Makes row cell html code \"Users Disease Ontology\" section collaborators page disease-ontology.org team's \"Uses\" google sheet. function explicitly avoids including html code defining table provide flexibility.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/make_user_list_html.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make HTML for DO User List (DEPRECATED) — make_user_list_html","text":"","code":"make_user_list_html(file)"},{"path":"https://allenbaron.github.io/DO.utils/reference/make_user_list_html.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make HTML for DO User List (DEPRECATED) — make_user_list_html","text":"file file path output saved, string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/make_user_list_html.html","id":"deprecation-notice","dir":"Reference","previous_headings":"","what":"Deprecation Notice","title":"Make HTML for DO User List (DEPRECATED) — make_user_list_html","text":"information formatting disease-ontology.org moved \"Collaborators\" page new \"Use Cases\" page mid-2022 split one section three, making function obsolete. Use make_use_case_html() instead.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_arg_several.html","id":null,"dir":"Reference","previous_headings":"","what":"Match Length-2+ Vector Arguments — match_arg_several","title":"Match Length-2+ Vector Arguments — match_arg_several","text":"Matches arguments several inputs allowed set choices. Similar base::match.arg() several.ok = TRUE EXCEPT match_arg_several() signal error unmatching values arg instead silently dropping .","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_arg_several.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Match Length-2+ Vector Arguments — match_arg_several","text":"","code":"match_arg_several(arg, choices)"},{"path":"https://allenbaron.github.io/DO.utils/reference/match_arg_several.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Match Length-2+ Vector Arguments — match_arg_several","text":"arg Function argument, character vector, NULL. choices Candidate values, character vector.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_carefully.html","id":null,"dir":"Reference","previous_headings":"","what":"Matches Carefully — match_carefully","title":"Matches Carefully — match_carefully","text":"Wrapper base::match() match NA values. Uses dplyr::if_else() skip NA values.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_carefully.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Matches Carefully — match_carefully","text":"","code":"match_carefully(x, table, nomatch = NA_integer_, incomparables = NULL)"},{"path":"https://allenbaron.github.io/DO.utils/reference/match_carefully.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Matches Carefully — match_carefully","text":"x vector NULL: values matched. Long vectors supported. table vector NULL: values matched . Long vectors supported. nomatch value returned case match found. Note coerced integer. incomparables vector values matched. value x matching value vector assigned nomatch value. historical reasons, FALSE equivalent NULL.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_citations.html","id":null,"dir":"Reference","previous_headings":"","what":"Citation Matching — match_citations","title":"Citation Matching — match_citations","text":"Essentially, base::match() tailored citations. Returns vector positions (first) matches citation input (first argument) reference citation input (second argument) based common publication IDs (PMID, PMCID, DOI).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_citations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Citation Matching — match_citations","text":"","code":"match_citations(x, ref, add_col = NULL, nomatch = NA_integer_)"},{"path":"https://allenbaron.github.io/DO.utils/reference/match_citations.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Citation Matching — match_citations","text":"x, ref vector PMID, PMCID, DOI, Scopus IDs; \"citation\" dataframe 1 columns (column names correspond ID type; case-insensitive) add_col name column add x match results, string, NULL (default) results returned vector. nomatch value returned case match found. Note coerced integer.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_citations.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Citation Matching — match_citations","text":"x vector add_col FALSE (default), integer vector length x (data.frame, length equal number rows). x data.frame add_col TRUE, mutated data.frame cite_match integer column identifying match positions ref.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_citations.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Citation Matching — match_citations","text":"citation inputs can vectors, data.frames, mix. matching, input requires least one vector containing one three standard, consistent publication identifiers (PMID, PMCID, DOI). Columns data.frames identified name (case-insensitive, e.g. 'PMID' 'pmid'). inputs data.frames, match_citations() match ID types present inputs, returning matches highest priority ID type (priority: PMID > PMCID > DOI > Scopus EID). also tells user ID columns identified order used message. matching citation ref can found, NA returned.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_fz.html","id":null,"dir":"Reference","previous_headings":"","what":"Fuzzy (Approximate) String Matching — match_fz","title":"Fuzzy (Approximate) String Matching — match_fz","text":"Wraps stringdist::amatch() perform \"fuzzy\" (approximate) string matching providing informative output. Instead integer vector best match positions, function returns tibble input, corresponding best match, approximate string distance.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_fz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fuzzy (Approximate) String Matching — match_fz","text":"","code":"match_fz(x, table, method = \"lcs\", maxDist = 115, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/match_fz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fuzzy (Approximate) String Matching — match_fz","text":"x elements approximately matched: coerced character unless list consisting integer vectors. table lookup table matching. coerced character unless list consting integer vectors. method Matching algorithm use. See stringdist-metrics. maxDist Elements x matched elements table distance larger maxDist. Note maximum distance strings depends method: always specified. ... arguments passed stringdist::amatch()","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_fz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fuzzy (Approximate) String Matching — match_fz","text":"tibble 3 columns: x table_match: closest match x dist: distance x closest match (given method selected","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_fz.html","id":"notes","dir":"Reference","previous_headings":"","what":"NOTES","title":"Fuzzy (Approximate) String Matching — match_fz","text":"Fuzzy string matching SLOW. Expect function take >1 min comparisons 500 values methods. comparison citation titles specifically, \"lcs\" method faster \"osa\" seems work better. Based light experimentation, good setting maxDist value citation titles 80-115.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/multimaps.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify One-to-Multiple Mappings — multimaps","title":"Identify One-to-Multiple Mappings — multimaps","text":"Identifies values x map multiple values y specified mapping predicates.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/multimaps.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify One-to-Multiple Mappings — multimaps","text":"","code":"multimaps( x, pred, y, include_pred = c(\"skos:exactMatch\", \"skos:closeMatch\", \"oboInOwl:hasDbXref\"), when_pred_NA = \"error\" )"},{"path":"https://allenbaron.github.io/DO.utils/reference/multimaps.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify One-to-Multiple Mappings — multimaps","text":"x Vector subject mappings (.e. tested; \"one\" \"one--multiple\" test). pred Vector predicate(s) mappings. Predicate(s) formatted CURIEs can include multiple delimited predicates. y Vector object mappings (.e. counted; \"multiple\" \"one--multiple\" test). include_pred predicates include testing one--multiple mappings, character vector (default: skos:exactMatch, skos:closeMatch, oboInOwl:hasDbXref). predicates ignored. when_pred_NA missing predicates detected, string; one \"error\" (default), \"warn\", NULL (nothing). NA predicates always ignored mapping exists (.e. one corresponding values x y /also NA).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/multimaps.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify One-to-Multiple Mappings — multimaps","text":"logical vector specifying positions x map multiple values y. Incomplete mappings, values x, y, NA, ignored return FALSE.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/ns_prefix.html","id":null,"dir":"Reference","previous_headings":"","what":"Namespace Prefixes — ns_prefix","title":"Namespace Prefixes — ns_prefix","text":"Prefixes namespaces, primarily sourced ROBOT, cover uses OBO Foundry ontologies, slight modification match prefixes used Human Disease Ontology additional prefixes cross-references -related SPARQL query support.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/ns_prefix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Namespace Prefixes — ns_prefix","text":"","code":"ns_prefix obo_prefix obo_prop_prefix not_obo_prefix"},{"path":"https://allenbaron.github.io/DO.utils/reference/ns_prefix.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Namespace Prefixes — ns_prefix","text":"Character vectors namespaces named corresponding prefix: ns_prefix: Superset 533 objects listed . obo_prefix: 255 standard OBO Foundry namespaces (e.g. AAO = \"http://purl.obolibrary.org/obo/AAO_\"). obo_prop_prefix: 255 OBO Foundry property namespaces; may actual use (e.g. aao = \"http://purl.obolibrary.org/obo/aao#\") not_obo_prefix: 21 namespaces outside commonly used OBO Foundry (e.g. dc = \"http://purl.org/dc/elements/1.1/\"), federated SPARQL queries (e.g.  = \"http://purl.uniprot.org/core/\").","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/ns_prefix.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Namespace Prefixes — ns_prefix","text":"ROBOT (v1.9.4) via data-raw/ns_prefix.R; last updated 2023-06-12.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/num_val_predicates.html","id":null,"dir":"Reference","previous_headings":"","what":"Number value predicates — num_val_predicates","title":"Number value predicates — num_val_predicates","text":"value predicates designed identify common values appear numeric vectors.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/num_val_predicates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number value predicates — num_val_predicates","text":"","code":"is_positive(x) is_negative(x) is_whole_number(x, tol = .Machine$double.eps) is_scalar_whole_number(x, tol = .Machine$double.eps)"},{"path":"https://allenbaron.github.io/DO.utils/reference/num_val_predicates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number value predicates — num_val_predicates","text":"x vector tested tol value specifiying precision desired (see .Machine double info)","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/num_val_predicates.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Number value predicates — num_val_predicates","text":"is_whole_number() generally used whole number desired (whether integer double) instead base::.integer rlang::is_integer family test data type value.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/obo_ID_predicates.html","id":null,"dir":"Reference","previous_headings":"","what":"OBO ID predicates — obo_ID_predicates","title":"OBO ID predicates — obo_ID_predicates","text":"predicates designed identify validate common ID formats defined within OBO Foundry ontologies.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/obo_ID_predicates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OBO ID predicates — obo_ID_predicates","text":"","code":"is_valid_obo(x) is_valid_doid(x)"},{"path":"https://allenbaron.github.io/DO.utils/reference/obo_ID_predicates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"OBO ID predicates — obo_ID_predicates","text":"x set IDs, character vector.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/obo_ID_predicates.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"OBO ID predicates — obo_ID_predicates","text":"is_valid_obo() determine identifiers match OBO Foundry IRI pattern obo:LUI CURIE. is_valid_doid() determine identifiers match 's IRI CURIE pattern.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/obo_ID_predicates.html","id":"notes","dir":"Reference","previous_headings":"","what":"Notes","title":"OBO ID predicates — obo_ID_predicates","text":"predicates attempt confirm ID actually exists OBO Foundry ontology, test IDs syntactically formatted correctly (see OBO Foundry ID Policy OBO File Specification). OBO formats valid DOID formats vice versa.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/obo_ID_predicates.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"OBO ID predicates — obo_ID_predicates","text":"","code":"# OBO formats obo_id <- c( #### valid #### \"http://purl.obolibrary.org/obo/DOID_0001816\", # URI \"\", # bracketed_URI \"obo:DOID_4\", # CURIE, standard version \"obo:so#has_origin\", # '#' separator ~ OBO annotation properties #### invalid #### \"0001816\", # bare number without prefix \"obo:DOID:14566\", # namespace-lui separator must be '_' or '#' \" obo:HP_0000001\" # must have NO `[:space:]` characters ) is_valid_obo(obo_id) #> [1] TRUE TRUE TRUE TRUE FALSE FALSE FALSE # DOID formats doid <- c( #### valid #### \"http://purl.obolibrary.org/obo/DOID_0001816\", # URI \"DOID:4\", # CURIE, standard version \"obo:DOID_4\", # OBO CURIE, less common \"DOID_0040001\", # basename (OBO prefix removed) #### invalid #### \"0001816\", # bare number without prefix \"doid#DO_IEDB_slim\", # namespace-lui separator must be '_' \"obo:doid#DO_IEDB_slim\", \"obo:DOID_21 \" # must have NO `[:space:]` characters ) is_valid_doid(doid) #> [1] TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE"},{"path":"https://allenbaron.github.io/DO.utils/reference/obofoundry_metadata.html","id":null,"dir":"Reference","previous_headings":"","what":"OBO Foundry Metadata — obofoundry_metadata","title":"OBO Foundry Metadata — obofoundry_metadata","text":"Metadata OBO Foundry ontologies.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/obofoundry_metadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OBO Foundry Metadata — obofoundry_metadata","text":"","code":"obofoundry_metadata"},{"path":"https://allenbaron.github.io/DO.utils/reference/obofoundry_metadata.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"OBO Foundry Metadata — obofoundry_metadata","text":"data frame 22 variables: id title domain description activity_status is_obsolete replaced_by ontology_purl preferred_prefix homepage contact_name contact_email contact_github license_label taxon_id taxon_label twitter facebook publications in_foundry_order in_foundry build_infallible","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/obofoundry_metadata.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"OBO Foundry Metadata — obofoundry_metadata","text":"http://www.obofoundry.org/registry/ontologies.jsonld, last accessed 2021-11-05.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/onto_missing.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify Data Missing from an Ontology (DEPRECATED) — onto_missing","title":"Identify Data Missing from an Ontology (DEPRECATED) — onto_missing","text":"Identifies data missing ontology. Currently works mappings, includes xrefs skos matches. Requires ROBOT comparison.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/onto_missing.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify Data Missing from an Ontology (DEPRECATED) — onto_missing","text":"","code":"onto_missing(onto_path, input, what = \"OMIM\", report_present = TRUE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/onto_missing.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify Data Missing from an Ontology (DEPRECATED) — onto_missing","text":"onto_path path ontology -edit file, string. input path TSV/CSV file data compare data ontology, string. compare two files, string. report_present Whether report data present ontology (default) along data missing, boolean.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/onto_missing.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify Data Missing from an Ontology (DEPRECATED) — onto_missing","text":"report_present = TRUE (default), list two data.frames indicating data ontology (in_onto) data missing (missing); otherwise, single data.frame showing missing data .","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/onto_missing.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Identify Data Missing from an Ontology (DEPRECATED) — onto_missing","text":"","code":"if (FALSE) { onto_missing( onto_path = \"~/Ontologies/HumanDiseaseOntology/src/ontology/doid-edit.owl\", input = \"omimps.csv\", # e.g. manually copied from https://www.omim.org/phenotypicSeries/PS609060 \"OMIM\" ) }"},{"path":"https://allenbaron.github.io/DO.utils/reference/owl_xml.html","id":null,"dir":"Reference","previous_headings":"","what":"Instantiate an owl_xml object — owl_xml","title":"Instantiate an owl_xml object — owl_xml","text":"Instantiate python owl.xml object pyDOID package (powered reticulate). file loaded memory instantiated. Though named \"owl\" method also work RDF files.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/owl_xml.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Instantiate an owl_xml object — owl_xml","text":"","code":"owl_xml(path)"},{"path":"https://allenbaron.github.io/DO.utils/reference/owl_xml.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Instantiate an owl_xml object — owl_xml","text":"path path OWL (RDF) XML-formatted file, string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/owl_xml.html","id":"classes-amp-methods","dir":"Reference","previous_headings":"","what":"Classes & Methods","title":"Instantiate an owl_xml object — owl_xml","text":"owl.xml class thinly wraps small set python rdflib methods enable SPARQL 1.1 queries, following methods: owl_xml$query(query, reload): Execute SPARQL 1.1 query. query may string path .sparql/.rq file. Use reload = TRUE force reload file memory; useful iterating releases/tags DOrepo$tag_iterate(). owl_xml$load(): Manually load file memory. Generally, necessary.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/parse_mapping.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse Mapping — parse_mapping","title":"Parse Mapping — parse_mapping","text":"Parses mappings generated pyobo_map() otherwise produced python module GILDA.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/parse_mapping.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse Mapping — parse_mapping","text":"","code":"parse_mapping(py_gilda_res_list, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/parse_mapping.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse Mapping — parse_mapping","text":"py_gilda_res_list named list term mapping lists (see parse_term_mapping()), likely generated pyobo_map(). ... Arguments passed extract_ScoredMatch, parse_term_mapping prefix Optional prefix add namespace local unique identifiers (LUI; e.g. 4, LUI \"disease\" ), string; preferably create complete namespace ID (e.g. \"DOID:4\"). prefix_sep Optional separator placed prefix namespace LUIs, string. Ignored prefix = NULL. best_only Whether return best scoring result(s) , boolean. FALSE return results. NOTE: TRUE return one result case ties. warn_best_gt1 Whether warn best mapping ties exist term.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/parse_mapping.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parse Mapping — parse_mapping","text":"List data frames mapping result(s) term.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/parse_term_mapping.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse Mapping for Single Term (INTERNAL) — parse_term_mapping","title":"Parse Mapping for Single Term (INTERNAL) — parse_term_mapping","text":"Parses mappings generated pyobo_map() otherwise produced python module GILDA LEVEL single input term.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/parse_term_mapping.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse Mapping for Single Term (INTERNAL) — parse_term_mapping","text":"","code":"parse_term_mapping( py_gilda_term_mappings, best_only = TRUE, warn_best_gt1 = FALSE, ... )"},{"path":"https://allenbaron.github.io/DO.utils/reference/parse_term_mapping.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse Mapping for Single Term (INTERNAL) — parse_term_mapping","text":"py_gilda_term_mappings list mappings single input term one namespace terms (stored specialized ScoredMatch python objects, defined GILDA; see extract_ScoredMatch). best_only Whether return best scoring result(s) , boolean. FALSE return results. NOTE: TRUE return one result case ties. warn_best_gt1 Whether warn best mapping ties exist term. ... Arguments passed extract_ScoredMatch prefix Optional prefix add namespace local unique identifiers (LUI; e.g. 4, LUI \"disease\" ), string; preferably create complete namespace ID (e.g. \"DOID:4\"). prefix_sep Optional separator placed prefix namespace LUIs, string. Ignored prefix = NULL.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/parse_term_mapping.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parse Mapping for Single Term (INTERNAL) — parse_term_mapping","text":"List data frames mapping result(s) term.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Pipe operator — %>%","title":"Pipe operator — %>%","text":"See magrittr::%>% details.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pipe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pipe operator — %>%","text":"","code":"lhs %>% rhs"},{"path":"https://allenbaron.github.io/DO.utils/reference/pipe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pipe operator — %>%","text":"lhs value magrittr placeholder. rhs function call using magrittr semantics.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pipe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pipe operator — %>%","text":"result calling rhs(lhs).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_branch_counts.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Branch Counts — plot_branch_counts","title":"Plot Branch Counts — plot_branch_counts","text":"Plots count non-obsolete terms major branch Human Disease Ontology.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_branch_counts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Branch Counts — plot_branch_counts","text":"","code":"plot_branch_counts( DO_repo, out_dir = \"graphics/website\", w = 8, h = 5.6, aspect_ratio = 1 )"},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_branch_counts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Branch Counts — plot_branch_counts","text":"DO_repo local path HumanDiseaseOntology repo, string, DOrepo object. out_dir directory plot \"DO_branch_count.png\" saved, string. NULL, plot saved disk. w width plot inches, numeric. h height plot inches, numeric. aspect_ratio aspect ratio panel (.e. plot area), numeric. NULL, aspect ratio set.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_citedby.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Publications Citing DO by Year — plot_citedby","title":"Plot Publications Citing DO by Year — plot_citedby","text":"Plots count publications cite Human Disease Ontology year.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_citedby.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Publications Citing DO by Year — plot_citedby","text":"","code":"plot_citedby( data_file = \"data/citedby/DO_citedby.csv\", out_dir = \"graphics/website\", color_set = c(\"#C45055\", \"#934FBB\", \"#95B1BB\", \"#83C85F\", \"#B9964B\", \"#4C3E45\"), w = 6, h = 3.15 )"},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_citedby.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Publications Citing DO by Year — plot_citedby","text":"data_file path file containing list publications citing , string. out_dir directory plot \"DO_cited_by_count.png\" saved, string. NULL plot saved disk. color_set set 6 colors prefix color set use DO_colors. Available sets include: \"sat\", \"accent1\", \"accent2\", \"orange\". default light versions specified color set used. w width plot inches, numeric. h height plot inches, numeric.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_citedby.html","id":"data-preparation","dir":"Reference","previous_headings":"","what":"Data Preparation","title":"Plot Publications Citing DO by Year — plot_citedby","text":"prepare data, execute scripts/citedby_full_procedure.R.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_def_src.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Definition Sources — plot_def_src","title":"Plot Definition Sources — plot_def_src","text":"Plots count definition sources non-obsolete terms Human Disease Ontology.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_def_src.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Definition Sources — plot_def_src","text":"","code":"plot_def_src(DO_repo, out_dir = \"graphics/website\", w = 8, h = 5.6)"},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_def_src.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Definition Sources — plot_def_src","text":"DO_repo local path HumanDiseaseOntology repo, string. out_dir directory plot \"DO_def_src.png\" saved, string. NULL plot saved disk. w width plot inches, numeric. h height plot inches, numeric.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_def_src.html","id":"data-preparation","dir":"Reference","previous_headings":"","what":"Data Preparation","title":"Plot Definition Sources — plot_def_src","text":"plot added disease-ontology.org, latest release HumanDiseaseOntology Github repo checked prior running function.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_term_def_counts.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot DO Term & Definition Counts — plot_term_def_counts","title":"Plot DO Term & Definition Counts — plot_term_def_counts","text":"Plots count non-obsolete terms definitions Human Disease Ontology time (using data release).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_term_def_counts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot DO Term & Definition Counts — plot_term_def_counts","text":"","code":"plot_term_def_counts( release_file = \"data/DO_release/DO_release_details.csv\", counts_file = \"data/DO_release/DO_term_def_counts.csv\", out_dir = \"graphics/website\", w = 8, h = 5.6 )"},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_term_def_counts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot DO Term & Definition Counts — plot_term_def_counts","text":"release_file path file containing release details, string. counts_file path file containing count terms definitions release, string. out_dir directory plot \"DO_term_def_count.png\" saved, string. NULL plot saved disk. w width plot inches, numeric. h height plot inches, numeric.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_term_def_counts.html","id":"data-preparation","dir":"Reference","previous_headings":"","what":"Data Preparation","title":"Plot DO Term & Definition Counts — plot_term_def_counts","text":"prepare data, execute: scripts/DO_term_def_counts.R - requires installation python virtual environment using scripts/install_reticulate_python.R. scripts/DO_release_details.R","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_xref_counts.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Xref Counts — plot_xref_counts","title":"Plot Xref Counts — plot_xref_counts","text":"Plots count cross-references source Human Disease Ontology.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_xref_counts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Xref Counts — plot_xref_counts","text":"","code":"plot_xref_counts(DO_repo, out_dir = \"graphics/website\", w = 8, h = 5.6)"},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_xref_counts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Xref Counts — plot_xref_counts","text":"DO_repo local path HumanDiseaseOntology repo, string, DOrepo object. out_dir directory plot \"DO_xref_count.png\" saved, string. NULL plot saved disk. w width plot inches, numeric. h height plot inches, numeric.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pmc_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Get PubMed Central Summary — pmc_summary","title":"Get PubMed Central Summary — pmc_summary","text":"Retrieves PubMed Central Summary information specified publications. Acts exactly manner pubmed_summary(). Consult documentation details.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pmc_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get PubMed Central Summary — pmc_summary","text":"","code":"pmc_summary(input, config = NULL, version = \"2.0\", retmode = \"xml\", ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/pmc_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get PubMed Central Summary — pmc_summary","text":"input One following: 1. vector unique PubMed Central IDs. 2. list vectors unique PubMed Central IDs. 3. web_history object (see NCBI Entrez API documentation information). config vector configuration options passed httr::GET version Argument included flexibility, best left defaults set; see rentrez::entrez_summary() details. retmode \"xml\" (default) \"json\"; \"xml\" preferred higher response limit. default opposite rentrez::entrez_summary() default. ... character Additional terms add request, see NCBI documentation linked references complete list","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/print.oieb.html","id":null,"dir":"Reference","previous_headings":"","what":"Print OMIM inventory report statistics — print.oieb","title":"Print OMIM inventory report statistics — print.oieb","text":"Prints OMIM inventory report statistics.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/print.oieb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print OMIM inventory report statistics — print.oieb","text":"","code":"# S3 method for oieb print(x, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/print.oieb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print OMIM inventory report statistics — print.oieb","text":"x object class oieb. ... Arguments passed base::print.default digits non-null value digits specifies minimum number significant digits printed values. default, NULL, uses getOption(\"digits\"). ( interpretation complex numbers see signif.) Non-integer values rounded , values greater equal 1 greater 22 accepted. na.print character string used indicate NA values printed output, NULL (see ‘Details’). print.gap non-negative integer \\(\\le 1024\\), NULL (meaning 1), giving spacing adjacent columns printed vectors, matrices arrays. right logical, indicating whether strings right aligned. default left alignment. max non-null value max specifies approximate maximum number entries printed. default, NULL, uses getOption(\"max.print\"): see help page details. width controls maximum number columns line used printing vectors, matrices, etc. default, NULL, uses getOption(\"width\"): see help page details including allowed values. useSource logical, indicating whether use source references copies rather deparsing language objects. default use original source available.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/priority_sort.html","id":null,"dir":"Reference","previous_headings":"","what":"Sort Vectors by Priority — priority_sort","title":"Sort Vectors by Priority — priority_sort","text":"Sort vectors, prioritizing according levels specified. Uses base::factor() internally unspecified arguments disabled.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/priority_sort.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sort Vectors by Priority — priority_sort","text":"","code":"priority_sort(x, levels, exclude = NA)"},{"path":"https://allenbaron.github.io/DO.utils/reference/priority_sort.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sort Vectors by Priority — priority_sort","text":"x vector data, usually taking small number distinct values. levels optional vector unique values (character strings) x might taken. default unique set values taken .character(x), sorted increasing order x. Note set can specified smaller sort(unique(x)). exclude vector values excluded forming set levels. may factor level set x character.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/progress_bar-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Progress Bar (RefClass) — progress_bar-class","title":"Progress Bar (RefClass) — progress_bar-class","text":"Instantiate base R-style progress bar advances one 'tick' time.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/progress_bar-class.html","id":"fields","dir":"Reference","previous_headings":"","what":"Fields","title":"Progress Bar (RefClass) — progress_bar-class","text":"bar progress_bar object created utils::txtProgressBar(). tick integer track progress.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/progress_bar-class.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Progress Bar (RefClass) — progress_bar-class","text":"advance(...) Advances progress bar one tick. initialize(n, ...) Initializes progress bar called progress_bar$new(n, ...). n: Total number ticks. ...: Arguments passed utils::txtProgressBar().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pub_id_match.html","id":null,"dir":"Reference","previous_headings":"","what":"Prioritized List of Publication IDs & Regex's for Matching — pub_id_match","title":"Prioritized List of Publication IDs & Regex's for Matching — pub_id_match","text":"Prioritized List Publication IDs & Regex's Matching","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pub_id_match.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prioritized List of Publication IDs & Regex's for Matching — pub_id_match","text":"","code":"pub_id_match"},{"path":"https://allenbaron.github.io/DO.utils/reference/pub_id_match.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Prioritized List of Publication IDs & Regex's for Matching — pub_id_match","text":"length-4 character vector named regex's prioritized follows:","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pubmed_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Get PubMed Summary — pubmed_summary","title":"Get PubMed Summary — pubmed_summary","text":"Retrieves PubMed Summary information specified publications. Acts wrapper around rentrez::entrez_summary allow larger number IDs input (using rentrez::entrez_post) input ID list (addition id vector web_history object).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pubmed_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get PubMed Summary — pubmed_summary","text":"","code":"pubmed_summary(input, config = NULL, version = \"2.0\", retmode = \"xml\", ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/pubmed_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get PubMed Summary — pubmed_summary","text":"input One following: 1) vector unique PubMed IDs, 2) list vectors PubMed IDs (example, output citedby_pmid(.... by_id = TRUE) > extract_pmid()), 3) web_history object (see NCBI Entrez API documentation information). config vector configuration options passed httr::GET version Argument included flexibility, best left defaults set; see rentrez::entrez_summary() details. retmode \"xml\" (default) \"json\"; \"xml\" preferred higher response limit. default opposite rentrez::entrez_summary() default. ... character Additional terms add request, see NCBI documentation linked references complete list","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pubs.html","id":null,"dir":"Reference","previous_headings":"","what":"Publication Info — pubs","title":"Publication Info — pubs","text":"Datasets describing official publications Human Disease Ontology project, grouped ontology. Data includes publication identifiers various sources, along publication titles NLM-formatted citations. DO_pubs: Human Disease Ontology publications ST_pubs: Symptom Ontology & Pathogen Transmission Ontology publications","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pubs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Publication Info — pubs","text":"","code":"DO_pubs ST_pubs"},{"path":"https://allenbaron.github.io/DO.utils/reference/pubs.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Publication Info — pubs","text":"data frame consists 10 variables: internal_id short-version identifier used team pmid PubMed ID pmcid PubMed Central ID doi DOI scopus_eid Scopus Electronic Identification, Scopus ID lens_id Lens.org ID semantic_scholar_id Semantic Scholar Corpus ID first_author Publication First Author title Publication Title citation_nlm Full NLM-formatted citation DO_pubs includes 10 publications. ST_pubs includes 1 publications.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pubs.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Publication Info — pubs","text":"Compiled J. Allen Baron; last updated 2022-07-22.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pyDOID.html","id":null,"dir":"Reference","previous_headings":"","what":"pyDOID — pyDOID","title":"pyDOID — pyDOID","text":"pyDOID python package developed intent .utils, provide methods updating, maintaining, organizing, analyzing Human Disease Ontology. .utils, powered reticulate, wraps pyDOID functionality currently unavailable R. pyDOID provides two primary classes: DOrepo class owl.xml class. Classes methods accessible via $ notation.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pyDOID.html","id":"version","dir":"Reference","previous_headings":"","what":"Version","title":"pyDOID — pyDOID","text":"Documentation assumes pyDOID >= v0.1.2","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pyDOID.html","id":"dorepo-class","dir":"Reference","previous_headings":"","what":"DOrepo class","title":"pyDOID — pyDOID","text":"DOrepo class inherits methods & subclasses GitPython.repo.Repo class adds additional classes & methods, see DOrepo() details.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pyDOID.html","id":"owl-xml-class","dir":"Reference","previous_headings":"","what":"owl.xml class","title":"pyDOID — pyDOID","text":"owl.xml class thinly wraps small set python rdflib methods enable SPARQL 1.1 queries, see owl_xml() details.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pyobo_map.html","id":null,"dir":"Reference","previous_headings":"","what":"Map Terms to Terms of Specified Namespace — pyobo_map","title":"Map Terms to Terms of Specified Namespace — pyobo_map","text":"Map term terms specified namespace (e.g. \"DOID\") using PyOBO (dependency biopragmatics INDRA labs programs; e.g. GILDA, bioregistry). INDRA labs terminology, GILDA grounds (predicts matches ) term namespace terms.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pyobo_map.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map Terms to Terms of Specified Namespace — pyobo_map","text":"","code":"pyobo_map(terms, namespace)"},{"path":"https://allenbaron.github.io/DO.utils/reference/pyobo_map.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map Terms to Terms of Specified Namespace — pyobo_map","text":"terms Term(s) map, character vector. namespace Namespace map terms (according bioregistry), string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pyobo_map.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Map Terms to Terms of Specified Namespace — pyobo_map","text":"List results term. See parse_mapping() dependencies details format results.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/queue_xref_split.html","id":null,"dir":"Reference","previous_headings":"","what":"Curation Queue: DOIDs to split? — queue_xref_split","title":"Curation Queue: DOIDs to split? — queue_xref_split","text":"Create curation queue DOIDs may need split multiple diseases based fact multiple xrefs source.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/queue_xref_split.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Curation Queue: DOIDs to split? — queue_xref_split","text":"","code":"queue_xref_split(.DOrepo, src = \"all\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/queue_xref_split.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Curation Queue: DOIDs to split? — queue_xref_split","text":".DOrepo path local HumanDiseaseOntology repository pyDOID.repo.DOrepo object created DOrepo(). src xref sources include output identified prefix character vector \"\" (default) include everything.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_alliance.html","id":null,"dir":"Reference","previous_headings":"","what":"Read Alliance .tsv.gz File — read_alliance","title":"Read Alliance .tsv.gz File — read_alliance","text":"Reads .tsv .tsv.gz file Alliance Genome Resources tibble. recommended Alliance files downloaded using download_alliance_tsv().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_alliance.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read Alliance .tsv.gz File — read_alliance","text":"","code":"read_alliance(alliance_tsv)"},{"path":"https://allenbaron.github.io/DO.utils/reference/read_alliance.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read Alliance .tsv.gz File — read_alliance","text":"alliance_tsv path Alliance .tsv .tsv.gz file","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_alliance.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read Alliance .tsv.gz File — read_alliance","text":"dataframe.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_delim_auto.html","id":null,"dir":"Reference","previous_headings":"","what":"Automatically Identify & Read TSV/CSV files (INTERNAL) — read_delim_auto","title":"Automatically Identify & Read TSV/CSV files (INTERNAL) — read_delim_auto","text":"light wrapper around readr::read_delim() automatically identifies delimiter based file extension (can include compression extensions).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_delim_auto.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Automatically Identify & Read TSV/CSV files (INTERNAL) — read_delim_auto","text":"","code":"read_delim_auto(file, ..., show_col_types = FALSE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/read_delim_auto.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Automatically Identify & Read TSV/CSV files (INTERNAL) — read_delim_auto","text":"file Either path file, connection, literal data (either single string raw vector). Files ending .gz, .bz2, .xz, .zip automatically uncompressed. Files starting http://, https://, ftp://, ftps:// automatically downloaded. Remote gz files can also automatically downloaded decompressed. ... Arguments passed readr::read_delim quote Single character used quote strings. escape_backslash file use backslashes escape special characters? general escape_double backslashes can used escape delimiter character, quote character, add special characters like \\\\n. escape_double file escape quotes doubling ? .e. option TRUE, value \"\"\"\" represents single quote, \\\". col_names Either TRUE, FALSE character vector column names. TRUE, first row input used column names, included data frame. FALSE, column names generated automatically: X1, X2, X3 etc. col_names character vector, values used names columns, first row input read first row output data frame. Missing (NA) column names generate warning, filled dummy names ...1, ...2 etc. Duplicate column names generate warning made unique, see name_repair control done. col_types One NULL, cols() specification, string. See vignette(\"readr\") details. NULL, column types inferred guess_max rows input, interspersed throughout file. convenient (fast), robust. guessed types wrong, need increase guess_max supply correct types . Column specifications created list() cols() must contain one column specification column. want read subset columns, use cols_only(). Alternatively, can use compact string representation character represents one column: c = character = integer n = number d = double l = logical f = factor D = date T = date time t = time ? = guess _ - = skip default, reading file without column specification print message showing readr guessed . remove message, set show_col_types = FALSE set `options(readr.show_col_types = FALSE). col_select Columns include results. can use mini-language dplyr::select() refer columns name. Use c() use one selection expression. Although usage less common, col_select also accepts numeric column index. See ?tidyselect::language full details selection language. id name column store file path. useful reading multiple input files data file paths, data collection date. NULL (default) extra column created. locale locale controls defaults vary place place. default locale US-centric (like R), can use locale() create locale controls things like default time zone, encoding, decimal mark, big mark, day/month names. na Character vector strings interpret missing values. Set option character() indicate missing values. comment string used identify comments. text comment characters silently ignored. trim_ws leading trailing whitespace (ASCII spaces tabs) trimmed field parsing ? skip Number lines skip reading data. comment supplied commented lines ignored skipping. n_max Maximum number lines read. guess_max Maximum number lines use guessing column types. never use number lines read. See vignette(\"column-types\", package = \"readr\") details. name_repair Handling column names. default behaviour ensure column names \"unique\". Various repair strategies supported: \"minimal\": name repair checks, beyond basic existence names. \"unique\" (default value): Make sure names unique empty. \"check_unique\": name repair, check unique. \"universal\": Make names unique syntactic. function: apply custom name repair (e.g., name_repair = make.names names style base R). purrr-style anonymous function, see rlang::as_function(). argument passed repair vctrs::vec_as_names(). See details terms strategies used enforce . num_threads number processing threads use initial parsing lazy reading data. data contains newlines within fields parser automatically detect fall back using one thread . However know file newlines within quoted fields safest set num_threads = 1 explicitly. progress Display progress bar? default display interactive session knitting document. automatic progress bar can disabled setting option readr.show_progress FALSE. skip_empty_rows blank rows ignored altogether? .e. option TRUE blank rows represented . FALSE represented NA values columns. lazy Read values lazily? default, FALSE, special considerations reading file lazily tripped users. Specifically, things get tricky reading writing back file. , general, lazy reading (lazy = TRUE) many benefits, especially interactive use downstream work involves subset rows columns. Learn should_read_lazy() documentation altrep argument vroom::vroom(). show_col_types FALSE, show guessed column types. TRUE always show column types, even supplied. NULL (default) show column types explicitly supplied col_types argument.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_delim_auto.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Automatically Identify & Read TSV/CSV files (INTERNAL) — read_delim_auto","text":"Note function primarily intended internal use; therefore, messages guessed column types generated.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_doid_edit.html","id":null,"dir":"Reference","previous_headings":"","what":"Read doid-edit.owl (INTERNAL) — read_doid_edit","title":"Read doid-edit.owl (INTERNAL) — read_doid_edit","text":"Read doid-edit.owl file local copy Human Disease Ontology Github repo.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_doid_edit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read doid-edit.owl (INTERNAL) — read_doid_edit","text":"","code":"read_doid_edit(DO_repo)"},{"path":"https://allenbaron.github.io/DO.utils/reference/read_doid_edit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read doid-edit.owl (INTERNAL) — read_doid_edit","text":"DO_repo local path HumanDiseaseOntology repo, string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_ga.html","id":null,"dir":"Reference","previous_headings":"","what":"Read Google Analytics Exports — read_ga","title":"Read Google Analytics Exports — read_ga","text":"Read exported Google Analytics data saved .csv.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_ga.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read Google Analytics Exports — read_ga","text":"","code":"read_ga(ga_file, read_all = FALSE, tidy = TRUE, keep_total = FALSE, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/read_ga.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read Google Analytics Exports — read_ga","text":"ga_file path Google Analytics .csv file. read_all Whether tables exported file read, logical scalar. FALSE (default), first (main) table read. tidy Whether tables tidied tidy_ga_tbl(), logical scalar (default: TRUE). keep_total Whether keep row totals appears bottom table, logical scalar (default: FALSE). ... Arguments passed readr::read_csv file Either path file, connection, literal data (either single string raw vector). Files ending .gz, .bz2, .xz, .zip automatically uncompressed. Files starting http://, https://, ftp://, ftps:// automatically downloaded. Remote gz files can also automatically downloaded decompressed. Literal data useful examples tests. recognised literal data, input must either wrapped (), string containing least one new line, vector containing least one string new line. Using value clipboard() read system clipboard. quote Single character used quote strings. col_names Either TRUE, FALSE character vector column names. TRUE, first row input used column names, included data frame. FALSE, column names generated automatically: X1, X2, X3 etc. col_names character vector, values used names columns, first row input read first row output data frame. Missing (NA) column names generate warning, filled dummy names ...1, ...2 etc. Duplicate column names generate warning made unique, see name_repair control done. col_types One NULL, cols() specification, string. See vignette(\"readr\") details. NULL, column types inferred guess_max rows input, interspersed throughout file. convenient (fast), robust. guessed types wrong, need increase guess_max supply correct types . Column specifications created list() cols() must contain one column specification column. want read subset columns, use cols_only(). Alternatively, can use compact string representation character represents one column: c = character = integer n = number d = double l = logical f = factor D = date T = date time t = time ? = guess _ - = skip default, reading file without column specification print message showing readr guessed . remove message, set show_col_types = FALSE set `options(readr.show_col_types = FALSE). col_select Columns include results. can use mini-language dplyr::select() refer columns name. Use c() use one selection expression. Although usage less common, col_select also accepts numeric column index. See ?tidyselect::language full details selection language. id name column store file path. useful reading multiple input files data file paths, data collection date. NULL (default) extra column created. locale locale controls defaults vary place place. default locale US-centric (like R), can use locale() create locale controls things like default time zone, encoding, decimal mark, big mark, day/month names. na Character vector strings interpret missing values. Set option character() indicate missing values. quoted_na missing values inside quotes treated missing values (default) strings. parameter soft deprecated readr 2.0.0. comment string used identify comments. text comment characters silently ignored. trim_ws leading trailing whitespace (ASCII spaces tabs) trimmed field parsing ? skip Number lines skip reading data. comment supplied commented lines ignored skipping. n_max Maximum number lines read. guess_max Maximum number lines use guessing column types. never use number lines read. See vignette(\"column-types\", package = \"readr\") details. name_repair Handling column names. default behaviour ensure column names \"unique\". Various repair strategies supported: \"minimal\": name repair checks, beyond basic existence names. \"unique\" (default value): Make sure names unique empty. \"check_unique\": name repair, check unique. \"universal\": Make names unique syntactic. function: apply custom name repair (e.g., name_repair = make.names names style base R). purrr-style anonymous function, see rlang::as_function(). argument passed repair vctrs::vec_as_names(). See details terms strategies used enforce . num_threads number processing threads use initial parsing lazy reading data. data contains newlines within fields parser automatically detect fall back using one thread . However know file newlines within quoted fields safest set num_threads = 1 explicitly. progress Display progress bar? default display interactive session knitting document. automatic progress bar can disabled setting option readr.show_progress FALSE. skip_empty_rows blank rows ignored altogether? .e. option TRUE blank rows represented . FALSE represented NA values columns. lazy Read values lazily? default, FALSE, special considerations reading file lazily tripped users. Specifically, things get tricky reading writing back file. , general, lazy reading (lazy = TRUE) many benefits, especially interactive use downstream work involves subset rows columns. Learn should_read_lazy() documentation altrep argument vroom::vroom().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_omim.html","id":null,"dir":"Reference","previous_headings":"","what":"Read OMIM Data — read_omim","title":"Read OMIM Data — read_omim","text":"Reads formats OMIM data copied manually downloaded https://omim.org/, downloaded download_omim() (permission required), appends columns speed subsequent curation activities.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_omim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read OMIM Data — read_omim","text":"","code":"read_omim(file, keep_mim = c(\"#\", \"%\"), ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/read_omim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read OMIM Data — read_omim","text":"file path file (possibly compressed) copy/pasted manually downloaded https://omim.org/ (see \"Manual Input Requirements\" details), downloaded download_omim(). keep_mim [OMIM search data ] MIM symbols representing data types keep, character vector, NULL retain (default: \"#\" \"%\"). OMIM defined MIM symbols : ... Arguments passed read_delim_auto","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_omim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read OMIM Data — read_omim","text":"omim_tbl (tibble) omim column containing OMIM CURIEs formatted xrefs, followed complete OMIM data arranged seen omim.org OMIM entries (possible). omim.org \"Download \" button used download data, omim_tbl additionally modified based download type: Search list download: Additional omim_search class search column containing search used. OMIM phenotypic series titles download: Additional omim_PS_titles class. OMIM phenotypic series download: Additional omim_PS class row representing OMIM phenotypic series . Output columns typical OMIM phenotype entries, including omim_PS, additional geno_inheritance column containing best guess inheritance GENO ontology. simplifies adding inheritance logical subClassOf axioms supporting curation. NOTE: OMIM phenotypic series https://omim.org/ include data entries column ordered differently.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_omim.html","id":"manual-input-requirements","dir":"Reference","previous_headings":"","what":"Manual Input Requirements","title":"Read OMIM Data — read_omim","text":"file OMIM data copied downloaded must include headers top. data can left copied & pasted omim.org even formatted correctly, read_omim() process correct headers, includes fixing multi-line misarranged column headers, trim whitespace.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_pubmed_txt.html","id":null,"dir":"Reference","previous_headings":"","what":"Read in PubMed Citations (from txt file) — read_pubmed_txt","title":"Read in PubMed Citations (from txt file) — read_pubmed_txt","text":"Reads PubMed text-format citations spanning multiple lines, usually obtained downloading text file PubMed 'Summary (text)'.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_pubmed_txt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read in PubMed Citations (from txt file) — read_pubmed_txt","text":"","code":"read_pubmed_txt(file)"},{"path":"https://allenbaron.github.io/DO.utils/reference/read_pubmed_txt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read in PubMed Citations (from txt file) — read_pubmed_txt","text":"file Path .txt file; another possible input readLines().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_pubmed_txt.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read in PubMed Citations (from txt file) — read_pubmed_txt","text":"data.frame record number (n), identifiers (pmid, pmcid, doi), full citation (citation).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. rentrez set_entrez_key tibble as_tibble tidyr replace_na","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_blank.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Blanks with Specified Value — replace_blank","title":"Replace Blanks with Specified Value — replace_blank","text":"Replace blanks specified value.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_blank.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Blanks with Specified Value — replace_blank","text":"","code":"replace_blank(data, replace = NA_character_, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_blank.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Blanks with Specified Value — replace_blank","text":"data data object. replace string use replacement. ... Additional arguments passed methods. currently used.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_blank.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Replace Blanks with Specified Value — replace_blank","text":"data vector, replace_blank() returns vector class data (blanks character vectors modified). data list, replace_blank() recurse list (necessary) replace blank values character/list elements skip internal components (e.g. data.frames, matrices, etc).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_na.list.html","id":null,"dir":"Reference","previous_headings":"","what":"[DEPRECATED] Replace NAs with specified value — replace_na.list","title":"[DEPRECATED] Replace NAs with specified value — replace_na.list","text":"Replace NAs lists specified value. method replace_na recurse nested lists skip internal components lists simple vectors (e.g. data.frames, matrices, etc). NOTE [REQUIRES tidyr <= 1.1.4]: Coercion occur vectors list different types replace, either vector replace coercedaccording type order: logical < integer < numeric < complex < character < list.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_na.list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"[DEPRECATED] Replace NAs with specified value — replace_na.list","text":"","code":"# S3 method for list replace_na(data, replace, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_na.list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"[DEPRECATED] Replace NAs with specified value — replace_na.list","text":"data data frame vector. replace data data frame, replace takes named list values, one value column missing values replaced. value replace cast type column data used replacement . data vector, replace takes single value. single value replaces missing values vector. replace cast type data. ... Additional arguments methods. Currently unused.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_na.list.html","id":"deprecation-note","dir":"Reference","previous_headings":"","what":"DEPRECATION NOTE","title":"[DEPRECATED] Replace NAs with specified value — replace_na.list","text":"\"unsafe\" type conversion allowed replace_na.list() work tidyr v1.2.0, uses \"safe\" type conversion via vctrs::vec_cast(). replace_na.list() work tidyr <= 1.1.4. replace_na.list() frequently needed, removed future updates.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_null.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace NULLs with specified value — replace_null","title":"Replace NULLs with specified value — replace_null","text":"Replace NULLs (lists) specified value. replace_null recurse nested lists skip internal components lists (e.g. data.frames, matrices, etc). NOTE replace also added empty lists (.e. list()) zero-length vectors.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_null.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace NULLs with specified value — replace_null","text":"","code":"replace_null(data, replace)"},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_null.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace NULLs with specified value — replace_null","text":"data list (list column data frame). replace single value use replacement.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/restore_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Restore Element Names — restore_names","title":"Restore Element Names — restore_names","text":"Restores names elements within objects name-removing events.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/restore_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Restore Element Names — restore_names","text":"","code":"restore_names(x, names_from)"},{"path":"https://allenbaron.github.io/DO.utils/reference/restore_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Restore Element Names — restore_names","text":"x object needing names retored names_from object restore names ","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/restore_names.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Restore Element Names — restore_names","text":"Necessary following scenarios: string operations stringr stringi, stringi fixes issue #59","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/robot.html","id":null,"dir":"Reference","previous_headings":"","what":"Execute Robot Commands — robot","title":"Execute Robot Commands — robot","text":"Light wrapper OBO Foundry ROBOT program (OBO Foundry). See ROBOT documentation information subcommands arguments.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/robot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Execute Robot Commands — robot","text":"","code":"robot(..., .robot_path = NULL)"},{"path":"https://allenbaron.github.io/DO.utils/reference/robot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Execute Robot Commands — robot","text":"... Command(s) passed ROBOT, including subcommand(s), either single string named strings, name corresponds long short form option value option value. options use value, use \"\". Subcommands unnamed. Examples: Subcommands: \"query\", \"export\" Common options: \"--input doid.owl\" input = \"doid.owl\" (named argument). \"-o result.owl\" (.e. --output) o = \"result.owl\" (named argument). \"--remove-annotations\" (option annotate) \"remove-annotations\" = \"\" (named argument form). .robot_path path ROBOT executable .jar file, string. NULL (default), system ROBOT executable available used, otherwise error signaled. NOTE: .utils caches last ROBOT used future use.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/robot.html","id":"robot-setup","dir":"Reference","previous_headings":"","what":"ROBOT Setup","title":"Execute Robot Commands — robot","text":"Requires installation Java (supported versions listed \"Getting Started\" section http://robot.obolibrary.org/). Can use OBO Foundry ROBOT tool installed system path. may achieved install_robot() described http://robot.obolibrary.org/. Can also use standalone robot.jar file (.robot_path must specified) case executed java -Xmx10G -jar (10 GB memory). first use R session, ROBOT executable/.jar specified tested. must succeed prior command execution. success, robot() announce version & path used. time new .robot_path specified, previous version replaced new announcement.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/robot.html","id":"citation","dir":"Reference","previous_headings":"","what":"Citation","title":"Execute Robot Commands — robot","text":"R.C. Jackson, J.P. Balhoff, E. Douglass, N.L. Harris, C.J. Mungall, J.. Overton. ROBOT: tool automating ontology workflows. BMC Bioinformatics, vol. 20, July 2019.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/robot_query.html","id":null,"dir":"Reference","previous_headings":"","what":"Execute a SPARQL Query with ROBOT — robot_query","title":"Execute a SPARQL Query with ROBOT — robot_query","text":"Wrapper robot(\"query\", ...) accepts file text query, convenient arguments.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/robot_query.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Execute a SPARQL Query with ROBOT — robot_query","text":"","code":"robot_query( input, query, output = NULL, ..., tidy_what = \"nothing\", col_types = NULL )"},{"path":"https://allenbaron.github.io/DO.utils/reference/robot_query.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Execute a SPARQL Query with ROBOT — robot_query","text":"input path RDF/OWL file recognized ROBOT, string. query text path valid SPARQL query (ASK, SELECT, CONSTRUCT, UPDATE) string. output path output written, string, NULL (default) load data directly. output required UPDATE CONSTRUCT queries. ... Additional arguments ROBOT query formatted described robot(). tidy_what elements SPARQL-created data.frame tidy, character vector. One following: \"everything\" apply tidy operations (precedence \"nothing\"). \"header\" remove leading ? header labels. \"unnest\" unnest list columns unnest_cross(). \"uri_to_curie\" convert URIs recognized .utils CURIEs to_curie(). \"lgl_NA_false\" replace NA logical columns FALSE. \"as_tibble\" make output tibble. \"nothing\" prevent tidying. col_types One NULL, cols() specification, string. See vignette(\"readr\") details. NULL, column types inferred guess_max rows input, interspersed throughout file. convenient (fast), robust. guessed types wrong, need increase guess_max supply correct types . Column specifications created list() cols() must contain one column specification column. want read subset columns, use cols_only(). Alternatively, can use compact string representation character represents one column: c = character = integer n = number d = double l = logical f = factor D = date T = date time t = time ? = guess _ - = skip default, reading file without column specification print message showing readr guessed . remove message, set show_col_types = FALSE set `options(readr.show_col_types = FALSE).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/robot_query.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Execute a SPARQL Query with ROBOT — robot_query","text":"output specified, path output file query result. Otherwise, query result (ASK boolean SELECT tibble).","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/round_down.html","id":null,"dir":"Reference","previous_headings":"","what":"Round Number Down — round_down","title":"Round Number Down — round_down","text":"Round Number ","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/round_down.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Round Number Down — round_down","text":"","code":"round_down(x, digits = 0)"},{"path":"https://allenbaron.github.io/DO.utils/reference/round_down.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Round Number Down — round_down","text":"x numeric vector. digits number decimal places, integer. Negative values allowed (see 'Details').","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/round_down.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Round Number Down — round_down","text":"Rounding negative number digits means rounding power ten, example round_down(x, digits = -2) rounds nearest hundred.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/round_up.html","id":null,"dir":"Reference","previous_headings":"","what":"Round Number Up — round_up","title":"Round Number Up — round_up","text":"Round Number ","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/round_up.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Round Number Up — round_up","text":"","code":"round_up(x, digits = 0)"},{"path":"https://allenbaron.github.io/DO.utils/reference/round_up.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Round Number Up — round_up","text":"x numeric vector. digits number decimal places, integer. Negative values allowed (see 'Details').","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/round_up.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Round Number Up — round_up","text":"Rounding negative number digits means rounding power ten, example round_up(x, digits = -2) rounds nearest hundred.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/round_zero.html","id":null,"dir":"Reference","previous_headings":"","what":"Round Number to Zero — round_zero","title":"Round Number to Zero — round_zero","text":"Round Number Zero","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/round_zero.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Round Number to Zero — round_zero","text":"","code":"round_zero(x, digits)"},{"path":"https://allenbaron.github.io/DO.utils/reference/round_zero.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Round Number to Zero — round_zero","text":"x numeric vector. digits number decimal places, integer. Negative values allowed (see 'Details').","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/round_zero.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Round Number to Zero — round_zero","text":"Rounding negative number digits means rounding power ten, example round_zero(x, digits = -2) rounds nearest hundred.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/sandwich_text.html","id":null,"dir":"Reference","previous_headings":"","what":"Sandwich Text Between Placeholders — sandwich_text","title":"Sandwich Text Between Placeholders — sandwich_text","text":"Sandwiches strings one two placeholders.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/sandwich_text.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sandwich Text Between Placeholders — sandwich_text","text":"","code":"sandwich_text(x, placeholder, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/sandwich_text.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sandwich Text Between Placeholders — sandwich_text","text":"x string character vector. placeholder One two placeholders sandwich element x . two placeholders provided, x sandwiched first left second right. Otherwise, x sandwiched sides placeholder. ... Arguments passed base::paste0 collapse optional character string separate results. NA_character_. recycle0 logical indicating zero-length character arguments lead zero-length character(0) sep-phase (turns \"\" collapse-phase, .e., collapse NULL).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/sandwich_text.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sandwich Text Between Placeholders — sandwich_text","text":"","code":"sandwich_text(\"a\", placeholder = \"h\") #> [1] \"hah\" sandwich_text(\"a\", placeholder = c(\"b\", \"h\")) #> [1] \"bah\""},{"path":"https://allenbaron.github.io/DO.utils/reference/save_alliance_counts.html","id":null,"dir":"Reference","previous_headings":"","what":"Writes Alliance Counts to File — save_alliance_counts","title":"Writes Alliance Counts to File — save_alliance_counts","text":"Writes Alliance record counts .csv file version info Alliance file came footer.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/save_alliance_counts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Writes Alliance Counts to File — save_alliance_counts","text":"","code":"save_alliance_counts(counts_tbl, file, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/save_alliance_counts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Writes Alliance Counts to File — save_alliance_counts","text":"counts_tbl record counts alliance_tbl (e.g. output count_alliance_records()) file file write ... arguments pass readr::write_csv()","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/save_alliance_counts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Writes Alliance Counts to File — save_alliance_counts","text":"Returns counts_tbl version info footer invisibly.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/search_pmc.html","id":null,"dir":"Reference","previous_headings":"","what":"Search PubMed Central — search_pmc","title":"Search PubMed Central — search_pmc","text":"Searches PubMed Central using Entrez Utilities API via rentrez.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/search_pmc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Search PubMed Central — search_pmc","text":"","code":"search_pmc( term, config = NULL, retmode = \"xml\", use_history = FALSE, pmid = FALSE, retmax = NULL, ... )"},{"path":"https://allenbaron.github.io/DO.utils/reference/search_pmc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Search PubMed Central — search_pmc","text":"term search term (character); see reference rentrez::entrez_search syntax details config vector configuration options passed httr::GET retmode character, one json (default) xml. make difference cases. use_history logical. TRUE return web_history object use later calls NCBI pmid whether return PMID well PMCID (default = FALSE); TRUE, PMIDs obtained via rcrossref::id_converter) retmax maximum number PubMed IDs return (integer; default = 20, max = 100,000); see reference 'Optional Parameters – Retrieval' ... character, additional terms add request, see NCBI documentation linked references complete list","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/search_pubmed.html","id":null,"dir":"Reference","previous_headings":"","what":"Search PubMed — search_pubmed","title":"Search PubMed — search_pubmed","text":"Searches PubMed using Entrez Utilities API via rentrez.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/search_pubmed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Search PubMed — search_pubmed","text":"","code":"search_pubmed( term, config = NULL, retmode = \"xml\", use_history = FALSE, retmax = NULL, ... )"},{"path":"https://allenbaron.github.io/DO.utils/reference/search_pubmed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Search PubMed — search_pubmed","text":"term search term (character); see reference rentrez::entrez_search syntax details config vector configuration options passed httr::GET retmode character, one json (default) xml. make difference cases. use_history logical. TRUE return web_history object use later calls NCBI retmax maximum number PubMed IDs return (integer; default = 20, max = 100,000); see reference 'Optional Parameters – Retrieval' ... character, additional terms add request, see NCBI documentation linked references complete list","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/search_pubmed.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Search PubMed — search_pubmed","text":"https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4_ESearch","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/set_scopus_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"Set Keys for Scopus API Access — set_scopus_keys","title":"Set Keys for Scopus API Access — set_scopus_keys","text":"Sets Elsevier API key /institutional token environment variables (Elsevier_API Elsevier_insttoken) access subsequent Scopus functions.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/set_scopus_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set Keys for Scopus API Access — set_scopus_keys","text":"","code":"set_scopus_keys(api_key, insttoken)"},{"path":"https://allenbaron.github.io/DO.utils/reference/set_scopus_keys.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set Keys for Scopus API Access — set_scopus_keys","text":"api_key Elsevier API key, string. insttoken Elsevier institutional token, string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/set_scopus_keys.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set Keys for Scopus API Access — set_scopus_keys","text":"Named logical vector stating whether setting operation successful key provided input (invisibly).","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/theme_DO.html","id":null,"dir":"Reference","previous_headings":"","what":"DO Theme for Stats Plots — theme_DO","title":"DO Theme for Stats Plots — theme_DO","text":"default ggplot2 theme used statistical plots uploaded disease-ontology.org. manages base plot style incorporate 's color scheme.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/theme_DO.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"DO Theme for Stats Plots — theme_DO","text":"","code":"theme_DO( base_size = 11, base_family = \"\", base_line_size = base_size/22, base_rect_size = base_size/22 )"},{"path":"https://allenbaron.github.io/DO.utils/reference/theme_DO.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"DO Theme for Stats Plots — theme_DO","text":"base_size base font size, given pts. base_family base font family base_line_size base size line elements base_rect_size base size rect elements","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/theme_DO.html","id":"background","dir":"Reference","previous_headings":"","what":"Background","title":"DO Theme for Stats Plots — theme_DO","text":"information refer ggplot2's theme documentation.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_ga_tbl.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy Google Analytics Tables (INTERNAL) — tidy_ga_tbl","title":"Tidy Google Analytics Tables (INTERNAL) — tidy_ga_tbl","text":"Tidies Google Analytics tables loaded read_ga().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_ga_tbl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy Google Analytics Tables (INTERNAL) — tidy_ga_tbl","text":"","code":"tidy_ga_tbl(ga_tbl, keep_total = FALSE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_ga_tbl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy Google Analytics Tables (INTERNAL) — tidy_ga_tbl","text":"ga_tbl Google analytics table loaded read_ga(), needs tidied. keep_total Whether keep row totals appears bottom table, logical scalar (default: FALSE).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_pub_records.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy Publication Records — tidy_pub_records","title":"Tidy Publication Records — tidy_pub_records","text":"Tidy publication record results tibble. Limited data retained. full data retention desired, consider using as_tibble() instead (expect list columns untidy column names).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_pub_records.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy Publication Records — tidy_pub_records","text":"","code":"tidy_pub_records(x, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_pub_records.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy Publication Records — tidy_pub_records","text":"x publication record object, produced citedby_pubmed(), citedby_scopus() pubmed_summary(). ... Ignored; included extensibility.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_pubmed_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert PubMed summary to tibble (DEPRECATED) — tidy_pubmed_summary","title":"Convert PubMed summary to tibble (DEPRECATED) — tidy_pubmed_summary","text":"Convert list result generated rentrez::entrez_summary() PubMed database tibble.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_pubmed_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert PubMed summary to tibble (DEPRECATED) — tidy_pubmed_summary","text":"","code":"tidy_pubmed_summary(pm_summary, addl_items = NULL)"},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_pubmed_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert PubMed summary to tibble (DEPRECATED) — tidy_pubmed_summary","text":"pm_summary result rentrez::entrez_summary(db = \"pubmed\", ...) addl_items character vector listing \"items\" (.e. data variables) include tidy dataset beyond default: uid, pubdate, title, authors, fulljournalname","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_pubmed_summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert PubMed summary to tibble (DEPRECATED) — tidy_pubmed_summary","text":"dataframe uid, pubdate, title, fulljournalname; may also include authors, authtype auth_clusterid author information present additional variables included addl_items","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_pubmed_summary.html","id":"deprecation-notice","dir":"Reference","previous_headings":"","what":"DEPRECATION NOTICE","title":"Convert PubMed summary to tibble (DEPRECATED) — tidy_pubmed_summary","text":"function favor tidy_pub_records() work esummary_list objects.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_sparql.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy SPARQL Query — tidy_sparql","title":"Tidy SPARQL Query — tidy_sparql","text":"Tidies SPARQL query results according desired specifications (see tidy_what parameter details).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_sparql.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy SPARQL Query — tidy_sparql","text":"","code":"tidy_sparql(query_res, tidy_what = \"everything\", ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_sparql.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy SPARQL Query — tidy_sparql","text":"query_res results SPARQL query, data.frame (usually produced owl_xml()$query() similar DOrepo(), can also used tidy results robot(\"query\", ...) loaded readr). tidy_what elements SPARQL-created data.frame tidy, character vector. One following: \"everything\" apply tidy operations (precedence \"nothing\"). \"header\" remove leading ? header labels. \"unnest\" unnest list columns unnest_cross(). \"uri_to_curie\" convert URIs recognized .utils CURIEs to_curie(). \"lgl_NA_false\" replace NA logical columns FALSE. \"as_tibble\" make output tibble. \"nothing\" prevent tidying. ... Arguments passed to_curie strip_angle_brackets Whether remove < > input, boolean (default: TRUE). might undesirable consequences, e.g. angle brackets need removed, perform removal beforehand use strip_angle_brackets = FALSE.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_character.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert to Character — to_character","title":"Convert to Character — to_character","text":"Provides character conversion methods base::.character() additional methods lists data.frames. to_character() created enable collapse_to_string() handle many data types avoiding unintended conversions character, occurred methods added .character().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_character.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert to Character — to_character","text":"","code":"to_character(x, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/to_character.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert to Character — to_character","text":"x object coerced tested. ... arguments passed methods.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_curie.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert URI to CURIE — to_curie","title":"Convert URI to CURIE — to_curie","text":"Converts URI(s) CURIE(s).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_curie.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert URI to CURIE — to_curie","text":"","code":"to_curie(x, strip_angle_brackets = TRUE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/to_curie.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert URI to CURIE — to_curie","text":"x URI(s), character vector. strip_angle_brackets Whether remove < > input, boolean (default: TRUE). might undesirable consequences, e.g. angle brackets need removed, perform removal beforehand use strip_angle_brackets = FALSE.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_curie.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Convert URI to CURIE — to_curie","text":"Performs URI validation, relying simple string matching namespace-prefix pairs ns_prefix conversion. values matching one returned without modification.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/to_curie.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert URI to CURIE — to_curie","text":"","code":".uri <- c( \"http://www.w3.org/2000/01/rdf-schema#comment\", \"http://purl.org/dc/elements/1.1/date\", \"http://purl.org/dc/terms/license\", \"http://www.w3.org/2002/07/owl#deprecated\", \"http://www.geneontology.org/formats/oboInOwl#id\", \"http://purl.obolibrary.org/obo/UBERON_0000002\", \"http://purl.obolibrary.org/obo/DOID_0001816\", \"http://purl.obolibrary.org/obo/doid#DO_AGR_slim\", \"\" ) to_curie(.uri) #> [1] \"rdfs:comment\" \"dc:date\" \"terms:license\" #> [4] \"owl:deprecated\" \"oboInOwl:id\" \"UBERON:0000002\" #> [7] \"DOID:0001816\" \"doid:DO_AGR_slim\" \"oboInOwl:hasDbXref\" # uses 'obo' namespace when an OBO Foundry ontology namespace isn't available to_curie( c(\"http://purl.obolibrary.org/obo/SO_0000110\", \"http://purl.obolibrary.org/obo/so#has_origin\") ) #> [1] \"SO:0000110\" \"so:has_origin\" #returns non-URI or unknown namespace prefixes unmodified to_curie( c(\"http://purl.obolibrary.org/obo/SYMP_0000000\", \"not a URI\", \"https://disease-ontology.org/\") ) #> [1] \"SYMP:0000000\" \"not a URI\" #> [3] \"https://disease-ontology.org/\""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_range.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Vectors to Range String — to_range","title":"Convert Vectors to Range String — to_range","text":"Converts vectors string ranges. vector types accepted original values appear final output range, input numeric vector whole numbers, function convert values integers must provided (int_fn) purpose identifying range(s).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_range.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Vectors to Range String — to_range","text":"","code":"to_range( x, int_fn = NULL, ..., sep = c(\",\", \"-\"), start_rm = NULL, end_rm = NULL )"},{"path":"https://allenbaron.github.io/DO.utils/reference/to_range.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Vectors to Range String — to_range","text":"x numeric vector whole numbers. int_fn function (tidyverse-style formula) convert x integer vector, used creating ranges; original value appear range except modified start_rm /end_rm. int_fun required x numeric vector. ... Arguments passed int_fn. sep separators use ranges (default: ',') within range (default: '-'), length-2 character vector. start_rm regular expression remove x values beginning range. end_rm regular expression remove x values end range.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_range.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Vectors to Range String — to_range","text":"range(s) formatted string NA input empty vector.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_range.html","id":"notes","dir":"Reference","previous_headings":"","what":"Notes","title":"Convert Vectors to Range String — to_range","text":"NA values always dropped. to_range() inspired answers https://stackoverflow.com/q/16911773/6938922, heavily speendo (CC--SA 3.0, accessed 2022-07-01). fastest approach inputs significantly slower answers large inputs. internal approach likely modified future, arguments output remain .","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_range.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Vectors to Range String — to_range","text":"","code":"x <- c(1:2, 8:6, 4, -1:-2, 20:37, 4, 40, 43, 45) to_range(x) #> [1] \"-2,-1,1,2,4,6-8,20-37,40,43,45\" # `NA` values are dropped y <- c(1:4, NA, 5, 7:10) to_range(x) #> [1] \"-2,-1,1,2,4,6-8,20-37,40,43,45\" # Use `int_fn` when `x` is not a numeric vector (tidyverse-style formulas # accepted) x_char <- as.character(x) to_range(x, int_fn = as.integer) #> [1] \"-2,-1,1,2,4,6-8,20-37,40,43,45\" to_range(x, int_fn = ~ as.integer(.x)) #> [1] \"-2,-1,1,2,4,6-8,20-37,40,43,45\" # `int_fn` allows non-numeric ranges to be created txt <- paste0(x, \"txt\") to_int <- function(x, y) as.integer(stringr::str_remove(x, \"txt\")) to_range(txt, to_int, y = \"txt\") #> [1] \"-2txt,-1txt,1txt,2txt,4txt,6txt-8txt,20txt-37txt,40txt,43txt,45txt\" # text can be selectively removed from the values at the beginning of ranges # (`start_rm`) or end of ranges (`end_rm`) to_range(txt, to_int, start_rm = \"txt\") #> [1] \"-2txt,-1txt,1txt,2txt,4txt,6-8txt,20-37txt,40txt,43txt,45txt\" to_range(txt, to_int, end_rm = \"txt\") #> [1] \"-2txt,-1txt,1txt,2txt,4txt,6txt-8,20txt-37,40txt,43txt,45txt\""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_uri.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert CURIE to URI — to_uri","title":"Convert CURIE to URI — to_uri","text":"Converts CURIE(s) URI(s). Angle brackets added.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_uri.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert CURIE to URI — to_uri","text":"","code":"to_uri(x)"},{"path":"https://allenbaron.github.io/DO.utils/reference/to_uri.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert CURIE to URI — to_uri","text":"x CURIE(s), character vector.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_uri.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Convert CURIE to URI — to_uri","text":"Performs CURIE validation relies properly formatted CURIE conversion (e.g. prefix:reference, according CURIE standard). inputs matching prefix ns_prefix returned without modification.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/to_uri.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert CURIE to URI — to_uri","text":"","code":".curie <- c(\"rdfs:comment\", \"dc:date\", \"terms:license\", \"owl:deprecated\", \"oboInOwl:id\", \"UBERON:0000002\", \"DOID:0001816\", \"doid:DO_AGR_slim\") to_uri(.curie) #> [1] \"http://www.w3.org/2000/01/rdf-schema#comment\" #> [2] \"http://purl.org/dc/elements/1.1/date\" #> [3] \"http://purl.org/dc/terms/license\" #> [4] \"http://www.w3.org/2002/07/owl#deprecated\" #> [5] \"http://www.geneontology.org/formats/oboInOwl#id\" #> [6] \"http://purl.obolibrary.org/obo/UBERON_0000002\" #> [7] \"http://purl.obolibrary.org/obo/DOID_0001816\" #> [8] \"http://purl.obolibrary.org/obo/doid#DO_AGR_slim\" #returns non-CURIE or unknown namespace prefixes unmodified to_curie(c(\"SYMP:0000000\", \"not a CURIE\", \"bioregistry.collection:0000001\")) #> [1] \"SYMP:0000000\" \"not a CURIE\" #> [3] \"bioregistry.collection:0000001\""},{"path":"https://allenbaron.github.io/DO.utils/reference/today_datestamp.html","id":null,"dir":"Reference","previous_headings":"","what":"Today's Date Stamp — today_datestamp","title":"Today's Date Stamp — today_datestamp","text":"Returns today's date format appropriate use date stamp. Format = YMD (Year Month Day) without separators (e.g. \"20210728\" July 28, 2021).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/today_datestamp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Today's Date Stamp — today_datestamp","text":"","code":"today_datestamp()"},{"path":"https://allenbaron.github.io/DO.utils/reference/unique_if_invariant.html","id":null,"dir":"Reference","previous_headings":"","what":"Return Unique Value for Invariant Vectors — unique_if_invariant","title":"Return Unique Value for Invariant Vectors — unique_if_invariant","text":"Returns unique value input, , 1 unique value exists (.e. input invariant), otherwise returns original input. Uniqueness determined base::unique() flexibility unique_if_invariant() may fail custom methods.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/unique_if_invariant.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return Unique Value for Invariant Vectors — unique_if_invariant","text":"","code":"unique_if_invariant(x, na.rm = FALSE, incl_nm = FALSE, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/unique_if_invariant.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return Unique Value for Invariant Vectors — unique_if_invariant","text":"x R object, except arrays supported. na.rm logical scalar indicating whether NA values removed (default: FALSE); powered stats::na.omit() may limited methods. incl_nm logic scalar indicating whether names also examined (default: FALSE). ... Arguments passed base::unique() methods.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/unique_if_invariant.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Return Unique Value for Invariant Vectors — unique_if_invariant","text":"","code":"unique_if_invariant(c(\"a\", \"a\")) #> [1] \"a\" unique_if_invariant(c(\"a\", \"b\")) #> [1] \"a\" \"b\" # `NA` can be ignored unique_if_invariant(c(\"a\", NA)) #> [1] \"a\" NA unique_if_invariant(c(\"a\", NA), na.rm = TRUE) #> [1] \"a\" # names are ignored by default (and often dropped); to consider and preserve # them use `incl_nm = TRUE` unique_if_invariant(c(a = \"A\", b = \"A\")) #> [1] \"A\" unique_if_invariant(c(a = \"A\", b = \"A\"), incl_nm = TRUE) #> a b #> \"A\" \"A\" unique_if_invariant(c(a = \"A\", a = \"A\"), incl_nm = TRUE) #> a #> \"A\" # na.rm & incl_nm are ignored for matrices & data.frames due to undesirable # results; as with base::unique(), matrix comparison preserves columns m <- matrix(rep(1, 4), 2) unique_if_invariant(m) #> [,1] [,2] #> [1,] 1 1 .df <- data.frame(m, check.names = TRUE) unique_if_invariant(.df) #> X1 X2 #> 1 1 1"},{"path":"https://allenbaron.github.io/DO.utils/reference/unnest_cross.html","id":null,"dir":"Reference","previous_headings":"","what":"Unnest data frame list columns — unnest_cross","title":"Unnest data frame list columns — unnest_cross","text":"Like tidyr::unnest() always produces cartesian product requires list columns \"parallel entries ... compatible sizes\".","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/unnest_cross.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Unnest data frame list columns — unnest_cross","text":"","code":"unnest_cross(data, cols, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/unnest_cross.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Unnest data frame list columns — unnest_cross","text":"data data.frame. cols Columns unnest. ... Arguments passed tidyr::unchop, tidyr::unpack error_call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. keep_empty default, get one row output element list unchopping/unnesting. means size-0 element (like NULL empty data frame vector), entire row dropped output. want preserve rows, use keep_empty = TRUE replace size-0 elements single row missing values. ptype Optionally, named list column name-prototype pairs coerce cols , overriding default guessed combining individual values. Alternatively, single empty ptype can supplied, applied cols. names_repair Used check output data frame valid names. Must one following options: \"minimal\": name repair checks, beyond basic existence, \"unique\": make sure names unique empty, \"check_unique\": (default), name repair, check unique, \"universal\": make names unique syntactic function: apply custom name repair. tidyr_legacy: use name repair tidyr 0.8. formula: purrr-style anonymous function (see rlang::as_function()) See vctrs::vec_as_names() details terms strategies used enforce .","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/unnest_cross.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Unnest data frame list columns — unnest_cross","text":"","code":"df <- tibble::tibble( n = 1:2, interjection = list(c(\"oh\", \"wow\"), \"zap\"), letter = list(c(\"a\", \"b\", \"c\"), \"d\"), keep_list = list(\"please\", c(\"don't\", \"unnest\")) ) df #> # A tibble: 2 × 4 #> n interjection letter keep_list #> #> 1 1 #> 2 2 # Uses tidyselect semantics, like tidyr::unnest() unnest_cross(df, cols = tidyselect::starts_with(\"inter\")) #> # A tibble: 3 × 4 #> n interjection letter keep_list #> #> 1 1 oh #> 2 1 wow #> 3 2 zap # Works when list column sizes differ, unlike tidyr::unnest() tryCatch( tidyr::unnest(df, cols = c(interjection, letter)), error = function(e) message(e) ) #> Error in tidyr::unnest(df, cols = c(interjection, letter)): In row 1, can't recycle input of size 2 to size 3. unnest_cross(df, cols = c(interjection, letter)) #> # A tibble: 7 × 4 #> n interjection letter keep_list #> #> 1 1 oh a #> 2 1 oh b #> 3 1 oh c #> 4 1 wow a #> 5 1 wow b #> 6 1 wow c #> 7 2 zap d # Always produces a cartesian product, unlike tidyr::unnest() df2 <- tibble::tibble( n = list(1:2, 3L), letter = list(c(\"a\", \"b\"), \"c\"), ) df2 #> # A tibble: 2 × 2 #> n letter #> #> 1 #> 2 tidyr::unnest(df2, cols = tidyselect::everything()) #> # A tibble: 3 × 2 #> n letter #> #> 1 1 a #> 2 2 b #> 3 3 c unnest_cross(df2, cols = tidyselect::everything()) #> # A tibble: 5 × 2 #> n letter #> #> 1 1 a #> 2 1 b #> 3 2 a #> 4 2 b #> 5 3 c"},{"path":"https://allenbaron.github.io/DO.utils/reference/unnest_mapping.html","id":null,"dir":"Reference","previous_headings":"","what":"Unnest Mapping — unnest_mapping","title":"Unnest Mapping — unnest_mapping","text":"Tidies pyobo_map() results stored column data frame two steps: Extracts mapping results specialized ScoredMatch python objects (defined GILDA). Unnests results (list data frames).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/unnest_mapping.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Unnest Mapping — unnest_mapping","text":"","code":"unnest_mapping( df, col, prefix = NULL, prefix_sep = \":\", best_only = TRUE, warn_best_gt1 = FALSE, ... )"},{"path":"https://allenbaron.github.io/DO.utils/reference/unnest_mapping.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Unnest Mapping — unnest_mapping","text":"df data.frame. col column pyobo_map() results, tidy-select specification. prefix Optional prefix add namespace local unique identifiers (LUI; e.g. 4, LUI \"disease\" ), string; preferably create complete namespace ID (e.g. \"DOID:4\"). prefix_sep Optional separator placed prefix namespace LUIs, string. Ignored prefix = NULL. best_only Whether return best scoring result(s) , boolean. FALSE return results. NOTE: TRUE return one result case ties. warn_best_gt1 Whether warn best mapping ties exist term. ... Arguments passed tidyr::unnest keep_empty default, get one row output element list unchopping/unnesting. means size-0 element (like NULL empty data frame vector), entire row dropped output. want preserve rows, use keep_empty = TRUE replace size-0 elements single row missing values. ptype Optionally, named list column name-prototype pairs coerce cols , overriding default guessed combining individual values. Alternatively, single empty ptype can supplied, applied cols. names_sep NULL, default, outer names come inner names. string, outer names formed pasting together outer inner column names, separated names_sep. names_repair Used check output data frame valid names. Must one following options: \"minimal\": name repair checks, beyond basic existence, \"unique\": make sure names unique empty, \"check_unique\": (default), name repair, check unique, \"universal\": make names unique syntactic function: apply custom name repair. tidyr_legacy: use name repair tidyr 0.8. formula: purrr-style anonymous function (see rlang::as_function()) See vctrs::vec_as_names() details terms strategies used enforce .","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/unnest_mapping.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Unnest Mapping — unnest_mapping","text":"input data frame additional columns id, term (namespace label), score (mapping score determined GILDA). data frame additional rows best_score = FALSE ties best score exist term.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/update_website_count_tables.html","id":null,"dir":"Reference","previous_headings":"","what":"Update Counts in DO Website HTML — update_website_count_tables","title":"Update Counts in DO Website HTML — update_website_count_tables","text":"Directly updates counts listed tables disease-ontology.org \"Imports\" \"Slims\" pages using data specified release. Changes html files reviewed , correct, committed svn repo deployment.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/update_website_count_tables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Update Counts in DO Website HTML — update_website_count_tables","text":"","code":"update_website_count_tables(DO_repo, tag, svn_repo)"},{"path":"https://allenbaron.github.io/DO.utils/reference/update_website_count_tables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Update Counts in DO Website HTML — update_website_count_tables","text":"DO_repo pyDOID.repo.DOrepo object (see DOrepo()). tag repo tag extract data , string. svn_repo local path website svn directory, string. correct directory include Dockerfile 'disease_ontology' directory.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/update_website_count_tables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Update Counts in DO Website HTML — update_website_count_tables","text":"Updated counts directly html svn repo page, well , old new counts comparison list tibbles (invisibly).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/update_website_count_tables.html","id":"speed-note","dir":"Reference","previous_headings":"","what":"Speed Note","title":"Update Counts in DO Website HTML — update_website_count_tables","text":"Expect function make minute. majority time consumed loading doid-merged.owl file sped without faster RDF/OWL parser. currently handled via .utils' dependency python package pyDOID RDF handled RDFLib python package.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/vctr_to_string.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Vectors to Strings — vctr_to_string","title":"Convert Vectors to Strings — vctr_to_string","text":"Concatenate values vector single string. * vctr_to_string performs simple concatenation. * unique_to_string reduces vector unique values prior concatenation.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/vctr_to_string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Vectors to Strings — vctr_to_string","text":"","code":"vctr_to_string( x, delim = \"|\", na.rm = FALSE, sort = FALSE, decreasing = FALSE, ... ) unique_to_string( x, delim = \"|\", na.rm = FALSE, sort = FALSE, decreasing = FALSE, ... )"},{"path":"https://allenbaron.github.io/DO.utils/reference/vctr_to_string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Vectors to Strings — vctr_to_string","text":"x vector. delim delimiter place vector elements (default: \"|\"). na.rm logical scalar indicating whether NA values removed (default: FALSE). sort logical scalar indicating whether values sorted (default: FALSE). decreasing logical. sort increasing decreasing? \"radix\" method, can vector length equal number arguments .... methods, must length one. available partial sorting. ... arguments passed methods ( default methods objects without class) sort.int.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/wrap_onscreen.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrap an On-screen Message — wrap_onscreen","title":"Wrap an On-screen Message — wrap_onscreen","text":"Wraps -screen message, used messages, warnings, errors.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/wrap_onscreen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrap an On-screen Message — wrap_onscreen","text":"","code":"wrap_onscreen(msg, exdent = 2, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/wrap_onscreen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrap an On-screen Message — wrap_onscreen","text":"msg message wrap, string. exdent non-negative integer specifying indentation subsequent lines paragraphs. ... Arguments passed base::strwrap x character vector, object can converted character vector .character. width positive integer giving target column wrapping lines output. indent non-negative integer giving indentation first line paragraph. prefix,initial character string used prefix line except first, initial used. simplify logical. TRUE, result single character vector line text; otherwise, list length x elements character vectors line text obtained corresponding element x. (Hence, result former case obtained unlisting latter.)","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/wrap_onscreen.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Wrap an On-screen Message — wrap_onscreen","text":"","code":"short_msg <- \"This is a short message.\" long_msg <- \"This is a long message to demonstrate how wrap_onscreen() works. It's basically intended to be a multi-line paragraph but, as you can see if you view this variable, it is really just a very long string. We hope you enjoy!\" # no effect on short messages message(wrap_onscreen(short_msg)) #> This is a short message. # wrapping of longer messages, has default exdent message(wrap_onscreen(long_msg)) #> This is a long message to demonstrate how wrap_onscreen() works. It's #> basically intended to be a multi-line paragraph but, as you can see #> if you view this variable, it is really just a very long string. We #> hope you enjoy! # wrapping without exdent message(wrap_onscreen(long_msg, exdent = 0)) #> This is a long message to demonstrate how wrap_onscreen() works. It's #> basically intended to be a multi-line paragraph but, as you can see if #> you view this variable, it is really just a very long string. We hope #> you enjoy!"},{"path":"https://allenbaron.github.io/DO.utils/reference/write_access.html","id":null,"dir":"Reference","previous_headings":"","what":"Tests for Write Access — write_access","title":"Tests for Write Access — write_access","text":"Acts minimal wrapper around file.access(mode = 2) test whether R permission write files /directories.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/write_access.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tests for Write Access — write_access","text":"","code":"write_access(names)"},{"path":"https://allenbaron.github.io/DO.utils/reference/write_access.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tests for Write Access — write_access","text":"names character vector containing file names. Tilde-expansion done: see path.expand.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/write_access.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tests for Write Access — write_access","text":"Logical vector length equal names. NOTE differs base::file.access() returns integer vector.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/write_graphml.html","id":null,"dir":"Reference","previous_headings":"","what":"Write a Graph to .graphml File — write_graphml","title":"Write a Graph to .graphml File — write_graphml","text":"Writes graph object (tidygraph/iGraph) file GraphML.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/write_graphml.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write a Graph to .graphml File — write_graphml","text":"","code":"write_graphml(graph, file)"},{"path":"https://allenbaron.github.io/DO.utils/reference/write_graphml.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write a Graph to .graphml File — write_graphml","text":"graph tidygraph igraph object. file file path write , string. '.graphml' extension missing, appended.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/write_graphml.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Write a Graph to .graphml File — write_graphml","text":"Absolute path .graphml file written.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/write_gs.html","id":null,"dir":"Reference","previous_headings":"","what":"Write Data to a Google Sheet — write_gs","title":"Write Data to a Google Sheet — write_gs","text":"Specialized methods writing data created .utils specified Google Sheet.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/write_gs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write Data to a Google Sheet — write_gs","text":"","code":"write_gs(data, ss, hyperlink_curie = NULL, ...) # S3 method for omim_inventory write_gs( data, ss, hyperlink_curie = c(\"omim\", \"doid\"), datestamp = \"%Y%m%d\", ... )"},{"path":"https://allenbaron.github.io/DO.utils/reference/write_gs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write Data to a Google Sheet — write_gs","text":"data specially-classed data.frame defined method. ss Something identifies Google Sheet: file id string drive_id URL can recover id one-row dribble, googledrive represents Drive files instance googlesheets4_spreadsheet, gs4_get() returns Processed as_sheets_id(). hyperlink_curie columns CURIEs convert hyperlinks written Google Sheets. ... Arguments passed methods. datestamp NULL NA use default sheet name ('omim_inventory') format recognized format.Date() add date stamp suffix, separated '-', default sheet name.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/write_gs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Write Data to a Google Sheet — write_gs","text":"data written Google Sheet, invisibly.","code":""},{"path":[]},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updated-development-version","dir":"Changelog","previous_headings":"","what":"Updated","title":"DO.utils (development version)","text":"is_invariant() works just character & numeric vectors, new list data.frame methods default method able handle cases (replaces character method).","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updated-development-version-1","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"Updated","title":"DO.utils (development version)","text":"read_omim() now additionally parses official API-key requiring phenotypicSeries.txt downloads may able handle additional API-key requiring downloads.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-development-version","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"New","title":"DO.utils (development version)","text":"download_omim() downloads official API-key requiring files directly OMIM (e.g. mim2gene.txt, phenotypicSeries.txt, etc.). extract_ordo_mappings() extracts mappings Orphanet Rare Disease Ontology, native format oboInOwl:hasDbXref Orphanet’s text-based predicate modifiers, SKOS (supplemented filler doid: predicates SKOS predicates don’t exist.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"dependency-update-0-3-1","dir":"Changelog","previous_headings":"","what":"Dependency Update","title":"DO.utils 0.3.1","text":"dplyr > v1.1.0 now required.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-3-1","dir":"Changelog","previous_headings":"General","what":"New","title":"DO.utils 0.3.1","text":"elucidate() (generic) describes data given object. Currently, omim_inventory defined method.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updated-0-3-1","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"Updated","title":"DO.utils 0.3.1","text":"Includes omim_official attribute indicate source official download. input official source, output class indicate type. keep_mim arg can used filter OMIM search results. tidy_sparql() now removes ? column names new argument lgl_NA_false specifying whether NA values replaced FALSE logical columns. write_gs.omim_inventory() now datestamp method.","code":""},{"path":[]},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updated-0-3-0","dir":"Changelog","previous_headings":"General","what":"Updated","title":"DO.utils 0.3.0","text":"Aligned read_delim_auto() closely readr::read_delim() handle compressed input. Broadened unique_if_invariant() longer uses ’s methods instead relies base::unique(). may unintended consequences, particularly custom methods unique() defined works inputs, better matching expectations. format_html() txt argument renamed text align fully expectations.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-3-0","dir":"Changelog","previous_headings":"General","what":"New","title":"DO.utils 0.3.0","text":"lexiclean() processes text improved text matching. round_zero() round numbers toward zero. round_down() round numbers ; flexible base::floor().","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"website-supporting-updates-0-3-0","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"WEBSITE-Supporting Updates","title":"DO.utils 0.3.0","text":"Fix make_use_case_html() case-insensitive sorting. Now accepts manually-defined color sets, addition color sets provided .utils. Default plot size changed better fit new position disease-ontology.org statistics page.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"other-updates-0-3-0","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"Other Updates","title":"DO.utils 0.3.0","text":".path argument renamed .robot_path avoid use functions without changing name. Now informs testing caching ROBOT executable future use. onto_missing() poorly designed deprecated. determine OMIM entries present mappings, use inventory_omim() instead.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-3-0-1","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"New","title":"DO.utils 0.3.0","text":"Previously internal function limited capability handle specific copy/paste operation OMIM. Now expanded read data downloaded omim.org phenotypic series pages using “Download ” button handle copy paste tabular data omim.org without need manual corrections. longer returns tidy_label provisional columns, particularly useful, instead includes omim geno_inheritance columns help curation. inventory_omim() compares OMIM entry records mappings reports whether exist, accompanying class data . omim_inventory first method. Eliminates need time-consuming, corrections get GA exported file tidy format use Can optionally read multiple tables single file (exports two). Can merge GA data split multiple files due size. must merged manually trivial.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"do-management--analysis-0-2-10","dir":"Changelog","previous_headings":"","what":"DO Management & Analysis","title":"DO.utils 0.2.10","text":"onto_missing() & tidy_sparql() output now improved column types (longer character vectors). append_to_url() new named URL option, “DO_website”, direct link disease info disease-ontology.org.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"assessing-resource-use-0-2-10","dir":"Changelog","previous_headings":"","what":"Assessing Resource Use","title":"DO.utils 0.2.10","text":"citedby_scopus() longer retain responses zero results gained new argument no_results control signaled user, making consistent citedby_pubmed().","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"doutils-029","dir":"Changelog","previous_headings":"","what":"DO.utils 0.2.9","title":"DO.utils 0.2.9","text":"Fix dplyr code error onto_missing().","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"highlights-0-2-8","dir":"Changelog","previous_headings":"","what":"Highlights","title":"DO.utils 0.2.8","text":"Adds onto_missing() character length-sorting functions. support creating links CURIEs. Includes fixes eliminate warnings use tidyverse (#15) errors due updates tidyverse packages.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-2-8","dir":"Changelog","previous_headings":"General Utilities","what":"New","title":"DO.utils 0.2.8","text":"length_sort(): Sorts vector elements character length. length_order(): Sorts data.frames character length elements specified column(s). iff_all_vals(): Tests values present vector values present.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updated-0-2-8","dir":"Changelog","previous_headings":"General Utilities","what":"Updated","title":"DO.utils 0.2.8","text":"drop_blank(): Now generic character list methods. vctr_to_string(): Now always returns NA input NA, even na.rm = FALSE; previously returned \"NA\".","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-2-8-1","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"New","title":"DO.utils 0.2.8","text":"is_curie(): Tests CURIEs character vectors, according specified definition always conforms W3C CURIE Syntax 1.0. onto_missing(): Compares tsv/csv data data ontology identify data may missing. Optionally returns data present.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updated-0-2-8-1","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"Updated","title":"DO.utils 0.2.8","text":"robot() errors now signaled R longer specifies max heap size using robot.jar file. to_curie()/to_uri() now appropriately remove brackets URIs handle delimited input. tidy_sparql() new as_curies argument converts IRIs CURIEs default. ns_prefix now includes namespace prefixes, including MeSH UniProt. append_to_url() now vectorized can append additional prefixes, including anything ns_prefix URLs commonly used disease-ontology.org cross-references. format_url() longer uses NA txt argument text input. build_hyperlink() takes advantage updates append_to_url() format_url().","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"dependencies-0-2-7","dir":"Changelog","previous_headings":"","what":"Dependencies","title":"DO.utils 0.2.7","text":"reticulate updated >=v1.28 effort resolve python package installation issues; see https://github.com/DiseaseOntology/.utils/issues/12. stringr updated >= 1.5.0, access new str_escape() function. igraph added new tidygraph/graphml functions. change doesn’t affect much since tidygraph already dependency depends igraph. Now SUGGESTS keyring package API key management.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"announcements-0-2-7","dir":"Changelog","previous_headings":"","what":"Announcements","title":"DO.utils 0.2.7","text":"Migrated .utils repository DiseaseOntology organization. .utils documentation now available web https://diseaseontology.github.io/.utils/ significant updates supporting citation-based assessment use workflow.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-2-7","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"New","title":"DO.utils 0.2.7","text":"extract_as_tidygraph(): Extracts nodes relationships identified SPARQL query RDF/XML file returns tidygraph. write_graphml(): Writes graph object (tidygraph/iGraph) .graphml file.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updated-0-2-7","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"Updated","title":"DO.utils 0.2.7","text":"[BREAKING CHANGE] robot() wrapper function updated make easier use programming. Identifies count classes branch asserted inferred. Uses data directly local copy HumanDiseaseOntology repo instead manually copied release notes. Gained aspect_ratio argument. plot_xref_counts() now uses data directly local copy HumanDiseaseOntology repo instead manually copied release notes. plot_citedby() gained color_set argument permit flexible color choice. NOTE: 2023 Database paper describing ‘Assessing Resource Use’ workflow added publication describing use ). DO_colors now include accent colors generated part -KB addition website. colors available standard, “_mid”, “_light” versions.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-2-7-1","dir":"Changelog","previous_headings":"Assessing Resource Use","what":"New","title":"DO.utils 0.2.7","text":"‘Assessing Resource Use: Obtaining Use Records’ tutorial/vignette added. Describes set .utils execute functions support ‘Assessing Resource Use’ workflow. tidy_pub_records(): creates tibble limited information Scopus PubMed references; includes columns: first_author, title, journal, pub_date, doi, pmid, scopus_eid, pub_type, added_dt. set_scopus_keys(): makes Scopus API key /insttoken available use R session. set_entrez_key(): makes Entrez Utils API key available use R session; imported rentrez package.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updated-0-2-7-1","dir":"Changelog","previous_headings":"Assessing Resource Use","what":"Updated","title":"DO.utils 0.2.7","text":"as_tibble() methods publication results now include added_dt column output standardizes record timestamps created. tidy_pubmed_summary() now soft deprecated favor tidy_pub_records().","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updated-0-2-7-2","dir":"Changelog","previous_headings":"General Utilities","what":"Updated","title":"DO.utils 0.2.7","text":"to_range() now returns NA passed empty vectors. citedby_scopus() new insttoken argument. collapse_col() gained methods collapse_col_flex(), along na.rm argument can used methods. append_to_url() build_hyperlink() longer add trailing slash end URLs one. Also, new sep argument added provide greater control. [BREAKING CHANGE] format_hyperlink() preserve_NA argument removed replaced preserve argument. change, output value URL missing either URL (.e. NA) text passed txt. allows flexibility output support use cases. format_hyperlink() now warns values passed ... equal “html” reduce likelihood losing arguments silently.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"doutils-026","dir":"Changelog","previous_headings":"","what":"DO.utils 0.2.6","title":"DO.utils 0.2.6","text":"Change license CC0 1.0 Universal match standard Human Disease Ontology project preparation use resource use assessment publication.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"deprecations-0-2-5","dir":"Changelog","previous_headings":"","what":"Deprecations","title":"DO.utils 0.2.5","text":"Website * make_user_list_html() deprecated user/use case information disease-ontology.org moved ‘Collaborators’ page new ‘Use Cases’ page. Replaced make_use_case_html().","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"breaking-changes-0-2-5","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"DO.utils 0.2.5","text":"Website * plot_*() longer include datestamp saved file names. Formatters * format_doid() parameters changed: * allow_bare renamed convert_bare * validate_input added allow invalid input pass-without modification. Cited / Search * read_pubmed_txt() now parses IDs (PMID, PMCID, & DOI) citations returns data.frame includes record number, IDs, full citations instead vector citations.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"bug-fixes-0-2-5","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"DO.utils 0.2.5","text":"Cited / Search * extract_pmid() updated recognize 1- 8-long PubMed IDs cover whole set actual PMIDs; previously limited recognizing 8-long PMIDs. * as_tibble.esummary_list() fixed error due reduced data output (fewer columns information) pubmed_summary() caused API changes. * match_citations() now matches DOIs case insensitive manner bringing compliance DOI spec.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updates-0-2-5","dir":"Changelog","previous_headings":"","what":"Updates","title":"DO.utils 0.2.5","text":"URLs * append_to_url(): * Gained new parameter preserve_NA, allows NA values pass instead appended URL. * Added ‘github’ ‘orcid’ named URLs might appended (via get_url()). Datasets * prefixes ns_prefix new prefix subsets added: * not_obo_prefix: Subset ns_prefix everything except OBO ontology prefixes (e.g. ‘dc’, ‘terms’, ‘skos’, ‘owl’, etc.). * obo_prefix: Subset ns_prefix standard OBO ontology prefixes namespaces. * obo_prop_prefix: New set prefixes created represent frequently used OBO ontology property prefixes. NOTE: one per ontology may exist may actual property prefix used stated ontology… use caution. General Utilities * unique_to_string()/vctr_to_string(): added sort arguments control sorting.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-2-5","dir":"Changelog","previous_headings":"","what":"New","title":"DO.utils 0.2.5","text":"Ontology Extracters/Modifiers * extract_*_axiom() family: Extract equivalentClass (‘eq’), subClassOf (‘subclass’), (‘class’) logical axioms. * queue_xref_split(): Creates ‘curation queue’ diseases may need split multiple cross-references source. * tidy_sparql(): Tidies SPARQL query results. Website * update_website_count_tables(): Update counts tables ‘Imports’ ‘Slims’ pages data specified release doid-merged.owl. Updates data place. * make_use_case_html(): Produces html new ‘Use Cases’ page, split 3 files, 1 per section : Ontologies, Resources, Methodologies. * update data place. HTML rows & cells must copied pasted HTML section ‘Use Cases’ file. * Content sorted alphabetically column. * make_contributor_html(): Produces HTML list contributors
  • elements disease-ontology.org, including links Github ORCID, available. URLs * format_hyperlink(): Converts URLs hyperlinks Google Sheets, Excel, HTML. * build_hyperlink(): Shorthand common append_to_url() plus format_hyperlink() combination. Cited / Search * pub_id_match (DATA): named character vector regex’s identify/extract publication IDs (currently PMID, PMCID, DOI, & Scopus EID). General Utilities * sandwich_text(): Pastes text around strings. * wrap_onscreen(): Wraps messages printed screen. * invert_sublists(): Swaps list elements depths 2 & 3, essentially inverting grouping. * lengthen_col(): Splits column(s) delimiter lengthens data.frame value row. * NOTES: * reverse collapse_col() recreate original data.frame round trip cases. * Uses unnest_cross() internally results always cartesian product lengthened columns. * count_delim(): Counts values delimited columns; essentially combination lengthen_col() dplyr::count(). Type Predicates * is_valid_obo(): Tests whether elements character vector ‘valid’ OBO Foundry IDs (based formatting, actual existence). Formatters * format_obo(): Formats OBO Foundry IDs. * format_axiom(): Formats OWL functional syntax EQ/SubClassOf axioms human readable, similar Protege.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-2-4","dir":"Changelog","previous_headings":"","what":"New","title":"DO.utils 0.2.4","text":"Testing * is_boolean(): T/F type predicate. * write_access(): Test file write existence write access. Data Conversion * to_curie() & to_uri(): Convert URI & CURIEs. * to_range(): Convert vector values ranges (output single string). Data.frame Manipulation * append_empty_col(): Add empty columns data.frame. * unnest_cross(): Unnest list columns data.frame always creating cartesian product. * Useful expanding list columns produced SPARQL queries. Datasets * ST_pubs: Information official publications describing Symptom (SYMP) /Pathogen Transmission (TRANS) ontologies. * Currently, one conatins one publication. * ns_prefix: Named character vector common namespace-prefix pairs used /OBO ontologies.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updates-0-2-4","dir":"Changelog","previous_headings":"","what":"Updates","title":"DO.utils 0.2.4","text":"cast_to_string renamed collapse_to_string() DO_pubs now includes lens_id lens.org identifiers publication.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"dependencies-0-2-4","dir":"Changelog","previous_headings":"","what":"Dependencies","title":"DO.utils 0.2.4","text":"Imports ‘tidyselect’, explicitly required unnest_cross used throughout .utils enable tidyverse-style semantics (via dplyr).","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"cited-by--updates-0-2-3","dir":"Changelog","previous_headings":"","what":"Cited By – Updates","title":"DO.utils 0.2.3","text":"citedby_pubmed(), equivalent citedby_scopus(), now available (uses citedby_pmid() pubmed_summary() internally. BREAKING CHANGE – add_col argument changed boolean NULL (replaces FALSE) name column (replaces TRUE). Bug fixes & message improvements. elink method default no_result still “error” elink_list default now warning. as_tibble.esummary_list() bug caused results data fixed – caused errors as_tibble.esummary_list_nested() precipitated tidyverse’s move strict vector merging. IMPORTANT NOTE: “cited ” functionality .utils may longer improved recent review Lens.org results suggests may good replacement PubMed + Scopus search & merge strategy. improvements made likely facilitate one : Merging PubMed Scopus “cited ” results, probably using standardize() (similar). Reducing data requested APIs implementing timeframe parameters citedby_*().","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"doutils-022","dir":"Changelog","previous_headings":"","what":"DO.utils 0.2.2","title":"DO.utils 0.2.2","text":"Bug fix correct error format_subtree() subtree classes multi-parentage. (Error label: “fill needed”)","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-2-1","dir":"Changelog","previous_headings":"","what":"New","title":"DO.utils 0.2.1","text":"extract_subtree() extracts data doid.owl including descendants relationships specified DOID. format_subtree() arranges dataframe text-based hierarchy mirroring disease-ontology.org. Primarily designed creating high quality “tree view” graphics similar EBI’s Ontology Lookup Service. is_valid_doid() tests whether inputs valid DOIDs. Note mutliple formats considered valid. format_doid() converts valid DOID formats.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updates-0-2-1","dir":"Changelog","previous_headings":"","what":"Updates","title":"DO.utils 0.2.1","text":"DOrepo() owl_xml() longer fail silently file/directory exist. pyDOID now verifies file paths instantiation underlying objects.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"dependencies-0-2-1","dir":"Changelog","previous_headings":"","what":"Dependencies","title":"DO.utils 0.2.1","text":"Suggests tidygraph, required format_subtree().","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"data-0-2-0","dir":"Changelog","previous_headings":"","what":"Data","title":"DO.utils 0.2.0","text":"Added Nucleic Acids Research 2022 publication data DO_pubs.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"dependencies-0-2-0","dir":"Changelog","previous_headings":"","what":"Dependencies","title":"DO.utils 0.2.0","text":"reticulate >= v1.23 required. replace_na.list() now deprecated (requires tidyr <= 1.1.4). Python dependency: pyDOID","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"general-purpose-0-2-0","dir":"Changelog","previous_headings":"","what":"General Purpose","title":"DO.utils 0.2.0","text":"Adds two new methods beyond “unique”: “first” & “last”. Adds ability collapse columns using different methods. DOrepo() wraps pyDOID.repo.DOrepo class owl_xml() wraps pyDOID.owl.xml class","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"graphics--website-0-2-0","dir":"Changelog","previous_headings":"","what":"Graphics / Website","title":"DO.utils 0.2.0","text":"plot_citedby() stacked bar chart showing publication types. DO_colors include saturated versions (names prefixed sat_). Functions generating html updated match html style guide standards. theme_DO() ggplot2 plotting theme . plot_def_src() display number times source used support disease definitions ontology (designed disease-ontology.org//statistics).","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"cited-by-0-2-0","dir":"Changelog","previous_headings":"","what":"Cited by","title":"DO.utils 0.2.0","text":"match_citations_fz() match_fz() concat_pm_citation() read_pubmed_txt() Updated match_citations() utilize Scopus EIDs. pmc_summary(), parallel pubmed_summary() works PubMed Central. tidy_ArticleId_set() (internal) as_tibble(), method esummary_list_nested","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"urls-0-2-0","dir":"Changelog","previous_headings":"","what":"URLs","title":"DO.utils 0.2.0","text":"read_doid_edit() extract_doid_url() validate_url() + helpers NOTE: Helpers robots.txt respectful validation remain INCOMPLETE care taken overwhelm web servers requests.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"doutils-017","dir":"Changelog","previous_headings":"","what":"DO.utils 0.1.7","title":"DO.utils 0.1.7","text":"Setup package wrap python via reticulate package. pyobo_map() create predicted mappings. parse_mapping() parse python.gilda.ScoredMatch results object list data frames matches (1 df/input term). unnest_mapping() unnest list column generated pyobo_map() inside dplyr::mutate() call; wraps parse_maping().","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"general-0-1-6","dir":"Changelog","previous_headings":"","what":"General","title":"DO.utils 0.1.6","text":"Added DEPENDENCIES ggplot2, googlesheets4, glue. Renamed match_citations_fz() match_fz(). Added cast_to_string(), generalized version vctr_to_string() accepts multiple inputs (similar paste()). Added function partition() vectors groups n elements per group.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"data-0-1-6","dir":"Changelog","previous_headings":"","what":"Data","title":"DO.utils 0.1.6","text":"Added latest official publication DO_pubs. Added official DO_colors.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"feature-website-updates-0-1-6","dir":"Changelog","previous_headings":"","what":"Feature: Website Updates","title":"DO.utils 0.1.6","text":"Added functions create statistics graphs: plot_citedby(), plot_terms_def_counts(), plot_branch_counts(), plot_xref_counts(). Added make_user_list_html() create rows table Community > Collaborators > Users Disease Ontology team’s curated “Uses” Google sheet.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"internal-use-only-0-1-6","dir":"Changelog","previous_headings":"","what":"Internal Use Only","title":"DO.utils 0.1.6","text":"Added to_character(), helper cast_to_string(), reduce lists data frames character vectors limiting data loss. Added html_in_rows(), helper make_user_list_html(), format html elements rows (optional row & cell attributes). Added Google sheets identifiers programmatic access.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"general-0-1-5","dir":"Changelog","previous_headings":"","what":"General","title":"DO.utils 0.1.5","text":"Added NEWS.md file track changes package. Created download_status Ref Class manage downloads based exit code/status. confine_list() / release_list() reversibly convert list column character vector (using json). is_invariant() test vectors 1 value; methods character & numeric vectors. unique_to_string() collapse vectors strings. unique_if_invariant() conditionally collapse vectors 1 value. Added na.rm argument vctr_to_scalar functions. NA, method lists. NULL, replace NULL values lists recursively. blank, replace “” values. collapse_col() collapse 1 specified columns data frame concatenating unique values together, preserving unique values columns. Created download_obo_ontology() download 1 ontologies maintained OBO Foundry.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"data-0-1-5","dir":"Changelog","previous_headings":"","what":"Data","title":"DO.utils 0.1.5","text":"Added publication info. Added OBO Foundry metadata.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"feature-alliance-0-1-5","dir":"Changelog","previous_headings":"","what":"Feature: Alliance","title":"DO.utils 0.1.5","text":"Made possible count Alliance terms subset DOIDs. Increased record type count options (arg: record_lvl) –> “full_record”, “disease-object”, “disease”, “object”","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"feature-citedby-0-1-5","dir":"Changelog","previous_headings":"","what":"Feature: citedby","title":"DO.utils 0.1.5","text":"Updated capture datetime citedby data first retrieved. NEED new citedby_pubmed() combines citedby_pmid() & pubmed_summary(). Uses new extract_pmid() elink_list method. Changed citedby tidy() methods as_tibble() methods & added new methods. Created truncate_authors() shorten long PubMed author lists. Created get_url() & append_to_url() build DOI, PubMed, PMC URLs individual publications.","code":""}] +[{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"CC0 1.0 Universal","title":"CC0 1.0 Universal","text":"CREATIVE COMMONS CORPORATION LAW FIRM PROVIDE LEGAL SERVICES. DISTRIBUTION DOCUMENT CREATE ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES INFORMATION “-” BASIS. CREATIVE COMMONS MAKES WARRANTIES REGARDING USE DOCUMENT INFORMATION WORKS PROVIDED HEREUNDER, DISCLAIMS LIABILITY DAMAGES RESULTING USE DOCUMENT INFORMATION WORKS PROVIDED HEREUNDER.","code":""},{"path":"https://allenbaron.github.io/DO.utils/LICENSE.html","id":"statement-of-purpose","dir":"","previous_headings":"","what":"Statement of Purpose","title":"CC0 1.0 Universal","text":"laws jurisdictions throughout world automatically confer exclusive Copyright Related Rights (defined ) upon creator subsequent owner(s) (, “owner”) original work authorship /database (, “Work”). Certain owners wish permanently relinquish rights Work purpose contributing commons creative, cultural scientific works (“Commons”) public can reliably without fear later claims infringement build upon, modify, incorporate works, reuse redistribute freely possible form whatsoever purposes, including without limitation commercial purposes. owners may contribute Commons promote ideal free culture production creative, cultural scientific works, gain reputation greater distribution Work part use efforts others. /purposes motivations, without expectation additional consideration compensation, person associating CC0 Work (“Affirmer”), extent owner Copyright Related Rights Work, voluntarily elects apply CC0 Work publicly distribute Work terms, knowledge Copyright Related Rights Work meaning intended legal effect CC0 rights. Copyright Related Rights. Work made available CC0 may protected copyright related neighboring rights (“Copyright Related Rights”). Copyright Related Rights include, limited , following: right reproduce, adapt, distribute, perform, display, communicate, translate Work; moral rights retained original author(s) /performer(s); publicity privacy rights pertaining person’s image likeness depicted Work; rights protecting unfair competition regards Work, subject limitations paragraph 4(), ; rights protecting extraction, dissemination, use reuse data Work; database rights (arising Directive 96/9/EC European Parliament Council 11 March 1996 legal protection databases, national implementation thereof, including amended successor version directive); similar, equivalent corresponding rights throughout world based applicable law treaty, national implementations thereof. Waiver. greatest extent permitted , contravention , applicable law, Affirmer hereby overtly, fully, permanently, irrevocably unconditionally waives, abandons, surrenders Affirmer’s Copyright Related Rights associated claims causes action, whether now known unknown (including existing well future claims causes action), Work () territories worldwide, (ii) maximum duration provided applicable law treaty (including future time extensions), (iii) current future medium number copies, (iv) purpose whatsoever, including without limitation commercial, advertising promotional purposes (“Waiver”). Affirmer makes Waiver benefit member public large detriment Affirmer’s heirs successors, fully intending Waiver shall subject revocation, rescission, cancellation, termination, legal equitable action disrupt quiet enjoyment Work public contemplated Affirmer’s express Statement Purpose. Public License Fallback. part Waiver reason judged legally invalid ineffective applicable law, Waiver shall preserved maximum extent permitted taking account Affirmer’s express Statement Purpose. addition, extent Waiver judged Affirmer hereby grants affected person royalty-free, non transferable, non sublicensable, non exclusive, irrevocable unconditional license exercise Affirmer’s Copyright Related Rights Work () territories worldwide, (ii) maximum duration provided applicable law treaty (including future time extensions), (iii) current future medium number copies, (iv) purpose whatsoever, including without limitation commercial, advertising promotional purposes (“License”). License shall deemed effective date CC0 applied Affirmer Work. part License reason judged legally invalid ineffective applicable law, partial invalidity ineffectiveness shall invalidate remainder License, case Affirmer hereby affirms () exercise remaining Copyright Related Rights Work (ii) assert associated claims causes action respect Work, either case contrary Affirmer’s express Statement Purpose. Limitations Disclaimers. trademark patent rights held Affirmer waived, abandoned, surrendered, licensed otherwise affected document. Affirmer offers Work -makes representations warranties kind concerning Work, express, implied, statutory otherwise, including without limitation warranties title, merchantability, fitness particular purpose, non infringement, absence latent defects, accuracy, present absence errors, whether discoverable, greatest extent permissible applicable law. Affirmer disclaims responsibility clearing rights persons may apply Work use thereof, including without limitation person’s Copyright Related Rights Work. , Affirmer disclaims responsibility obtaining necessary consents, permissions rights required use Work. Affirmer understands acknowledges Creative Commons party document duty obligation respect CC0 use Work.","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"overview","dir":"Articles","previous_headings":"","what":"Overview","title":"Assessing Resource Use: Obtaining Use Records","text":"first step Assessing Resource Use workflow obtain use records published literature databases. .utils supports obtaining records 3 ways: using publications resource identify publications cited (referred “cited ”). Via search. parsing loading MyNCBI collection. .utils can obtain records via “cited ” PubMed Scopus databases via search PubMed PubMed Central (PMC) databases. Additionally, europepmc R package can used search Europe PMC database. can used singly combination obtain records published literature likely use resource.","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"api_key","dir":"Articles","previous_headings":"","what":"Setup and API keys","title":"Assessing Resource Use: Obtaining Use Records","text":"API keys generally needed access publication record databases. specific keys needed listed database . team’s preferred method storing retrieving API keys R save system credential store using keyring package retrieve needed. save key, use keyring::key_set(), replacing default key name specified relevant section , paste/enter key prompt. retrieve key, use keyring::key_get().","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"pubmedpmc","dir":"Articles","previous_headings":"Setup and API keys","what":"PubMed/PMC","title":"Assessing Resource Use: Obtaining Use Records","text":".utils may able access PubMed PMC databases without user preparation. However, NCBI set rate limits services free API key recommended. information obtaining API key, refer NCBI’s support article obtain API Key NCBI account? Entrez Programming Utilities Help book (“General Introduction E-utilities” > “Usage Guidelines Requirements” > “API Keys”). Default key name: ENTREZ_KEY Alternate methods saving using Entrez Utilities API key documented vignette(\"rentrez_tutorial\", package = \"rentrez\") (rentrez package used .utils hood).","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"scopus","dir":"Articles","previous_headings":"Setup and API keys","what":"Scopus","title":"Assessing Resource Use: Obtaining Use Records","text":"institutional subscription user API key required access Scopus API. addition, Scopus requires “institutional token” “cited ” access (refer Scopus developer FAQ, question “Q: can obtain list articles (cited-list) cite articles interest ?”). API key can obtained Elsevier https://dev.elsevier.com/. obtain institutional token, institution’s librarian information specialist must email Elsevier account manager customer consultant, describe use case, request institutional token. Default key names: API key = Elsevier_API Institutional token = Elsevier_insttoken additional, limited, documentation see vignette(\"api_key\", package = \"rscopus\") (rscopus package used .utils hood).","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"europe-pmc","dir":"Articles","previous_headings":"Setup and API keys","what":"Europe PMC","title":"Assessing Resource Use: Obtaining Use Records","text":"Europe PMC can accessed europepmc R package require API key (time writing).","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"tutorial-obtaining-use-records","dir":"Articles","previous_headings":"","what":"Tutorial: Obtaining Use Records","title":"Assessing Resource Use: Obtaining Use Records","text":"","code":"library(DO.utils) suppressPackageStartupMessages(library(dplyr))"},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"cited-by","dir":"Articles","previous_headings":"Tutorial: Obtaining Use Records","what":"Cited By","title":"Assessing Resource Use: Obtaining Use Records","text":"tutorial, citations two official publications describing Human Disease Ontology copied PubMed (). information citations used .utils identify publications “cited ” bolded (titles PubMed IDs). Schriml LM, Mitraka E. Disease Ontology: fostering interoperability biological clinical human disease-related data. Mamm Genome. 2015 Oct;26(9-10):584-9. doi: 10.1007/s00335-015-9576-9. Epub 2015 Jun 21. PMID: 26093607; PMCID: PMC4602048. Bello SM, Shimoyama M, Mitraka E, Laulederkind SJF, Smith CL, Eppig JT, Schriml LM. Disease Ontology: improving unifying disease annotations across species. Dis Model Mech. 2018 Mar 12;11(3):dmm032839. doi: 10.1242/dmm.032839. PMID: 29590633; PMCID: PMC5897730.","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"pubmed","dir":"Articles","previous_headings":"Tutorial: Obtaining Use Records > Cited By","what":"PubMed","title":"Assessing Resource Use: Obtaining Use Records","text":"Obtain “cited ” records PubMed follows: Make Entrez Utilities API key available (see Setup API keys set ). Obtain records PubMed using resource publication PubMed IDs (pmid), optionally include publication record cites specifying by_id = TRUE. full results returned list can saved disk R object (?save) later analysis desired. Tidy records data.frame (limited information retained). Result:","code":"set_entrez_key(keyring::key_get(\"ENTREZ_KEY\")) cb_pm_res <- citedby_pubmed(id = c(\"26093607\", \"29590633\"), by_id = TRUE) cb_pm <- tidy_pub_records(cb_pm_res) #> # A tibble: 58 × 10 #> first_author title journal pub_date doi pmid pmcid cites pub_type #> #> 1 Amberger JS OMIM… Nuclei… 2019-01-08 10.1… 3044… PMC6… 2959… Journal… #> 2 Baldarelli RM The … Nuclei… 2021-01-08 10.1… 3310… PMC7… 2959… Journal… #> 3 Bello SM Dise… Dis Mo… 2018-03-12 10.1… 2959… PMC5… 2609… Journal… #> 4 Bradford YM Zebr… ILAR J 2017-07-01 10.1… 2883… PMC5… 2609… Journal… #> 5 Casaletto J Fede… Cell G… 2022-03-09 10.1… 3537… PMC8… 2609… Journal… #> 6 El-Sappagh S DMTO… J Biom… 2018-02-06 10.1… 2940… PMC5… 2609… Journal… #> 7 Elmore SA A Re… ILAR J 2018-12-01 10.1… 3047… PMC6… 2959… Journal… #> 8 Eppig JT Mous… ILAR J 2017-07-01 10.1… 2883… PMC5… 2609… Journal… #> 9 Fernández-To… Inte… Nat Co… 2022-09-09 10.1… 3608… PMC9… 2959… Journal… #> 10 Finke MT Inte… J Am M… 2019-02-01 10.1… 3062… PMC7… 2609… Journal… #> # … with 48 more rows, and 1 more variable: added_dt "},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"scopus-1","dir":"Articles","previous_headings":"Tutorial: Obtaining Use Records > Cited By","what":"Scopus","title":"Assessing Resource Use: Obtaining Use Records","text":"Obtain “cited ” records PubMed follows: Make Scopus API key institutional token available. Obtain records Scopus using resource publication titles, optionally include publication record cites specifying by_id = TRUE providing identifiers (id; titles long use identifiers). , PubMed IDs serve user-provided identifiers titles used actually obtain “cited ” records Scopus search API. full results returned list can saved disk R object (?save) later analysis desired. Tidy records data.frame (limited information retained). Result:","code":"set_scopus_keys( api_key = keyring::key_get(\"Elsevier_API\"), insttoken = keyring::key_get(\"Elsevier_insttoken\") ) cb_scopus_res <- citedby_scopus( title = c( \"The Disease Ontology: fostering interoperability between biological and clinical human disease-related data\", \"Disease Ontology: improving and unifying disease annotations across species\" ), by_id = TRUE, id = c(\"26093607\", \"29590633\") ) cb_scopus <- tidy_pub_records(cb_scopus_res) #> # A tibble: 92 × 10 #> first_author title journal pub_date doi pmid scopus_eid cites #> #> 1 Abburu S Ontolo… Internat… 2018-07-01 10.4… 2-s2.0-85… 2609… #> 2 Abburu S Ontolo… Geospati… 2019-01-01 10.4… 2-s2.0-85… 2609… #> 3 Al-Mubaid H Gene m… Journal … 2018-10-01 10.1… 3041… 2-s2.0-85… 2609… #> 4 Amberger JS OMIM.o… Nucleic … 2019-01-08 10.1… 3044… 2-s2.0-85… 2959… #> 5 Baldarelli RM The mo… Nucleic … 2021-01-08 10.1… 3310… 2-s2.0-85… 2959… #> 6 Barcellos Al… Ontolo… Journal … 2017-11-01 10.1… 2-s2.0-85… 2609… #> 7 Bello SM Diseas… DMM Dise… 2018-03-01 10.1… 2959… 2-s2.0-85… 2609… #> 8 Bradford Y Zebraf… ILAR Jou… 2017-07-01 10.1… 2883… 2-s2.0-85… 2609… #> 9 Chen F Identi… Patholog… 2018-12-01 10.1… 3047… 2-s2.0-85… 2609… #> 10 Chen F Identi… Journal … 2019-06-01 10.1… 3053… 2-s2.0-85… 2609… #> # … with 82 more rows, and 2 more variables: pub_type , #> # added_dt "},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"search","dir":"Articles","previous_headings":"Tutorial: Obtaining Use Records","what":"Search","title":"Assessing Resource Use: Obtaining Use Records","text":"can search PubMed PubMed Central searches use NCBI websites (e.g. MeSH terms PubMed). terms used carefully selected identify publications use resource, particular effort made avoid false positive results. example, publications use Disease Ontology can found doid \"disease-ontology.org\" search terms. quotes used within search, case \"disease-ontology.org\", must escaped (prevent confusion R) outer single quotes must used. Make Entrez Utilities API key available, necessary (already done tutorial doesn’t need done ). Search PubMed (search_pubmed()), PubMed Central (search_pmc()), /Europe PMC (use europepmc::epmc_search() function europepmc package) desired search terms. tutorial PubMed searched two different search terms; second primarily show quoted terms entered. Search results PubMed & PubMed Central include publication identifiers currently. Results doid search: large number results expected, considering creating web_history object using instead (documented vignette(\"rentrez_tutorial\", package = \"rentrez\")). Obtain publication details using unique PubMed IDs identified searches input (search results combined example). full results returned list can saved disk R object (?save) later analysis desired. Tidy records data.frame (limited information retained). Result:","code":"pm_doid <- search_pubmed(\"doid\") pm_full_nm <- search_pubmed(\"\\\"human disease ontology\\\"\") #> Entrez search result with 7 hits (object contains 7 IDs and no web_history object) #> Search term (as translated): \"doid\"[All Fields] #> [1] \"36509991\" \"35599774\" \"30441083\" \"27638616\" \"27577487\" \"25841438\" #> [7] \"22080554\" search_pmids <- unique(c(pm_doid$ids, pm_full_nm$ids)) pm_doid_res <- pubmed_summary(search_pmids) search_pm <- tidy_pub_records(pm_doid_res) #> # A tibble: 22 × 9 #> first_author title journal pub_date doi pmid pmcid pub_type #> #> 1 Althubaiti S Combinin… J Biomed… 2020-01-13 10.11… 3193… PMC6… Journal… #> 2 Fang H DcGO: da… Nucleic … 2013-01-01 10.10… 2316… PMC3… Journal… #> 3 Good BM Mining t… BMC Geno… 2011-12-13 10.11… 2216… PMC3… Journal… #> 4 Hoehndorf R Identify… Bioinfor… 2012-08-15 10.10… 2271… PMC3… Journal… #> 5 Hofer P Semi-Aut… Stud Hea… 2016-01-01 2757… Journal… #> 6 Jupp S Logical … J Biomed… 2012-04-24 10.11… 2254… PMC3… Journal… #> 7 Kibbe WA Disease … Nucleic … 2015-01-01 10.10… 2534… PMC4… Journal… #> 8 LePendu P Enabling… J Biomed… 2011-12-01 10.10… 2155… PMC3… Journal… #> 9 Maes M Aberrati… Front Ps… 2022-05-06 10.33… 3559… PMC9… Journal… #> 10 Marquet G Aligning… Stud Hea… 2006-01-01 1710… Journal… #> # … with 12 more rows, and 1 more variable: added_dt "},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"myncbi-collection","dir":"Articles","previous_headings":"Tutorial: Obtaining Use Records","what":"MyNCBI Collection","title":"Assessing Resource Use: Obtaining Use Records","text":"instructions create add MyNCBI collection refer “Collections” chapter NCBI help book. load collection R .utils follows: Open collection NCBI’s website web browser. Select “Send :”. Select “File” option “Summary (text)” format. Click “Create File” specify save (tutorial records ’s collection saved collection.txt vignette). Provide local path saved file read_pubmed_txt() .utils read & parse records. Currently, publication identifiers full citation returned data.frame. sufficient merging “cited ” search results, come downsides. Result: Optionally, use pubmed_summary() PubMed IDs get data format “cited ” search. full results returned list can saved disk R object (?save) later analysis desired. Tidy records data.frame (limited information retained). Result:","code":"myncbi_col <- read_pubmed_txt(\"collection.txt\") #> # A tibble: 5 × 5 #> n pmid pmcid doi citation #> #> 1 1 26609498 PMC4655879 1. Guha R, Nguyen … #> 2 2 26507285 PMC4622021 10.1093/database/bav104. 2. Collier N, Groz… #> 3 3 26507230 PMC4626853 10.1128/mBio.01263-15. 3. Ni Y, Li J, Pan… #> 4 4 26413258 PMC4582726 10.1186/s13326-015-0034-0. 4. Rabattu PY, Mas… #> 5 5 26320941 PMC4553261 10.3402/jev.v4.27497. 5. Subramanian SL,… myncbi_res <- pubmed_summary(myncbi_col$pmid) myncbi_pm <- tidy_pub_records(myncbi_res) #> # A tibble: 5 × 9 #> first_author title journal pub_date doi pmid pmcid pub_type #> #> 1 Collier N PhenoMin… Databas… 2015-10-27 10.10… 2650… PMC4… Journal… #> 2 Guha R Dealing … Curr Pr… 2012-09-01 10.10… 2660… PMC4… Journal… #> 3 Ni Y A Molecu… mBio 2015-10-27 10.11… 2650… PMC4… Journal… #> 4 Rabattu PY My Corpo… J Biome… 2015-09-24 10.11… 2641… PMC4… Journal… #> 5 Subramanian SL Integrat… J Extra… 2015-08-28 10.34… 2632… PMC4… Journal… #> # … with 1 more variable: added_dt "},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"matching-and-merging-records","dir":"Articles","previous_headings":"Tutorial: Obtaining Use Records","what":"Matching and Merging Records","title":"Assessing Resource Use: Obtaining Use Records","text":"one set records obtained, likely want match merge one datasets make review easier. .utils can match publication records using standard identifiers (identified matching column names; see ?match_citations details) currently provide merging, complex process due variation records. tutorial, procedure matching merging previously obtained record sets (“cited ”, search, MyNCBI collection records) single dataset shown. NOTE: practice, team usually keeps “cited ” search records separate feel makes review easier.","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"matching","dir":"Articles","previous_headings":"Tutorial: Obtaining Use Records > Matching and Merging Records","what":"Matching","title":"Assessing Resource Use: Obtaining Use Records","text":"two datasets matched, matched recursively (shown step #4 ). Choose starting record set number records. Use match_citations() add matching record numbers first set another set. identifiers used matching listed order used. Number records second set without matches first. Repeat steps 2 & 3 identify matches record set previously matched set.","code":"cb_pm <- dplyr::mutate(cb_pm, record_n = dplyr::row_number()) cb_scopus <- match_citations(cb_scopus, cb_pm, add_col = \"record_n\") #> Matching by types: #> * pmid #> * doi cb_scopus <- dplyr::mutate( cb_scopus, record_n = dplyr::if_else( !is.na(record_n), record_n, cumsum(is.na(record_n)) + max(cb_pm$record_n) ) ) # matching search search_pm <- match_citations(search_pm, cb_scopus, add_col = \"record_n\") |> dplyr::mutate( record_n = dplyr::if_else( !is.na(record_n), record_n, cumsum(is.na(record_n)) + max(cb_scopus$record_n) ) ) #> Matching by types: #> * pmid #> * doi # merging myncbi_collection myncbi_pm <- match_citations(myncbi_pm, search_pm, add_col = \"record_n\") |> dplyr::mutate( record_n = dplyr::if_else( !is.na(record_n), record_n, cumsum(is.na(record_n)) + max(search_pm$record_n) ) ) #> Matching by types: #> * pmid #> * pmcid #> * doi"},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"merging","dir":"Articles","previous_headings":"Tutorial: Obtaining Use Records > Matching and Merging Records","what":"Merging","title":"Assessing Resource Use: Obtaining Use Records","text":"Prior merging datasets recommend adding information indicate record obtained. can done mutate dplyr package. compound identifier column (source) added record set indicate approach database used obtain . Merge record sets. can done number ways perfect solution currently exists. tutorial, two separate ways demonstrated. first, records unique may slight data loss. second, zero data loss records may unique. 2A. Unique records, slight data loss: Combine record sets single data.frame, concatenate source information, drop duplicates. approach currently used team merge record sets later review. NOTE: Records added earlier preferentially retained. Result: matches PubMed Scopus “cited ” results, additional information record obtained Scopus may lost. 2B. data loss, possible duplication: Combine record sets specifying columns concatenate unique values collapse_col() (see ?collapse_col details). values columns , one retained. differ, concatenated. minimum, record number record set identifier columns collapsed. NOTE: collapse_col() collapse records identical non-collapsing columns. Even small differences punctuation case prevent record de-duplication favor preserving information. Records increasingly de-duplicated columns specified collapse care taken avoid merging truly distinct records. Result:","code":"# cited by record sets cb_pm <- dplyr::mutate(cb_pm, source = \"citedby-pubmed\") cb_scopus <- dplyr::mutate(cb_scopus, source = \"citedby-scopus\") # search record set search_pm <- dplyr::mutate(search_pm, source = \"search-pubmed\") # MyNCBI collection record set myncbi_pm <- dplyr::mutate(myncbi_pm, source = \"myncbi_collection-pubmed\") uniq_records <- dplyr::bind_rows(cb_pm, cb_scopus, search_pm, myncbi_pm) |> # concatenate source info dplyr::group_by(record_n) |> dplyr::mutate(source = paste0(unique(source), collapse = \"; \")) |> dplyr::ungroup() |> # drop duplicates dplyr::filter(duplicated(record_n)) uniq_records #> # A tibble: 56 × 13 #> first_author title journal pub_date doi pmid pmcid cites pub_type #> #> 1 Amberger JS OMIM… Nuclei… 2019-01-08 10.1… 3044… 2959… Journal… #> 2 Baldarelli RM The … Nuclei… 2021-01-08 10.1… 3310… 2959… Journal… #> 3 Bello SM Dise… DMM Di… 2018-03-01 10.1… 2959… 2609… Journal… #> 4 Bradford Y Zebr… ILAR J… 2017-07-01 10.1… 2883… 2609… Journal… #> 5 De Evsikova … The … Journa… 2019-06-01 10.3… 2959… Journal… #> 6 El-Sappagh S DMTO… Journa… 2018-02-06 10.1… 2940… 2609… Journal… #> 7 Elmore SA A Re… ILAR J… 2018-12-01 10.1… 3047… 2959… Journal… #> 8 Eppig JT Mous… ILAR J… 2017-07-01 10.1… 2883… 2609… Journal… #> 9 Fernández-To… Inte… Nature… 2022-12-01 10.1… 3608… 2959… Journal… #> 10 Finke MT Inte… Journa… 2019-02-01 10.1… 3062… 2609… Journal… #> # … with 46 more rows, and 4 more variables: added_dt , #> # record_n , source , scopus_eid complete_records <- dplyr::bind_rows(cb_pm, cb_scopus) |> collapse_col(.cols = c(record_n, source)) complete_records #> # A tibble: 150 × 13 #> first_author title journal pub_date doi pmid pmcid cites pub_type #> #> 1 Abburu S Onto… Intern… 2018-07-01 10.4… 2609… Journal… #> 2 Abburu S Onto… Geospa… 2019-01-01 10.4… 2609… Book|Bo… #> 3 Al-Mubaid H Gene… Journa… 2018-10-01 10.1… 3041… 2609… Journal… #> 4 Amberger JS OMIM… Nuclei… 2019-01-08 10.1… 3044… 2959… Journal… #> 5 Amberger JS OMIM… Nuclei… 2019-01-08 10.1… 3044… PMC6… 2959… Journal… #> 6 Baldarelli RM The … Nuclei… 2021-01-08 10.1… 3310… 2959… Journal… #> 7 Baldarelli RM The … Nuclei… 2021-01-08 10.1… 3310… PMC7… 2959… Journal… #> 8 Barcellos Al… Onto… Journa… 2017-11-01 10.1… 2609… Journal… #> 9 Bello SM Dise… DMM Di… 2018-03-01 10.1… 2959… 2609… Journal… #> 10 Bello SM Dise… Dis Mo… 2018-03-12 10.1… 2959… PMC5… 2609… Journal… #> # … with 140 more rows, and 4 more variables: added_dt , #> # record_n , source , scopus_eid "},{"path":"https://allenbaron.github.io/DO.utils/articles/obtain_use_records.html","id":"saving-merged-records","dir":"Articles","previous_headings":"Tutorial: Obtaining Use Records","what":"Saving Merged Records","title":"Assessing Resource Use: Obtaining Use Records","text":"Merged records can saved Google Sheet (shown) file (csv/Excel). NOTE: Google Sheet (proper case) Google’s .xlsx file equivalent. confused sheet (written lowercase ), tab within Google Sheet equivalent sheet within .xlsx file. save data existing Google Sheet (team’s preference): Copy URL Google Sheet data saved. Save data googlesheets4 package, optionally specifying sheet within Google Sheet save data . saving options, see documentation googlesheets4::write_sheet().","code":"library(googlesheets4) gs_url <- googlesheets4::write_sheet( data = uniq_records, ss = \"https://docs.google.com/spreadsheets/d/1soEnbGY2uVVDEC_xKOpjs9WQg-wQcLiXqmh_iJ-2qsM/\", sheet = \"new_tab\" )"},{"path":"https://allenbaron.github.io/DO.utils/articles/use-reticulate-python.html","id":"what-does-python-add","dir":"Articles","previous_headings":"","what":"What does Python add?","title":"Using DO.utils with reticulate and Python","text":".utils designed balance functionality ease use, goal reproducibility. functionality just available R, ’s less reproducible harder manage. Python fills gaps. Specifically using Python powers functions : R SPARQL engines require database management (virtuoso) work SPARQL 1.1 (rdflib). update data releases analyze unexpected changes files. Utilizing biopragmatics stack: bioregistry, biomappings, etc.; pyobo; INDRA labs’ GILDA","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/use-reticulate-python.html","id":"why-use-python-via-reticulate","dir":"Articles","previous_headings":"","what":"Why use Python via reticulate?","title":"Using DO.utils with reticulate and Python","text":"Generally, R-python connection allows data integration R data frames can easily managed, explored, analyzed. specifically, reticulate help manage Python python module dependencies simplify user setup/use.","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/use-reticulate-python.html","id":"how-to-use-python-dependent-do-utils-functions","dir":"Articles","previous_headings":"","what":"How to use python-dependent DO.utils functions?","title":"Using DO.utils with reticulate and Python","text":"functions work standard R functions. cases internal data extractor functions written eliminate need non-standard user data munging.","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/use-reticulate-python.html","id":"python-setup","dir":"Articles","previous_headings":"How to use python-dependent DO.utils functions?","what":"Python Setup","title":"Using DO.utils with reticulate and Python","text":"Although tested yet, use reticulate handle installation python /python modules automatically require little user input. default attempt identify use python already installed. work, reticulate install python needed modules via miniconda.","code":""},{"path":"https://allenbaron.github.io/DO.utils/articles/use-reticulate-python.html","id":"customization","dir":"Articles","previous_headings":"How to use python-dependent DO.utils functions? > Python Setup","what":"Customization","title":"Using DO.utils with reticulate and Python","text":"user control can achieved installation (like using pip venv instead miniconda) using reticulate install python create virtual environment calling library(.utils) first time. basic procedure execute following: Note Virtual Environments reticulate can create conda environments venv/virtualenv virtual environments. Non-conda virtual environment options described briefly similar options approaches available conda environments via reticulate. r-reticulate default virtual environment name promoted developers reticulate packages depend reticulate, goals 1) promoting interoperability packages depend reticulate python 2) better manage python module dependencies, use single virtual environment. Alternatives default environment can specified modifying first argument envname virtualenv_create(). name (without slashes) create virtual environment name default location (see virtualenv_root()); relative absolute path (slashes) create virtual environment specified directory, can nice want python virtual environment associated specific project. Note Python Module Installation possible specify python modules install time virtual environment created later activating virtual environment executing virtualenv_install(). .utils dependencies desired, necessary first execution library(.utils) active virtual environment install python module dependencies .utils automatically. python module need installed user, modules used .utils can found “Config/reticulate” section ’s DESCRIPTION file.","code":"library(reticulate) # installs with DO.utils py_version <- \"3.9\" # or whatever version you prefer venv_name <- \"r-reticulate\" py_path <- install_python(py_version) virtualenv_create(venv_name, py_path, version = py_version)"},{"path":"https://allenbaron.github.io/DO.utils/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"J. Allen Baron. Maintainer.","code":""},{"path":"https://allenbaron.github.io/DO.utils/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Baron JA (2024). .utils: Public Resource Utilities Designed /Disease Ontology. R package version 0.3.1.9000, https://diseaseontology.github.io/.utils/.","code":"@Manual{, title = {DO.utils: Public Resource Utilities Designed by/for the Disease Ontology}, author = {J. Allen Baron}, year = {2024}, note = {R package version 0.3.1.9000}, url = {https://diseaseontology.github.io/DO.utils/}, }"},{"path":"https://allenbaron.github.io/DO.utils/index.html","id":"doutils","dir":"","previous_headings":"","what":"Public Resource Utilities Designed by/for the Disease Ontology","title":"Public Resource Utilities Designed by/for the Disease Ontology","text":".utils R package primarily designed support operations Human Disease Ontology (; disease-ontology.org) number capabilities useful broader scientific community : brief summary can found Assessing Resource Use (Bibliometrics/Scientometrics). detailed description refer “Assessing Resource Use: Obtaining Use Records” tutorial included package (vignette(\"obtain_use_records\", package = \".utils\")) peer-reviewed article: J. Allen Baron, Lynn M Schriml, Assessing resource use: case study Human Disease Ontology, Database, Volume 2023, 2023, baad007. PMID:36856688, https://doi.org/10.1093/database/baad007. Simplifying common R tasks (see General Utilities section). Operations specific use, analysis, maintenance, improvement ontology described briefly Improvement & Analysis section. .utils work progress. interested contributing, please reach . Note goal work collaboratively make functions broadly useful possible.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/index.html","id":"installing-prerequisites","dir":"","previous_headings":"Installation","what":"Installing Prerequisites","title":"Public Resource Utilities Designed by/for the Disease Ontology","text":"use .utils must first install R CRAN. Installing RStudio can also useful required. devtools package also required can obtain executing install.packages(\"devtools\") within R.","code":""},{"path":"https://allenbaron.github.io/DO.utils/index.html","id":"installing-doutils","dir":"","previous_headings":"Installation","what":"Installing DO.utils","title":"Public Resource Utilities Designed by/for the Disease Ontology","text":".utils can installed Github persistent, open-access repository hosted Zenodo. install Github, run devtools::install_github(\"DiseaseOntology/.utils\") within R. install Zenodo, first download .utils (DOI: 10.5281/zenodo.7467668) local machine. , within R run devtools::install_git(), replacing local path .utils.","code":""},{"path":"https://allenbaron.github.io/DO.utils/index.html","id":"assess_use","dir":"","previous_headings":"","what":"Assessing Resource Use & Impact (Bibliometrics/Scientometrics)","title":"Public Resource Utilities Designed by/for the Disease Ontology","text":".utils includes functions assist assessing resource used measuring impact use. functions may broadly useful anyone trying accomplish tasks, much smaller number specific measuring ’s impact. Components broadly useful resource can: Citations one article(s) published resource (“cited ”; citedby_pubmed() citedby_scopus()). PubMed PubMed Central (PMC) search results (search_pubmed() search_pmc()). MyNCBI collection (read_pubmed_txt()). Identify matching publication records different record sets (must formatted data.frames; see match_citations()). interested Bioconductor package download statistics,get_bioc_pkg_stats() may useful, measures impact designed specifically mind (e.g. count_alliance_records()).","code":""},{"path":"https://allenbaron.github.io/DO.utils/index.html","id":"do_specific","dir":"","previous_headings":"","what":"DO Improvement & Analysis","title":"Public Resource Utilities Designed by/for the Disease Ontology","text":".utils provides following capabilities used improvement analysis: Git repo management, iterative execution across git repository tags, SPARQL queries implemented wrappers (DOrepo(), owl_xml()) around related pyDOID python package. Statistics plots (see https://disease-ontology.org//statistics) Semi-automated html rendering build various pages including Use Cases, Imports, Slims, new Symptom Ontology Pathogen Transmission Ontology pages. Definition source URL validation. Prediction mappings/cross-references resources & , via PyOBO/GILDA approximate string matching. Simplified system installation OBO tool ROBOT.","code":""},{"path":"https://allenbaron.github.io/DO.utils/index.html","id":"general","dir":"","previous_headings":"","what":"General Utilities","title":"Public Resource Utilities Designed by/for the Disease Ontology","text":".utils includes general utilities make programming R easier including, example, assist : Type/content testing – is_blank(), is_positive(), is_vctr_or_df(), all_duplicated() Vector--scalar conversion – collapse_to_string(), unique_if_invariant() Data reduction – collapse_col(), drop_blank() Value replacement – replace_null(), replace_blank() Sorting (specified priority) Dates – cur_yr(), today_datestamp() Temporary bug workarounds – restore_names()","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/DO.utils-package.html","id":null,"dir":"Reference","previous_headings":"","what":"DO.utils: Public Resource Utilities Designed by/for the Disease Ontology — DO.utils-package","title":"DO.utils: Public Resource Utilities Designed by/for the Disease Ontology — DO.utils-package","text":"Generally useful tools assess use public resources scientific literature (\"cited \", search, etc.) simplify common R tasks, along tools specifically designed analysis improvement Human Disease Ontology (; https://disease-ontology.org).","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/DO_colors.html","id":null,"dir":"Reference","previous_headings":"","what":"Human Disease Ontology Official Colors — DO_colors","title":"Human Disease Ontology Official Colors — DO_colors","text":"Named, hexadecimal colors official use.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/DO_colors.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Human Disease Ontology Official Colors — DO_colors","text":"","code":"DO_colors"},{"path":"https://allenbaron.github.io/DO.utils/reference/DO_colors.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Human Disease Ontology Official Colors — DO_colors","text":"named, vector 17 colors hexadecimal format, including: main teal-ish colors: default, mid, light, website, websafe saturated versions (better plotting): sat, sat_mid, sat_light older, infrequently used orange colors: orange, orange_mid, orange_light NEW lavender-ish accent colors: accent1, accent1_mid, accent1_light NEW yellow-ish accent colors: accent2, accent2_mid, accent2_light","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/DO_colors.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Human Disease Ontology Official Colors — DO_colors","text":"Updated J. Allen Baron 2023-04-05.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/DOrepo.html","id":null,"dir":"Reference","previous_headings":"","what":"Instantiate a DO Repository — DOrepo","title":"Instantiate a DO Repository — DOrepo","text":"Instantiate DOrepo object pyDOID package (powered reticulate).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/DOrepo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Instantiate a DO Repository — DOrepo","text":"","code":"DOrepo(path)"},{"path":"https://allenbaron.github.io/DO.utils/reference/DOrepo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Instantiate a DO Repository — DOrepo","text":"path local path HumanDiseaseOntology git repository, string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/DOrepo.html","id":"classes-amp-methods","dir":"Reference","previous_headings":"","what":"Classes & Methods","title":"Instantiate a DO Repository — DOrepo","text":"DOrepo class inherits methods & subclasses GitPython.Repo class, along following: DOrepo$tag_iterate(function, start = [str], end = [str]): Iterate releases (tags) start end executing function . start end optional; unspecified first last release/tag repo assumed. DOrepo$capture_head(): Capture current head repo; useful restoring state git checkout(s). USE: assigned variable x, restore state x$checkout(). DOrepo$doid DOrepo$doid_merged: Access doid.owl doid-merged.owl files repository. inherit pyDOID.owl.xml class, see owl_xml() methods. NOTE , unlike owl_xml(), doid.owl doid-merged.owl loaded memory upon instantiation DOrepo, loaded automatically first $query() executed manually via $load().","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/access_DOrepo.html","id":null,"dir":"Reference","previous_headings":"","what":"Access DOrepo (INTERNAL) — access_DOrepo","title":"Access DOrepo (INTERNAL) — access_DOrepo","text":"Access x 'pyDOID.repo.DOrepo' confirming class, already instantiated, instantiating object given path.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/access_DOrepo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Access DOrepo (INTERNAL) — access_DOrepo","text":"","code":"access_DOrepo(x)"},{"path":"https://allenbaron.github.io/DO.utils/reference/access_DOrepo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Access DOrepo (INTERNAL) — access_DOrepo","text":"x 'pyDOID.repo.DOrepo' object path local copy HumanDiseaseOntology repository.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/access_owl_xml.html","id":null,"dir":"Reference","previous_headings":"","what":"Access OWL/RDF XML (INTERNAL) — access_owl_xml","title":"Access OWL/RDF XML (INTERNAL) — access_owl_xml","text":"Access x 'pyDOID.owl.xml' confirming class, already instantiated, instantiating object given path.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/access_owl_xml.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Access OWL/RDF XML (INTERNAL) — access_owl_xml","text":"","code":"access_owl_xml(x)"},{"path":"https://allenbaron.github.io/DO.utils/reference/access_owl_xml.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Access OWL/RDF XML (INTERNAL) — access_owl_xml","text":"x 'pyDOID.owl.xml' object path OWL/RDF XML file can instantiated object owl_xml().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/all_duplicated.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify all duplicates — all_duplicated","title":"Identify all duplicates — all_duplicated","text":"Built base::duplicated() , unlike base::duplicated(), identifies duplicates including first occurrence.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/all_duplicated.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify all duplicates — all_duplicated","text":"","code":"all_duplicated(x, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/all_duplicated.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify all duplicates — all_duplicated","text":"x vector data frame array NULL. ... arguments particular methods.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/append_empty_col.html","id":null,"dir":"Reference","previous_headings":"","what":"Append Empty Columns — append_empty_col","title":"Append Empty Columns — append_empty_col","text":"Appends empty columns (value = NA) data.frame.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/append_empty_col.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Append Empty Columns — append_empty_col","text":"","code":"append_empty_col(df, col, order = FALSE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/append_empty_col.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Append Empty Columns — append_empty_col","text":"df data.frame. col name(s) one columns desired final data.frame, character vector. names currently data.frame added empty columns; present remain unchanged. order Whether reorder data.frame match order col, boolean (default: FALSE). FALSE empty columns added right. order = TRUE, col used specify column order. Thus, addition names empty columns append, col must include column names df. append_empty_col() subset/select columns.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/append_to_url.html","id":null,"dir":"Reference","previous_headings":"","what":"Append to URL — append_to_url","title":"Append to URL — append_to_url","text":"Append one value(s) corresponding URL.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/append_to_url.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Append to URL — append_to_url","text":"","code":"append_to_url(x, url, sep = \"\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/append_to_url.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Append to URL — append_to_url","text":"x Value(s) append, character vector. url One URLs URL names recognized package, character vector. one value provided, recycled; otherwise length url x must match. See get_url() recognized base URL names. sep One separators use url x, character vector. one value provided (e.g. default = \"\"), recycled; otherwise length sep x must match. url ends corresponding sep, additional sep added.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/append_to_url.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Append to URL — append_to_url","text":"URL validation performed.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/append_to_url.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Append to URL — append_to_url","text":"","code":"append_to_url(\"blah\", \"http://fake.url.com/\") #> [1] \"http://fake.url.com/blah\" # separator can be specified and will not be duplicated append_to_url(\"blah\", \"http://fake.url.com/\", sep = \"?q=\") #> [1] \"http://fake.url.com/?q=blah\" append_to_url(\"blah\", \"http://fake.url.com/\", sep = \"/\") #> [1] \"http://fake.url.com/blah\" # vectorized w/recycling append_to_url(c(\"blah\", \"ugh\"), \"http://fake.url.com\", sep = \"/\") #> [1] \"http://fake.url.com/blah\" \"http://fake.url.com/ugh\" append_to_url( c(\"blah\", \"ugh\"), c(\"http://fake.url.com\", \"https://madeup.url.com/\"), sep = \"/\" ) #> [1] \"http://fake.url.com/blah\" \"https://madeup.url.com/ugh\" append_to_url( c(\"blah\", \"ugh\"), c(\"http://fake.url.com\", \"https://madeup.url.com/\"), sep = c(\"/\", \"?q=\") ) #> [1] \"http://fake.url.com/blah\" \"https://madeup.url.com/?q=ugh\" # missing values in `x` or `url` are preserved append_to_url( c(NA, \"uhhh\"), c(\"http://fake.url.com\", \"https://this.is.it.com/\"), sep = \"/\" ) #> [1] NA \"https://this.is.it.com/uhhh\" append_to_url( c(NA, \"uhhh\"), c(\"http://fake.url.com\", NA_character_), c(\"=\", NA) ) #> [1] NA NA # `sep` must not be missing for non-missing values of `x` and `url` try( append_to_url( c(NA, \"uhhh\"), c(\"http://fake.url.com\", \"https://this.is.it.com/\"), sep = c(\"/\", NA) ) ) #> Error in purrr::pmap_chr(list(url, x, sep, ignore_sep), function(.u, .x, : #> ℹ In index: 2. #> Caused by error in `paste()`: #> ! invalid separator"},{"path":"https://allenbaron.github.io/DO.utils/reference/as_tibble.esummary_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert esummary Object into Tibble — as_tibble.esummary_list","title":"Convert esummary Object into Tibble — as_tibble.esummary_list","text":"Converts esummary object tibble.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/as_tibble.esummary_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert esummary Object into Tibble — as_tibble.esummary_list","text":"","code":"# S3 method for esummary_list as_tibble(x, ...) # S3 method for esummary_list_nested as_tibble(x, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/as_tibble.esummary_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert esummary Object into Tibble — as_tibble.esummary_list","text":"x esummary object (esummary_list esummary_list_nested) ... Ignored; included extensibility.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/as_tibble.esummary_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert esummary Object into Tibble — as_tibble.esummary_list","text":"untidy, esummary_id input identifier. esummary_list_nested objects additional cites column.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/as_tibble.esummary_list.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Convert esummary Object into Tibble — as_tibble.esummary_list","text":"single inputs rentrez::entrez_summary(), always_return_list must TRUE.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/as_tibble.scopus_search.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert scopus_search Object into Tibble — as_tibble.scopus_search","title":"Convert scopus_search Object into Tibble — as_tibble.scopus_search","text":"Converts scopus_search object tibble.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/as_tibble.scopus_search.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert scopus_search Object into Tibble — as_tibble.scopus_search","text":"","code":"# S3 method for scopus_search as_tibble(x, ...) # S3 method for scopus_search_list as_tibble(x, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/as_tibble.scopus_search.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert scopus_search Object into Tibble — as_tibble.scopus_search","text":"x scopus_search scopus_search_list object. ... Ignored; included extensibility.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/as_tibble.scopus_search.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert scopus_search Object into Tibble — as_tibble.scopus_search","text":"untidy tibble. scopus_search_list objects additional cites column.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/batch_id_converter.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert IDs in Batches — batch_id_converter","title":"Convert IDs in Batches — batch_id_converter","text":"Batches inputs convert number IDs using PubMed Centrals ID converter API, via rcrossref::id_converter. Input missing values unique.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/batch_id_converter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert IDs in Batches — batch_id_converter","text":"","code":"batch_id_converter(x, type = NULL, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/batch_id_converter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert IDs in Batches — batch_id_converter","text":"x (character) One : doi, pmid, pmcid, manuscript id, see examples. required. type (character) one doi, pmid, pmcid, manuscript id ... Curl args passed crul::verb-GET","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/build_hyperlink.html","id":null,"dir":"Reference","previous_headings":"","what":"Build Hyperlinks — build_hyperlink","title":"Build Hyperlinks — build_hyperlink","text":"Builds hyperlinks Google Sheets, Excel, HTML appending value end base url.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/build_hyperlink.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build Hyperlinks — build_hyperlink","text":"","code":"build_hyperlink(x, url, as, ..., sep = \"\", text = x, preserve = \"text\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/build_hyperlink.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Build Hyperlinks — build_hyperlink","text":"x Value(s) append, character vector. url One URLs URL names recognized package, character vector. one value provided, recycled; otherwise length url x must match. See get_url() recognized base URL names. format use hyperlink, string; one \"gs\" (Google Sheet), \"xlsx\" (Excel), \"html\". ... (= \"html\") One name-value pairs html <> attributes. sep One separators use url x, character vector. one value provided (e.g. default = \"\"), recycled; otherwise length sep x must match. url ends corresponding sep, additional sep added. text (OPTIONAL) text display link, character vector. default uses x text. NULL, full URL serve text. string, value used text hyperlink. preserve value return url NA, string. One \"url\" \"text\" (default). Note default build_hyperlink() opposite default format_hyperlink() text provided default.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/build_hyperlink.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Build Hyperlinks — build_hyperlink","text":"","code":"build_hyperlink( x = \"DiseaseOntology\", url = \"github\", as = \"html\", text = \"A hyperlink!\" ) #> [1] \"A hyperlink!<\/a>\" # create CURIE links by passing local identifiers as `x` and prefixes as `url` build_hyperlink( x = c(\"4\", \"D004194\"), url = c(\"DOID\", \"MESH\"), as = \"gs\", text = c(\"DOID:4\", \"MESH:D004194\") ) #> #> [1] =HYPERLINK(\"http://purl.obolibrary.org/obo/DOID_4\", \"DOID:4\") #> [2] =HYPERLINK(\"https://meshb.nlm.nih.gov/record/ui?ui=D004194\", \"MESH:D004194\") # provide internal URL names or direct URLs to append to # BE SURE to use `preserve = 'url'` when text is `NA`. build_hyperlink( x = c(\"4\", \"fakeID\"), url = c(\"DOID\", \"https://madeup.url.com\"), as = \"gs\", text = c(\"DOID:4\", NA), sep = c(\"_\", \"/\"), preserve = \"url\" ) #> #> [1] =HYPERLINK(\"http://purl.obolibrary.org/obo/DOID_4\", \"DOID:4\") #> [2] =HYPERLINK(\"https://madeup.url.com/fakeID\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/char_val_predicates.html","id":null,"dir":"Reference","previous_headings":"","what":"Character value predicates — char_val_predicates","title":"Character value predicates — char_val_predicates","text":"value predicates designed identify common values appear character vectors.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/char_val_predicates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Character value predicates — char_val_predicates","text":"","code":"is_blank(x) is_missing(x)"},{"path":"https://allenbaron.github.io/DO.utils/reference/char_val_predicates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Character value predicates — char_val_predicates","text":"x vector tested","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/char_val_predicates.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Character value predicates — char_val_predicates","text":"is_blank() identifies \"\" whitespace length is_missing() identifies NA's blanks","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/chunk.html","id":null,"dir":"Reference","previous_headings":"","what":"Partition vectors — chunk","title":"Partition vectors — chunk","text":"partition divides vectors partitions specified length returns list. x completely divisible n last list item less n elements. Similar functions may named \"chunk\".","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/chunk.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Partition vectors — chunk","text":"","code":"partition(x, n)"},{"path":"https://allenbaron.github.io/DO.utils/reference/chunk.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Partition vectors — chunk","text":"x vector. n integer specifying instances per partition.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/chunk.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Partition vectors — chunk","text":"list x/n items (rounded ) containing n elements x. x %% n != 0 last list item < n elements x.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/chunk.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Partition vectors — chunk","text":"","code":"partition(letters[1:10], 5) #> $`0` #> [1] \"a\" \"b\" \"c\" \"d\" \"e\" #> #> $`1` #> [1] \"f\" \"g\" \"h\" \"i\" \"j\" #> partition(1:10, 3) #> $`0` #> [1] 1 2 3 #> #> $`1` #> [1] 4 5 6 #> #> $`2` #> [1] 7 8 9 #> #> $`3` #> [1] 10 #>"},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_pmid.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Cited By PMIDs from PubMed — citedby_pmid","title":"Get Cited By PMIDs from PubMed — citedby_pmid","text":"List PubMed IDs publications citing specified web_history id, potentially split by_id. citedby_pmid() can handle cases number input IDs >200 automatically (unlike rentrez::entrez_link).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_pmid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Cited By PMIDs from PubMed — citedby_pmid","text":"","code":"citedby_pmid(id = NULL, web_history = NULL, by_id = FALSE, config = NULL, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_pmid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Cited By PMIDs from PubMed — citedby_pmid","text":"id PubMed IDs retrieve \"cited \", character vector. web_history Entrez History object used instead id, generated modified rentrez::entrez_post() fork https://github.com/allenbaron/rentrez (see NOTE); used \"cited \" information desired >200 IDs. by_id Whether split \"cited \" publications ID cite, boolean (default: TRUE); FALSE returns unified list unique cited publications without reference ID cite. config Configuration options passed httr::GET(). ... Additional terms add request, see NCBI documentation ESearch complete list.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_pmid.html","id":"note","dir":"Reference","previous_headings":"","what":"NOTE","title":"Get Cited By PMIDs from PubMed — citedby_pmid","text":"rentrez fork https://github.com/allenbaron/rentrez implements pull request #174, yet implemented CRAN rentrez required rentrez::entrez_post() function fully.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_pubmed.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Cited By List from PubMed — citedby_pubmed","title":"Get Cited By List from PubMed — citedby_pubmed","text":"List PubMed publications citing specified id, optionally split by_id.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_pubmed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Cited By List from PubMed — citedby_pubmed","text":"","code":"citedby_pubmed( id = NULL, web_history = NULL, by_id = FALSE, no_result = \"warning\", config = NULL, version = \"2.0\", retmode = \"xml\", ... )"},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_pubmed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Cited By List from PubMed — citedby_pubmed","text":"id PubMed IDs retrieve \"cited \", character vector. web_history Entrez History object used instead id, generated modified rentrez::entrez_post() fork https://github.com/allenbaron/rentrez (see NOTE); used \"cited \" information desired >200 IDs. by_id Whether split \"cited \" publications ID cite, boolean (default: TRUE); FALSE returns unified list unique cited publications without reference ID cite. no_result type condition signaled PubMed results exist response; one \"error\", \"warning\" (default), \"message\" \"none\". config Configuration options passed httr::GET(). version Argument included flexibility, best left defaults set; see rentrez::entrez_summary() details. retmode \"xml\" (default) \"json\"; \"xml\" preferred higher response limit. default opposite rentrez::entrez_summary() default. ... Additional terms add request, see NCBI documentation ESearch complete list.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_scopus.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Cited By List from Scopus — citedby_scopus","title":"Get Cited By List from Scopus — citedby_scopus","text":"List Scopus publications citing specified title, optionally split by_id.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_scopus.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Cited By List from Scopus — citedby_scopus","text":"","code":"citedby_scopus( title, by_id = FALSE, id = NULL, api_key = NULL, insttoken = NULL, no_result = \"warning\", view = \"STANDARD\", start = 0, count = NULL, max_count = 20000, headers = NULL, wait_time = 0, verbose = FALSE, ... )"},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_scopus.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Cited By List from Scopus — citedby_scopus","text":"title Publication title(s) used Scopus Search API REFTITLE() query, character vector; see https://dev.elsevier.com/sc_search_tips.html. by_id Whether split \"cited \" publications ID cite, boolean (default: TRUE); FALSE returns unified list unique cited publications without reference ID cite. id Unique IDs used identify title input, character vector length title; REQUIRED by_id = TRUE, otherwise ignored. api_key API Key Elsevier insttoken Elsevier institutional token (REQUIRED). See vignette(\"obtain_use_records\") details. no_result type condition signaled Scopus results exist response; one \"error\", \"warning\" (default), \"message\" \"none\". view type view give, see https://api.elsevier.com/documentation/ScopusSearchAPI.wadl start records start gathering count number records retrieve (200 STANDARD, 25 COMPLETE views, see https://dev.elsevier.com/api_key_settings.html). max_count Maximum count records returned. headers Additional headers added httr::add_headers(). wait_time time seconds wait across consecutive requests single search (records > 25) verbose Print diagnostic messages ... Named arguments passed httr::GET(). Available arguments listed Scopus Search Documentation: API Specification.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/citedby_scopus.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Cited By List from Scopus — citedby_scopus","text":"by_id = FALSE, list result Scopus Search API (produced rscopus::scopus_search). by_id = TRUE, id named list scopus_search result lists.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col.html","id":null,"dir":"Reference","previous_headings":"","what":"Collapse Column(s) — collapse_col","title":"Collapse Column(s) — collapse_col","text":"Collapses values column(s) specified, concatenating unique values columns record (record defined unique row including columns specified .cols).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Collapse Column(s) — collapse_col","text":"","code":"collapse_col(df, .cols, delim = \"|\", method = \"unique\", na.rm = FALSE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Collapse Column(s) — collapse_col","text":"df data.frame .cols name column data.frame collapse delim delimiter place vector elements (default: \"|\"). method string identifying function use; one \"unique\", \"first\", \"last\". na.rm logical scalar indicating whether NA values removed (default: FALSE).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Collapse Column(s) — collapse_col","text":"data.frame specified columns collapsed. Also NOTE following: Collapsed columns converted character. Rows reordered unique combination columns collapsed (due dplyr::group_by() use).","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Collapse Column(s) — collapse_col","text":"","code":"cc_df <- tibble::tibble( x = c(1, 2, 3, 3, 4, 4, 4), y = c(\"a\", \"a\", \"b\", \"b\", \"c\", \"c\", \"e\"), z = c(\"Z\", \"Y\", \"X\", \"X\", \"W\", \"V\", \"U\") ) cc_df #> # A tibble: 7 × 3 #> x y z #> #> 1 1 a Z #> 2 2 a Y #> 3 3 b X #> 4 3 b X #> 5 4 c W #> 6 4 c V #> 7 4 e U # completely duplicated rows (3-4) are collapsed with any .cols specified collapse_col(cc_df, y) #> # A tibble: 6 × 3 #> x y z #> #> 1 1 a Z #> 2 2 a Y #> 3 3 b X #> 4 4 e U #> 5 4 c V #> 6 4 c W collapse_col(cc_df, x) #> # A tibble: 6 × 3 #> x y z #> #> 1 2 a Y #> 2 1 a Z #> 3 3 b X #> 4 4 c V #> 5 4 c W #> 6 4 e U collapse_col(cc_df, z) #> # A tibble: 5 × 3 #> x y z #> #> 1 1 a Z #> 2 2 a Y #> 3 3 b X #> 4 4 c W|V #> 5 4 e U collapse_col(cc_df, c(x, z)) #> # A tibble: 4 × 3 #> x y z #> #> 1 1|2 a Z|Y #> 2 3 b X #> 3 4 c W|V #> 4 4 e U"},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col_flex.html","id":null,"dir":"Reference","previous_headings":"","what":"Collapse Column(s) Flexibly — collapse_col_flex","title":"Collapse Column(s) Flexibly — collapse_col_flex","text":"Collapses values column(s) specified using defined method record, record defined unique observation comprised columns specified collapse).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col_flex.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Collapse Column(s) Flexibly — collapse_col_flex","text":"","code":"collapse_col_flex(df, ..., method = \"unique\", delim = \"|\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col_flex.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Collapse Column(s) Flexibly — collapse_col_flex","text":"df data.frame ... Column-method pairs specifying method use column collapsed; column names can bare variables strings, methods must strings, e.g. column_name = method. method string identifying function use; one \"unique\", \"first\", \"last\" delim delimiter place vector elements (default: \"|\").","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col_flex.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Collapse Column(s) Flexibly — collapse_col_flex","text":"data.frame specified columns collapsed. Also NOTE following: methods, rows reordered unique combination columns collapsed (due dplyr::group_by() use). _For \"unique\" method, collapsed columns converted character.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_col_flex.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Collapse Column(s) Flexibly — collapse_col_flex","text":"","code":"cc_df <- tibble::tibble( x = c(1, 2, 3, 3, 4, 4, 4), y = c(\"a\", \"a\", \"b\", \"b\", \"c\", \"c\", \"e\"), z = c(\"Z\", \"Y\", \"X\", \"X\", \"W\", \"V\", \"U\") ) cc_df #> # A tibble: 7 × 3 #> x y z #> #> 1 1 a Z #> 2 2 a Y #> 3 3 b X #> 4 3 b X #> 5 4 c W #> 6 4 c V #> 7 4 e U # completely duplicated rows (3-4) are collapsed with any column(s) specified collapse_col_flex(cc_df, y) #> # A tibble: 6 × 3 #> x y z #> #> 1 1 a Z #> 2 2 a Y #> 3 3 b X #> 4 4 e U #> 5 4 c V #> 6 4 c W # individual columns collapse_col_flex(cc_df, z, method = \"unique\") #> # A tibble: 5 × 3 #> x y z #> #> 1 1 a Z #> 2 2 a Y #> 3 3 b X #> 4 4 c W|V #> 5 4 e U collapse_col_flex(cc_df, z, method = \"first\") #> # A tibble: 5 × 3 #> x y z #> #> 1 1 a Z #> 2 2 a Y #> 3 3 b X #> 4 4 c W #> 5 4 e U collapse_col_flex(cc_df, z, method = \"last\") #> # A tibble: 5 × 3 #> x y z #> #> 1 1 a Z #> 2 2 a Y #> 3 3 b X #> 4 4 c V #> 5 4 e U # multiple columns can be collapsed using the same method collapse_col_flex(cc_df, x, z, method = \"unique\") #> # A tibble: 4 × 3 #> x y z #> #> 1 1|2 a Z|Y #> 2 3 b X #> 3 4 c W|V #> 4 4 e U collapse_col_flex(cc_df, x, z, method = \"first\") #> # A tibble: 4 × 3 #> x y z #> #> 1 1 a Z #> 2 3 b X #> 3 4 c W #> 4 4 e U collapse_col_flex(cc_df, x, z, method = \"last\") #> # A tibble: 4 × 3 #> x y z #> #> 1 2 a Y #> 2 3 b X #> 3 4 c V #> 4 4 e U # ...or using different methods collapse_col_flex(cc_df, x = \"unique\", z = \"unique\") #> # A tibble: 4 × 3 #> x y z #> #> 1 1|2 a Z|Y #> 2 3 b X #> 3 4 c W|V #> 4 4 e U collapse_col_flex(cc_df, x = \"first\", z = \"unique\") #> # A tibble: 4 × 3 #> x y z #> #> 1 1 a Z|Y #> 2 3 b X #> 3 4 c W|V #> 4 4 e U collapse_col_flex(cc_df, x = \"first\", z = \"last\") #> # A tibble: 4 × 3 #> x y z #> #> 1 1 a Y #> 2 3 b X #> 3 4 c V #> 4 4 e U"},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_to_string.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a String from Inputs — collapse_to_string","title":"Create a String from Inputs — collapse_to_string","text":"Creates single string one inputs value separated delim.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_to_string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a String from Inputs — collapse_to_string","text":"","code":"collapse_to_string(..., delim = \"|\", na.rm = FALSE, unique = FALSE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_to_string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a String from Inputs — collapse_to_string","text":"... One R objects (vector, list, data.frame, etc). delim delimiter place vector elements (default: \"|\"). na.rm logical scalar indicating whether NA values removed (default: FALSE). unique Whether include unique values (across inputs), logical.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/collapse_to_string.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a String from Inputs — collapse_to_string","text":"","code":"# collapses individual vectors collapse_to_string(1:10) #> [1] \"1|2|3|4|5|6|7|8|9|10\" # input order is preserved collapse_to_string(1:2, letters[1:2]) #> [1] \"1|2|a|b\" collapse_to_string(data.frame(x = 1:2, y = letters[1:2])) #> [1] \"1|2|a|b\" # factor levels are captured (instead of numeric placeholders) collapse_to_string(factor(letters[1:2]), \"c\") #> [1] \"a|b|c\" # unique applies across all inputs, order is determined by first appearance collapse_to_string(c(3, 1, 2), 1:4, unique = FALSE) #> [1] \"3|1|2|1|2|3|4\" collapse_to_string(c(3, 1, 2), 1:4, unique = TRUE) #> [1] \"3|1|2|4\""},{"path":"https://allenbaron.github.io/DO.utils/reference/confine_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert (Nested) List to/from Character Vector — confine_list","title":"Convert (Nested) List to/from Character Vector — confine_list","text":"functions convert (nested) list character vector length, preserving restoring list structure values using JSON strings. perform flattening simplification JSON strings verbose.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/confine_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert (Nested) List to/from Character Vector — confine_list","text":"","code":"confine_list(.list) release_list(.json_chr)"},{"path":"https://allenbaron.github.io/DO.utils/reference/confine_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert (Nested) List to/from Character Vector — confine_list","text":".list (nested) list. .json_chr character vector containing JSON representation (nested) list elements top level.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/convert_to_ofn.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Ontology Files to OFN — convert_to_ofn","title":"Convert Ontology Files to OFN — convert_to_ofn","text":"Converts ontology files OWL functional syntax (OFN) using ROBOT (http://robot.obolibrary.org/).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/convert_to_ofn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Ontology Files to OFN — convert_to_ofn","text":"","code":"convert_to_ofn(path, out_path = NULL, gzip = FALSE, .robot_path = NULL)"},{"path":"https://allenbaron.github.io/DO.utils/reference/convert_to_ofn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Ontology Files to OFN — convert_to_ofn","text":"path path ontology file, string. out_path path desired output OFN output file, string. NULL (default), temporary file created. gzip Whether output gzipped, boolean (default: FALSE). TRUE, output file end '.gz' file extension. .robot_path path ROBOT executable .jar file, string. NULL (default), system ROBOT executable available used, otherwise error signaled. NOTE: .utils caches last ROBOT used future use.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/convert_to_ofn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Ontology Files to OFN — convert_to_ofn","text":"output path OFN file, invisibly.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/count_alliance_records.html","id":null,"dir":"Reference","previous_headings":"","what":"Count Alliance Records — count_alliance_records","title":"Count Alliance Records — count_alliance_records","text":"Counts records data Alliance Genome Resources. Counts can ascribed species record associated Model Organism Database (MOD) curated , optionally object type. count_alliance_records() primarily designed count records Alliance Disease Associations File. guarantee /options work files.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/count_alliance_records.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count Alliance Records — count_alliance_records","text":"","code":"count_alliance_records( alliance_tbl, term_subset = NULL, by_type = TRUE, pivot = TRUE, record_lvl = \"disease-object\", assign_to = c(\"species\", \"curator\") )"},{"path":"https://allenbaron.github.io/DO.utils/reference/count_alliance_records.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count Alliance Records — count_alliance_records","text":"alliance_tbl dataframe derived Alliance data (usually downloaded .tsv file) term_subset character vector DOIDs limit counts by_type logical indicating whether count Alliance object type (.e. gene, allele, model) pivot logical indicating whether pivot values type columns; ignored by_type = FALSE. record_lvl string indicating desired specificity records. assign_to assign records counting; one \"species\" \"curator\" (.e. organization responsible curating record)","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/count_alliance_records.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Count Alliance Records — count_alliance_records","text":"summary tibble count unique object annotations defined record_lvl, aggregated according species/curator (assign_to) , optionally, object type (by_type).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/count_alliance_records.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Count Alliance Records — count_alliance_records","text":"type record information use counting specified record_lvl accepts following values: \"full_record\" counts full non-duplicate records \"disease-object\" counts unique disease-object combinations \"disease\" counts unique diseases \"object\" counts unique MOD objects (.e. gene, allele, model identifiers)","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/count_alliance_records.html","id":"note","dir":"Reference","previous_headings":"","what":"NOTE","title":"Count Alliance Records — count_alliance_records","text":"disease-related data, exact duplicates (reason unknown) records differ seemingly unimportant information (e.g. date differs) existed. types duplicates removed prior record counts.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/count_delim.html","id":null,"dir":"Reference","previous_headings":"","what":"Count Delimited Columns — count_delim","title":"Count Delimited Columns — count_delim","text":"Counts columns values within delimited.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/count_delim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count Delimited Columns — count_delim","text":"","code":"count_delim( data, ..., delim = \"|\", sort = FALSE, name = NULL, trim = TRUE, convert = FALSE )"},{"path":"https://allenbaron.github.io/DO.utils/reference/count_delim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count Delimited Columns — count_delim","text":"data data.frame. ... Variables group . delim delimiter split elements within specified columns (default: \"|\"). sort TRUE, show largest groups top. name name new column output. omitted, default n. already column called n, use nn. column called n nn, 'll use nnn, , adding ns gets new name. trim Whether trim start/end whitespace, boolean (default: TRUE). convert Whether run utils::type.convert() .= TRUE new columns. useful de-concatenated columns integer, numeric logical. NOTE: \"NA\" strings always converted NAs.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/cur_yr.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Current Year — cur_yr","title":"Get Current Year — cur_yr","text":"Returns current 4-digit year string","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/cur_yr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Current Year — cur_yr","text":"","code":"cur_yr()"},{"path":"https://allenbaron.github.io/DO.utils/reference/download_alliance_tsv.html","id":null,"dir":"Reference","previous_headings":"","what":"Download Alliance .tsv.gz File — download_alliance_tsv","title":"Download Alliance .tsv.gz File — download_alliance_tsv","text":"Downloads URL-specified .tsv.gz file Alliance Genome Resources. Files can found https://www.alliancegenome.org/downloads. Right-click \"tsv\" link desired file select \"Copy Link\" get file URL.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_alliance_tsv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download Alliance .tsv.gz File — download_alliance_tsv","text":"","code":"download_alliance_tsv(dest_dir, url = NULL, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/download_alliance_tsv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download Alliance .tsv.gz File — download_alliance_tsv","text":"dest_dir path directory file saved url URL Alliance file; provided, requested console ... Additional arguments passed utils::download.file().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_alliance_tsv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download Alliance .tsv.gz File — download_alliance_tsv","text":"Path saved file.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_alliance_tsv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download Alliance .tsv.gz File — download_alliance_tsv","text":"date stamp indicating download date added base file name.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_alliance_tsv.html","id":"recommendation","dir":"Reference","previous_headings":"","what":"Recommendation","title":"Download Alliance .tsv.gz File — download_alliance_tsv","text":"Although possbile directly read file URL, downloading promotes reproducibility ensures future access needed.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_file.html","id":null,"dir":"Reference","previous_headings":"","what":"Download File(s) from the Internet — download_file","title":"Download File(s) from the Internet — download_file","text":"download_file() vectorized version utils::download.file() rely specifying \"libcurl\" method vectorization.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_file.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download File(s) from the Internet — download_file","text":"","code":"download_file(url, dest_file, on_failure = \"warn\", ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/download_file.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download File(s) from the Internet — download_file","text":"url character vector naming URL resource(s) downloaded. dest_file character vector file path(s) downloaded file(s) saved. on_failure string indicating handle download failure: \"warn\" - produce warning; includes exit codes debugging \"abort\" - abort execution \"list_failed\" - list URLs failed (output format differs, see Value) \"warn-list_failed\" - combination \"warn\" \"list_failed\" \"skip\" - nothing ... Additional arguments passed utils::download.file().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_file.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download File(s) from the Internet — download_file","text":"Unless on_failure includes \"list_failed\", successfully downloaded dest_file(s); otherwise, 2-vector list successful = dest_file(s) failed = url(s).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_obo_ontology.html","id":null,"dir":"Reference","previous_headings":"","what":"Download OBO Foundry Ontology File — download_obo_ontology","title":"Download OBO Foundry Ontology File — download_obo_ontology","text":"Downloads current version one ontologies OBO Foundry.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_obo_ontology.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download OBO Foundry Ontology File — download_obo_ontology","text":"","code":"download_obo_ontology(ontology_id, dest_dir, on_failure = \"warn\", ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/download_obo_ontology.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download OBO Foundry Ontology File — download_obo_ontology","text":"ontology_id character vector OBO Foundry ontology identifier(s) (lowercase, found http://www.obofoundry.org/). reference, ontology identifiers also provided obofoundry_metadata within package. dest_dir Path directory files saved. on_failure string indicating handle download failure: \"warn\" - produce warning; includes exit codes debugging \"abort\" - abort execution \"list_failed\" - list URLs failed (output format differs, see Value) \"warn-list_failed\" - combination \"warn\" \"list_failed\" \"skip\" - nothing ... Additional arguments passed utils::download.file().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_obo_ontology.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download OBO Foundry Ontology File — download_obo_ontology","text":"Unless on_failure includes \"list_failed\", successfully downloaded dest_file(s); otherwise, 2-vector list successful = dest_file(s) failed = url(s).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_omim.html","id":null,"dir":"Reference","previous_headings":"","what":"Download OMIM Files — download_omim","title":"Download OMIM Files — download_omim","text":"Downloads one specified files OMIM (Online catalog Mendelian Inheritance Man). mim2gene.txt file accessible without API key OMIM.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_omim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download OMIM Files — download_omim","text":"","code":"download_omim(omim_file, dest_dir, api_key = NULL, on_failure = \"abort\", ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/download_omim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download OMIM Files — download_omim","text":"omim_file character vector one OMIM file name(s). dest_dir Path directory files saved; OMIM files saved .txt format consist tab-separated values copyright header. api_key API key OMIM, string; required downloading file 'mim2gene.txt'. Register downloads OMIM. on_failure string indicating handle download failure: \"warn\" - produce warning; includes exit codes debugging \"abort\" - abort execution \"list_failed\" - list URLs failed (output format differs, see Value) \"warn-list_failed\" - combination \"warn\" \"list_failed\" \"skip\" - nothing ... Additional arguments passed utils::download.file().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/download_omim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download OMIM Files — download_omim","text":"Unless on_failure includes \"list_failed\", successfully downloaded dest_file(s); otherwise, 2-vector list successful = dest_file(s) failed = url(s).","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/drop_blank.html","id":null,"dir":"Reference","previous_headings":"","what":"Drop Blanks — drop_blank","title":"Drop Blanks — drop_blank","text":"Drops blank values vector list. See is_blank() constitutes blank value. drop_blank() generic function.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/drop_blank.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Drop Blanks — drop_blank","text":"","code":"drop_blank(x)"},{"path":"https://allenbaron.github.io/DO.utils/reference/drop_blank.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drop Blanks — drop_blank","text":"x character vector list.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/drop_blank.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Drop Blanks — drop_blank","text":"object class length x.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/drop_blank.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Drop Blanks — drop_blank","text":"","code":"drop_blank(c(\"\", \"A\")) #> [1] \"A\" drop_blank( list( c(\"\", \"A\"), c(\"A\", \"B\"), c(\"C\", \"D\", \"\", \"E\", \"\") ) ) #> [[1]] #> [1] \"A\" #> #> [[2]] #> [1] \"A\" \"B\" #> #> [[3]] #> [1] \"C\" \"D\" \"E\" #>"},{"path":"https://allenbaron.github.io/DO.utils/reference/elucidate.html","id":null,"dir":"Reference","previous_headings":"","what":"Elucidate the Data in an Object — elucidate","title":"Elucidate the Data in an Object — elucidate","text":"Elucidates (makes clear) data given object. elucidate() similar utils::str() dplyr::glimpse() provides detail nature data object.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/elucidate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Elucidate the Data in an Object — elucidate","text":"","code":"elucidate(x, type = \"basic\", print = TRUE, ...) # S3 method for omim_inventory elucidate(x, type = \"basic\", print = TRUE, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/elucidate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Elucidate the Data in an Object — elucidate","text":"x R object defined elucidate() method. type type report create, string; either \"basic\" (default) \"full\". See description Value returned individual methods details. print Whether print basic elucidation standard (default: TRUE). ... Additional arguments methods. currently used.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/elucidate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Elucidate the Data in an Object — elucidate","text":"omim_inventory method: type = \"basic\", single tibble OMIM DOID statistical information including total number terms , number OMIM terms present/absent , number deprecated terms, number terms one--many matches (either direction). type = \"full\", \"basic\" statistical tibble additional tibble's containing full records following: doid_deprecated, omim_to_many: Results OMIM ID corresponds multiple DOIDs, excluding skos broad/narrow/related matches. doid_to_many): Results DOID corresponds multiple OMIM IDs, excluding skos broad/narrow/related matches.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_ScoredMatch.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract ScoredMatch Objects (INTERNAL) — extract_ScoredMatch","title":"Extract ScoredMatch Objects (INTERNAL) — extract_ScoredMatch","text":"Extracts mapping results specialized ScoredMatch python objects (defined GILDA) LEVEL individual mappings.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_ScoredMatch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract ScoredMatch Objects (INTERNAL) — extract_ScoredMatch","text":"","code":"extract_ScoredMatch(py_ScoredMatch, prefix = NULL, prefix_sep = \":\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_ScoredMatch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract ScoredMatch Objects (INTERNAL) — extract_ScoredMatch","text":"py_ScoredMatch GILDA ScoredMatch (python) object. prefix Optional prefix add namespace local unique identifiers (LUI; e.g. 4, LUI \"disease\" ), string; preferably create complete namespace ID (e.g. \"DOID:4\"). prefix_sep Optional separator placed prefix namespace LUIs, string. Ignored prefix = NULL.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_as_tidygraph.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract OWL/RDF as a tidygraph — extract_as_tidygraph","title":"Extract OWL/RDF as a tidygraph — extract_as_tidygraph","text":"Extract 'nodes' 'parents' defined SPARQL query OWL/RDF tidygraph.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_as_tidygraph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract OWL/RDF as a tidygraph — extract_as_tidygraph","text":"","code":"extract_as_tidygraph(x, query = NULL, collapse_method = \"first\", debug = FALSE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_as_tidygraph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract OWL/RDF as a tidygraph — extract_as_tidygraph","text":"x 'pyDOID.owl.xml' object path OWL/RDF XML file can instantiated object owl_xml(). query SPARQL 1.1 query, string path .sparql/.rq file. NULL, input assumed OBO Foundry ontology oboInOwl:id rdfs:label OBO classes extracted. See \"Query Requirements\" section information. collapse_method method use collapsing extra data columns, string. See \"Query Requirements\" section information. debug [Intended developers ] Whether debug execution. Returns intermediate objects part output.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_as_tidygraph.html","id":"query-requirements","dir":"Reference","previous_headings":"","what":"Query Requirements","title":"Extract OWL/RDF as a tidygraph — extract_as_tidygraph","text":"tidygraph expects unique child-parent relationships, minimum SPARQL query include ?id (identifier 'child') ?parent (identifier child's parent(s)). additional output variables specified SPARQL query treated 'node' annotations collapsed using method collapse_col_flex() prevent duplication records.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_class_axiom.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Class Axioms — extract_class_axiom","title":"Extract Class Axioms — extract_class_axiom","text":"Extract owl:equivalentClass owl:subClassOf axioms doid-edit.owl file.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_class_axiom.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Class Axioms — extract_class_axiom","text":"","code":"extract_class_axiom(DO_repo)"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_class_axiom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Class Axioms — extract_class_axiom","text":"DO_repo local path HumanDiseaseOntology repo, string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_class_axiom.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Class Axioms — extract_class_axiom","text":"list two character vectors (eq subclass) containing axioms OWL functional format.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_eq_axiom.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Equivalent Class Axioms — extract_eq_axiom","title":"Extract Equivalent Class Axioms — extract_eq_axiom","text":"Extract owl:equivalentClass axioms doid-edit.owl file.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_eq_axiom.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Equivalent Class Axioms — extract_eq_axiom","text":"","code":"extract_eq_axiom(DO_repo)"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_eq_axiom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Equivalent Class Axioms — extract_eq_axiom","text":"DO_repo local path HumanDiseaseOntology repo, string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_eq_axiom.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Equivalent Class Axioms — extract_eq_axiom","text":"Equivalent class axioms OWL functional format, character vector.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_ordo_mappings.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract mappings from ORDO — extract_ordo_mappings","title":"Extract mappings from ORDO — extract_ordo_mappings","text":"Extract mappings Orphanet Rare Disease Ontology (ORDO). ORDO uses oboInOwl:hasDbXref mapping annotations indicate exact/broad/narrow-ness. Utilizes robot().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_ordo_mappings.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract mappings from ORDO — extract_ordo_mappings","text":"","code":"extract_ordo_mappings( ordo_path, as_skos = TRUE, output = NULL, tidy_what = \"everything\" )"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_ordo_mappings.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract mappings from ORDO — extract_ordo_mappings","text":"ordo_path path ORDO file, string. as_skos Whether convert ORDO's annotated oboInOwl:hasDbXref mappings Simple Knowledge Organization System (SKOS) equivalents, boolean (default: TRUE). ORDO-skos equivalent predicates follows: \"BTNT\" - skos:narrowMatch \"NTBT\" - skos:broadMatch \"E\" - skos:exactMatch \"ND\" - doid:undefinedMatch (supplements SKOS) \"W\" - doid:notMatch (supplements SKOS) output path output written, string, NULL (default) load data directly. tidy_what elements SPARQL-created data.frame tidy, character vector. One following: \"everything\" apply tidy operations (precedence \"nothing\"). \"header\" remove leading ? header labels. \"unnest\" unnest list columns unnest_cross(). \"uri_to_curie\" convert URIs recognized .utils CURIEs to_curie(). \"lgl_NA_false\" replace NA logical columns FALSE. \"as_tibble\" make output tibble. \"nothing\" prevent tidying.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_ordo_mappings.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract mappings from ORDO — extract_ordo_mappings","text":"output specified, path output file data. Otherwise, data tibble. ORDO mappings data formatted according SSSOM specification, additional status column indicating status (active, deprecated, etc.) ORPHA term. as_skos = FALSE, ORDO's text-based oboInOwl:hasDbXref annotations denoting type relationship Xref represents (simple text code ) included predicate_modifier column.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pm_date.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Publication Date from PubMed Citations — extract_pm_date","title":"Extract Publication Date from PubMed Citations — extract_pm_date","text":"Extracts complete publication date possible Pubmed citations.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pm_date.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Publication Date from PubMed Citations — extract_pm_date","text":"","code":"extract_pm_date(citation)"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pm_date.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Publication Date from PubMed Citations — extract_pm_date","text":"citation character vector PubMed citations","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pm_date.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Publication Date from PubMed Citations — extract_pm_date","text":"function uses step-wise approach, attempting first extract full date, subsequently year & month , available, just year. approach designed prevent accidental matches year values found titles. NOTE: day missing, function return full date using first day month. month day missing, \\ function return first day year.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.elink.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract PubMed ID from elink object — extract_pmid.elink","title":"Extract PubMed ID from elink object — extract_pmid.elink","text":"Extract PubMed ID elink object.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.elink.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract PubMed ID from elink object — extract_pmid.elink","text":"","code":"# S3 method for elink extract_pmid(x, linkname = NULL, quietly = FALSE, no_result = \"error\", ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.elink.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract PubMed ID from elink object — extract_pmid.elink","text":"x elink object, generated rentrez::entrez_link derivatives (e.g. citedby_pmid). linkname linkname specified Entrez API; necessary one linkname returned PubMed. quietly Suppress PubMed linkname message linkname specified multiple results exist elink object. no_result type condition signaled PubMed results exist response; one \"error\", \"warning\" (default), \"message\" \"none\". ... Unused, included generic consistency .","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.elink_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract PubMed ID from elink_list object — extract_pmid.elink_list","title":"Extract PubMed ID from elink_list object — extract_pmid.elink_list","text":"Extract PubMed ID elink_list object.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.elink_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract PubMed ID from elink_list object — extract_pmid.elink_list","text":"","code":"# S3 method for elink_list extract_pmid(x, no_result = \"warning\", ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.elink_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract PubMed ID from elink_list object — extract_pmid.elink_list","text":"x elink_list object, generated rentrez::entrez_link derivatives (e.g. citedby_pmid) by_id = TRUE . no_result type condition signaled PubMed results exist response; one \"error\", \"warning\" (default), \"message\" \"none\". ... Additional arguments passed extract_pmid.elink().","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract PubMed ID — extract_pmid","title":"Extract PubMed ID — extract_pmid","text":"extract_pmid generic function extracts PubMed IDs.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract PubMed ID — extract_pmid","text":"","code":"extract_pmid(x, ...) # S3 method for pm_search extract_pmid(x, ...) # S3 method for pmc_search extract_pmid(x, ...) # S3 method for data.frame extract_pmid(x, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract PubMed ID — extract_pmid","text":"x object. ... Arguments passed methods.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_pmid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract PubMed ID — extract_pmid","text":"character vector PubMed IDs, except extract_pmid.elink_list method returns list PubMed ID character vectors.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_subclass_axiom.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract 'Subclass Of' Axioms — extract_subclass_axiom","title":"Extract 'Subclass Of' Axioms — extract_subclass_axiom","text":"Extract owl:subClassOf axioms doid-edit.owl file.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_subclass_axiom.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract 'Subclass Of' Axioms — extract_subclass_axiom","text":"","code":"extract_subclass_axiom(DO_repo)"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_subclass_axiom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract 'Subclass Of' Axioms — extract_subclass_axiom","text":"DO_repo local path HumanDiseaseOntology repo, string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_subclass_axiom.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract 'Subclass Of' Axioms — extract_subclass_axiom","text":"'Subclass ' axioms OWL functional format, character vector.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_subtree.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Subtree — extract_subtree","title":"Extract Subtree — extract_subtree","text":"Extracts classes parents subtree pyDOID.owl.xml object.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_subtree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Subtree — extract_subtree","text":"","code":"extract_subtree(x, top_node, reload = FALSE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_subtree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Subtree — extract_subtree","text":"x 'pyDOID.owl.xml' object path OWL/RDF XML file can instantiated object owl_xml(). top_node top node tree, valid DOID (see is_valid_doid() valid input formats). reload Force reload file memory, TRUE FALSE (default).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/extract_subtree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Subtree — extract_subtree","text":"tibble columns: id, label, parent_id, parent_label, one row unique combination subclass including top_node.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/format_axiom.html","id":null,"dir":"Reference","previous_headings":"","what":"Format Logical Axioms — format_axiom","title":"Format Logical Axioms — format_axiom","text":"Format logical axioms style Protege. Input axioms must OWL functional syntax.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_axiom.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format Logical Axioms — format_axiom","text":"","code":"format_axiom( x, property_df = NULL, generify_obo = FALSE, placeholders = c(\"<<<\", \">>>\", \"%%%\", \"@@@\"), max_phrases = 15L )"},{"path":"https://allenbaron.github.io/DO.utils/reference/format_axiom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format Logical Axioms — format_axiom","text":"x Complete logical axioms OWL functional syntax, character vector. property_df [Optional] data.frame consisting relevant annotation object properties may used make properties readable axioms. provided, data.frame include two columns: property: property's URI. label: property's rdfs:label (equivalent). See 'Formatting Options' details. generify_obo Whether make OBO ontology classes properties generic, TRUE FALSE (default). See 'Formatting Options' details. placeholders set 4 strings used internally preserve axiom parentheses [1:2], phrase spacing [3], complete phrases [4], character vector. generally need edited exposed case conflicts within axioms. max_phrases maximum number phrases update axiom, integer. protects infinite loops need edited one Object* OWL functional phrases returned unformatted.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_axiom.html","id":"formatting-options","dir":"Reference","previous_headings":"","what":"Formatting Options","title":"Format Logical Axioms — format_axiom","text":"format_axiom() always rearrange equivalent class subclass logical axioms OWL functional syntax readable form, similar Protege. However, classes properties axioms returned URIs CURIEs (formatted x). may desirable programmatic examination still difficult human read. make readable, property_df generify_obo arguments can used. property_df used replace OBO ontology property URIs CURIEs namespace-prefixed labels: e.g. obo:RO_0004026 become RO:'disease location'. Non-OBO properties modified. generify_obo replaces individual OBO URIs CURIEs either namespace-prefixed types, e.g. obo:UBERON_0001032 become UBERON:anatomy, namespace . format simplifies axioms making basic analysis axiom patterns easier. See documentation generify_obo() details.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_doid.html","id":null,"dir":"Reference","previous_headings":"","what":"Format DOIDs — format_doid","title":"Format DOIDs — format_doid","text":"Convert valid DOIDs /bare numbers specified DOID format. Input may tested ensure matches valid DOID format attempt made confirm bare numbers DOIDs match actual diseases ontology.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_doid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format DOIDs — format_doid","text":"","code":"format_doid(x, as = \"CURIE\", convert_bare = FALSE, validate_input = TRUE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/format_doid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format DOIDs — format_doid","text":"x set IDs, character vector. format convert DOIDs , string. valid formats possible options: \"CURIE\" (default), \"URI\", \"obo_CURIE\", \"basename\". convert_bare Whether bare numbers converted canonical DOIDs, TRUE FALSE (default). validate_input Whether ensure valid DOIDs included x, TRUE (default) FALSE. FALSE, non-DOID input returned unchanged.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_doid.html","id":"caution","dir":"Reference","previous_headings":"","what":"Caution","title":"Format DOIDs — format_doid","text":"extra cautious using format_doid() validate_input = FALSE unexpected text conversion may occur.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/format_doid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format DOIDs — format_doid","text":"","code":"x <- c( \"http://purl.obolibrary.org/obo/DOID_0001816\", \"DOID:4\", \"obo:DOID_14566\", \"DOID_0040001\" ) format_doid(x, as = \"URI\") #> [1] \"http://purl.obolibrary.org/obo/DOID_0001816\" #> [2] \"http://purl.obolibrary.org/obo/DOID_4\" #> [3] \"http://purl.obolibrary.org/obo/DOID_14566\" #> [4] \"http://purl.obolibrary.org/obo/DOID_0040001\" format_doid(x, as = \"CURIE\") #> [1] \"DOID:0001816\" \"DOID:4\" \"DOID:14566\" \"DOID:0040001\" format_doid(x, as = \"obo_CURIE\") #> [1] \"obo:DOID_0001816\" \"obo:DOID_4\" \"obo:DOID_14566\" \"obo:DOID_0040001\" format_doid(x, as = \"basename\") #> [1] \"DOID_0001816\" \"DOID_4\" \"DOID_14566\" \"DOID_0040001\" # bare numbers can be converted to canonical DOIDs, if desired w_bare <- c(x, \"0050117\") format_doid(w_bare, convert_bare = TRUE) #> [1] \"DOID:0001816\" \"DOID:4\" \"DOID:14566\" \"DOID:0040001\" \"DOID:0050117\" # non-DOIDs can be passed as input, if desired mixed_input <- c(x, \"random_text\", \"obo:SYMP_0000000\", \"0050117\") format_doid(mixed_input, validate_input = FALSE) #> [1] \"DOID:0001816\" \"DOID:4\" \"DOID:14566\" \"DOID:0040001\" #> [5] \"random_text\" \"obo:SYMP_0000000\" \"0050117\" format_doid(mixed_input, convert_bare = TRUE, validate_input = FALSE) #> [1] \"DOID:0001816\" \"DOID:4\" \"DOID:14566\" \"DOID:0040001\" #> [5] \"random_text\" \"obo:SYMP_0000000\" \"DOID:0050117\""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_hyperlink.html","id":null,"dir":"Reference","previous_headings":"","what":"Format URLs as Hyperlinks — format_hyperlink","title":"Format URLs as Hyperlinks — format_hyperlink","text":"Formats URLs hyperlinks Google Sheets, Excel, html.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_hyperlink.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format URLs as Hyperlinks — format_hyperlink","text":"","code":"format_hyperlink(url, as, ..., text = NULL, preserve = \"url\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/format_hyperlink.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format URLs as Hyperlinks — format_hyperlink","text":"url One URLs, character vector. format use hyperlink, string; one \"gs\" (Google Sheet), \"xlsx\" (Excel), \"html\". ... (= \"html\") One name-value pairs html <> attributes. text (Optional) text display link, character vector. NULL (default), URL serve text. one value provided, recycled. preserve value return url NA, string. One \"url\" (default) \"text\".","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_hyperlink.html","id":"excel-note","dir":"Reference","previous_headings":"","what":"Excel Note","title":"Format URLs as Hyperlinks — format_hyperlink","text":"Use openxlsx pkg write data hyperlinks Excel.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_hyperlink.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format URLs as Hyperlinks — format_hyperlink","text":"","code":"format_hyperlink(\"https://www.google.com\", \"gs\") #> #> [1] =HYPERLINK(\"https://www.google.com\") format_hyperlink(\"https://www.google.com\", \"xlsx\") #> [1] \"https://www.google.com\" #> attr(,\"class\") #> [1] \"hyperlink\" format_hyperlink(\"https://www.google.com\", \"html\") #> [1] \"https://www.google.com<\/a>\" # with 'text' (argument must be named) format_hyperlink(\"https://www.google.com\", \"gs\", text = \"Google\") #> #> [1] =HYPERLINK(\"https://www.google.com\", \"Google\") format_hyperlink(\"https://www.google.com\", \"xlsx\", text = \"Google\") #> [1] \"=HYPERLINK(\\\"https://www.google.com\\\", \\\"Google\\\")\" #> NULL format_hyperlink(\"https://www.google.com\", \"html\", text = \"Google\") #> [1] \"Google<\/a>\" # html with attributes format_hyperlink( \"https://www.google.com\", \"html\", text = \"Google\", target = \"_blank\", rel = \"external\" ) #> [1] \"Google<\/a>\" # NA values in 'url' are passed through without modification by default. If # 'text' is provided and preferred when 'url' is NA use preserve = \"text\". format_hyperlink(c(\"https://www.google.com\", NA), \"gs\") #> #> [1] =HYPERLINK(\"https://www.google.com\") NA format_hyperlink( c(\"https://www.google.com\", NA), \"gs\", text = c(\"Google\", \"placeholder\") ) #> #> [1] =HYPERLINK(\"https://www.google.com\", \"Google\") #> [2] NA # 'url' is always preserved when 'text' is NA but 'url' is not format_hyperlink( c(\"https://www.google.com/\", \"https://madeup.url.com/fakeID\"), \"html\", text = c(\"google\", NA), preserve = \"text\" ) #> [1] \"google<\/a>\" #> [2] \"https://madeup.url.com/fakeID<\/a>\""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_obo.html","id":null,"dir":"Reference","previous_headings":"","what":"Format OBO Foundry IDs — format_obo","title":"Format OBO Foundry IDs — format_obo","text":"Convert valid OBO Foundry ontology IDs specified format. Input may tested ensure matches valid OBO ID format attempt made confirm IDs match actual terms OBO Foundry ontology.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_obo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format OBO Foundry IDs — format_obo","text":"","code":"format_obo(x, as = \"CURIE\", validate_input = TRUE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/format_obo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format OBO Foundry IDs — format_obo","text":"x set IDs, character vector. format convert OBO IDs , string. following formats possible options: \"CURIE\" (default) \"URI\" \"bracketed_URI\": e.g. \"\" \"ns_lui\": namespace local unique identifier (preserves separator). \"ns\": namespace ontology valid OBO formats, first three formats may modified repeatedly format_obo(). 'ns' formats, hand, valid OBO formats formatted format_obo(). validate_input Whether ensure valid OBO IDs included x,TRUE (default) FALSE. FALSE, non-OBO ID input likely returned unchanged.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_obo.html","id":"caution","dir":"Reference","previous_headings":"","what":"Caution","title":"Format OBO Foundry IDs — format_obo","text":"extra cautious using format_obo() validate_input = FALSE unexpected text conversion may occur.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/format_obo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format OBO Foundry IDs — format_obo","text":"","code":"x <- c( \"http://purl.obolibrary.org/obo/DOID_0001816\", \"\", \"obo:SYMP_0000000\", \"obo:so#has_origin\" ) # reversible format_obo(x, as = \"CURIE\") #> [1] \"obo:DOID_0001816\" \"obo:CL_0000066\" \"obo:SYMP_0000000\" #> [4] \"obo:so#has_origin\" format_obo(x, as = \"URI\") #> [1] \"http://purl.obolibrary.org/obo/DOID_0001816\" #> [2] \"http://purl.obolibrary.org/obo/CL_0000066\" #> [3] \"http://purl.obolibrary.org/obo/SYMP_0000000\" #> [4] \"http://purl.obolibrary.org/obo/so#has_origin\" format_obo(x, as = \"bracketed_URI\") #> [1] \"\" #> [2] \"\" #> [3] \"\" #> [4] \"\" # irreversible format_obo(x, as = \"ns_lui\") #> [1] \"DOID_0001816\" \"CL_0000066\" \"SYMP_0000000\" \"so#has_origin\" format_obo(x, as = \"ns\") #> [1] \"DOID\" \"CL\" \"SYMP\" \"so#\" # non-OBO IDs can be passed as input with caution, if desired mixed_input <- c(x, \"random_text\", \"0050117\", \"obo:SYMP:0000000\") format_obo(mixed_input, validate_input = FALSE) #> [1] \"obo:DOID_0001816\" \"obo:CL_0000066\" \"obo:SYMP_0000000\" #> [4] \"obo:so#has_origin\" \"random_text\" \"0050117\" #> [7] \"obo:SYMP:0000000\""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_subtree.html","id":null,"dir":"Reference","previous_headings":"","what":"Format a Subtree — format_subtree","title":"Format a Subtree — format_subtree","text":"Format subtree, produced extract_subtree(), text-based tree mirroring disease-ontology.org.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/format_subtree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format a Subtree — format_subtree","text":"","code":"format_subtree(subtree_df, top_node)"},{"path":"https://allenbaron.github.io/DO.utils/reference/format_subtree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format a Subtree — format_subtree","text":"subtree_df dataframe extract_subtree(). top_node top node tree, valid DOID (see is_valid_doid() valid input formats).","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/format_subtree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format a Subtree — format_subtree","text":"","code":"if (FALSE) { do_owl <- {path_to_doid.owl_here} subtree <- extract_subtree(do_owl, \"DOID:3070\") st_formatted <- format_subtree(subtree, \"DOID:3070\") st_formatted }"},{"path":"https://allenbaron.github.io/DO.utils/reference/generify_obo.html","id":null,"dir":"Reference","previous_headings":"","what":"Generify OBO Classes/Properties (INTERNAL) — generify_obo","title":"Generify OBO Classes/Properties (INTERNAL) — generify_obo","text":"format_axiom() internal helper replaces URI/CURIEs defined OBO ontologies namespace-prefixed descriptions/types, defined internally, just namespace. modify non-OBO class URI/CURIEs.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/generify_obo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generify OBO Classes/Properties (INTERNAL) — generify_obo","text":"","code":"generify_obo(x)"},{"path":"https://allenbaron.github.io/DO.utils/reference/generify_obo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generify OBO Classes/Properties (INTERNAL) — generify_obo","text":"x Complete logical axioms OWL functional syntax, character vector.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/generify_obo.html","id":"internally-defined-obo-namespace-types","dir":"Reference","previous_headings":"","what":"Internally-defined OBO namespace-types","title":"Generify OBO Classes/Properties (INTERNAL) — generify_obo","text":"following namespaces 'namespace:types' defined function: CL: 'CL:cell' CHEBI: 'CHEBI:chemical' DISDRIV: 'DISDRIV:disease_driver' DOID: 'DOID:disease' FOODON: 'FOODON:food_material' ECO: 'ECO:evidence' GENO: 'GENO:inheritance_pattern' NCBITaxon: 'NCBITaxon:organism' OMIM: 'OMIM:susceptibility' UBERON: 'UBERON:anatomy' UPHENO: 'UPHENO:phenotype' : ':sequence' SYMP: 'SYMP:symptom' TRANS: 'TRANS:pathogen_transmission' Ontologies multiple object types used (e.g. HP, onset phenotype), imported via DISDRIV (e.g. ExO), used properties (e.g. RO) defined internally formatted namespace . .","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/get_bioc_pkg_stats.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Bioconductor Package Statistics — get_bioc_pkg_stats","title":"Get Bioconductor Package Statistics — get_bioc_pkg_stats","text":"Get download statistics specific Bioconductor packages.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/get_bioc_pkg_stats.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Bioconductor Package Statistics — get_bioc_pkg_stats","text":"","code":"get_bioc_pkg_stats(pkg, pkg_type, yr, delay_rng)"},{"path":"https://allenbaron.github.io/DO.utils/reference/get_bioc_pkg_stats.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Bioconductor Package Statistics — get_bioc_pkg_stats","text":"pkg character vector; name Bioconductor package(s) pkg_type character vector length pkg identifying type Bioconductor package; one \"software\", \"annotation\", \"experiment\", \"workflow\" yr character scalar; 4-digit year stats desired, default = current year (currently implemented single yr) delay_rng c(min, max) number seconds wait requests; default = c(1, 10)","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/get_url.html","id":null,"dir":"Reference","previous_headings":"","what":"Get URL (internal) — get_url","title":"Get URL (internal) — get_url","text":"Get URL used within package. List possible names organized type get_url(\"names\").","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/get_url.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get URL (internal) — get_url","text":"","code":"get_url(.name)"},{"path":"https://allenbaron.github.io/DO.utils/reference/get_url.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get URL (internal) — get_url","text":".name Internal name desired URL, string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/get_url.html","id":"possible-names-organized-by-type-","dir":"Reference","previous_headings":"","what":"Possible Names (organized by type)","title":"Get URL (internal) — get_url","text":"pub_urls: doi, github, orcid, pubmed, pmc xref_urls: ICD9CM, ICD10CM, KEGG, MESH, NCI, ORDO, OMIM, SNOMEDCT_US, UMLS_CUI web: DO_website data_urls: alliance_disease_tsv ns_prefix: ...includes common OBO Foundry SPARQL prefixes; use ns_prefix see complete list.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/get_url.html","id":"note","dir":"Reference","previous_headings":"","what":"NOTE","title":"Get URL (internal) — get_url","text":"get_url() provides prefixes disease-ontology.org style link support. prefixes primarily cross-references (xrefs) generally better creating URLs look information particular entity online may overlap official namespaces ns_prefix, can also accessed get_url(). occurs, prefixes can generally distinguished capitalization, xref prefixes uppercase, e.g. \"MESH\" = \"https://meshb.nlm.nih.gov/record/ui?ui=\", official namespace lowercase, e.g. \"mesh\" = \"https://id.nlm.nih.gov/mesh/\". distinction always guaranteed, care taken prefix related xrefs .","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/identify_obsolete.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify Obsolete (INTERNAL) — identify_obsolete","title":"Identify Obsolete (INTERNAL) — identify_obsolete","text":"Identify obsolete terms Human Disease Ontology.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/identify_obsolete.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify Obsolete (INTERNAL) — identify_obsolete","text":"","code":"identify_obsolete(x, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/identify_obsolete.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify Obsolete (INTERNAL) — identify_obsolete","text":"x object information obsolete terms (use methods() available classes). ... used; included extensibility.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/iff_all_vals.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for All Values — iff_all_vals","title":"Test for All Values — iff_all_vals","text":"Returns TRUE , , values present x values present x.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/iff_all_vals.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for All Values — iff_all_vals","text":"","code":"iff_all_vals(x, values)"},{"path":"https://allenbaron.github.io/DO.utils/reference/iff_all_vals.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for All Values — iff_all_vals","text":"x vector. values values ensure exist x.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/iff_all_vals.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for All Values — iff_all_vals","text":"TRUE FALSE. FALSE, missing /extra attributes included assist identifying non-conformity.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/install_robot.html","id":null,"dir":"Reference","previous_headings":"","what":"Install OBO Foundry ROBOT Tool (Mac/Linux ONLY) — install_robot","title":"Install OBO Foundry ROBOT Tool (Mac/Linux ONLY) — install_robot","text":"Installs latest ROBOT robot.jar files default system path (/usr/local/bin). tested Macs also likely work Linux.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/install_robot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Install OBO Foundry ROBOT Tool (Mac/Linux ONLY) — install_robot","text":"","code":"install_robot(...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/install_robot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Install OBO Foundry ROBOT Tool (Mac/Linux ONLY) — install_robot","text":"... arguments passed utils::download.file(); needed","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/install_robot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Install OBO Foundry ROBOT Tool (Mac/Linux ONLY) — install_robot","text":"version robot.jar, successful, otherwise warning indicating failures occurred along non-zero integer codes. See documentation utils::download.file() (download robot/robot.jar) system2() (making robot executable; uses system chmod) \"Value\" details.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/inventory_omim.html","id":null,"dir":"Reference","previous_headings":"","what":"Assess whether OMIM Data is in DO — inventory_omim","title":"Assess whether OMIM Data is in DO — inventory_omim","text":"Assesses whether OMIM identifiers present Human Disease Ontology mappings (either xrefs skos mappings). Utilizes robot() comparison.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/inventory_omim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assess whether OMIM Data is in DO — inventory_omim","text":"","code":"inventory_omim( onto_path, omim_input, keep_mim = c(\"#\", \"%\"), include_pred = c(\"skos:exactMatch\", \"skos:closeMatch\", \"oboInOwl:hasDbXref\"), when_pred_NA = \"error\" )"},{"path":"https://allenbaron.github.io/DO.utils/reference/inventory_omim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assess whether OMIM Data is in DO — inventory_omim","text":"onto_path path ontology file, string. omim_input omim_tbl created read_omim() path .tsv .csv file (possibly compressed) can read read_omim() includes OMIM data compare mappings ontology. NOTE: omim_tbl provided, keep_mim ignored. keep_mim [OMIM search data ] MIM symbols representing data types keep, character vector, NULL retain (default: \"#\" \"%\"). OMIM defined MIM symbols : include_pred predicates include testing one--multiple mappings, character vector (default: skos:exactMatch, skos:closeMatch, oboInOwl:hasDbXref). predicates ignored. when_pred_NA missing predicates detected, string; one \"error\" (default), \"warn\", NULL (nothing). NA predicates always ignored mapping exists (.e. one corresponding values x y /also NA).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/inventory_omim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assess whether OMIM Data is in DO — inventory_omim","text":"omim_input 5 additional columns: exists: Logical indicating whether OMIM ID present . mapping_type: mapping predicate(s) OMIM ID disease, present. Multiple predicate(s) OMIM DOID pipe delimited. doid: DOID disease mapped OMIM ID, present. do_label: label disease mapped OMIM ID, present. do_dep: Logical indicating whether disease deprecated , present. multimaps: direction OMIM term maps multiple terms resource, \"omim_to_doid\", \"doid_to_omim\", \"both_ways\" NA. Output class omim_inventory, type class mapping_inventory.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/inventory_omim.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Assess whether OMIM Data is in DO — inventory_omim","text":"","code":"if (FALSE) { # manually copy or download data from https://www.omim.org/phenotypicSeries/PS609060 inventory_omim( onto_path = \"~/Ontologies/HumanDiseaseOntology/src/ontology/doid-edit.owl\", omim_input = \"omimps.csv\", ) }"},{"path":"https://allenbaron.github.io/DO.utils/reference/invert_nm.html","id":null,"dir":"Reference","previous_headings":"","what":"Invert Names and Values (INTERNAL) — invert_nm","title":"Invert Names and Values (INTERNAL) — invert_nm","text":"Currently supports character vectors.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/invert_nm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Invert Names and Values (INTERNAL) — invert_nm","text":"","code":"invert_nm(x)"},{"path":"https://allenbaron.github.io/DO.utils/reference/invert_nm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Invert Names and Values (INTERNAL) — invert_nm","text":"x named object.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/invert_sublists.html","id":null,"dir":"Reference","previous_headings":"","what":"Invert Sublists — invert_sublists","title":"Invert Sublists — invert_sublists","text":"Inverts elements lists within list elements (depth 3) regrouped position name within sublist (depth 2).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/invert_sublists.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Invert Sublists — invert_sublists","text":"","code":"invert_sublists(x, use_sublist_names = FALSE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/invert_sublists.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Invert Sublists — invert_sublists","text":"x list non-empty lists. use_sublist_names Whether use sublist names inversion, TRUE FALSE (default). See 'Details' specifics.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/invert_sublists.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Invert Sublists — invert_sublists","text":"use_sublist_names alters sublists inverted follows: FALSE, sublist elements inverted position within sublists. Sublists must number elements. original sublist names preserved (now depth 3) original depth 3 names (now sublists) dropped. TRUE, sublists elements (depth 3) must named names must duplicated within given sublist. Also, matching names must exist across sublists, names used inversion , well , name inverted sublists (names depth 3 moved depth 2) output. sublists must still number elements.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/invert_sublists.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Invert Sublists — invert_sublists","text":"","code":".l <- list( list(1, \"a\", TRUE), list(2, \"b\", FALSE) ) invert_sublists(.l) #> [[1]] #> [[1]][[1]] #> [1] 1 #> #> [[1]][[2]] #> [1] 2 #> #> #> [[2]] #> [[2]][[1]] #> [1] \"a\" #> #> [[2]][[2]] #> [1] \"b\" #> #> #> [[3]] #> [[3]][[1]] #> [1] TRUE #> #> [[3]][[2]] #> [1] FALSE #> #> # sublist element ('item') names are dropped when inverting by position but # sublist names are retained .l_nm <- list( subl1 = list(item1 = 1, item2 = \"a\", item3 = TRUE), subl2 = list(item1 = 2, item2 = \"b\", item3 = FALSE) ) invert_sublists(.l_nm, use_sublist_names = FALSE) #> [[1]] #> [[1]]$subl1 #> [1] 1 #> #> [[1]]$subl2 #> [1] 2 #> #> #> [[2]] #> [[2]]$subl1 #> [1] \"a\" #> #> [[2]]$subl2 #> [1] \"b\" #> #> #> [[3]] #> [[3]]$subl1 #> [1] TRUE #> #> [[3]]$subl2 #> [1] FALSE #> #> # all names are retained when inverting by name .res1 <- invert_sublists(.l_nm, use_sublist_names = TRUE) .res1 #> $item1 #> $item1$subl1 #> [1] 1 #> #> $item1$subl2 #> [1] 2 #> #> #> $item2 #> $item2$subl1 #> [1] \"a\" #> #> $item2$subl2 #> [1] \"b\" #> #> #> $item3 #> $item3$subl1 #> [1] TRUE #> #> $item3$subl2 #> [1] FALSE #> #> # names are used for inverting, so order can be different .l_nm2 <- list( subl1 = list(item1 = 1, item2 = \"a\", item3 = TRUE), subl2 = list(item2 = \"b\", item3 = FALSE, item1 = 2) # order changed ) ## invert by name -> results the same, despite order change .res2 <- invert_sublists(.l_nm2, use_sublist_names = TRUE) identical(.res1, .res2) #> [1] TRUE ## invert by pos -> results differ .res3 <- invert_sublists(.l_nm2, use_sublist_names = FALSE) identical(.res1, .res3) #> [1] FALSE"},{"path":"https://allenbaron.github.io/DO.utils/reference/is_curie.html","id":null,"dir":"Reference","previous_headings":"","what":"CURIE (RDF ID) Predicate — is_curie","title":"CURIE (RDF ID) Predicate — is_curie","text":"predicate designed validate CURIEs, compact URIs conforming W3C CURIE Syntax 1.0 standard (stricter allowed standard).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/is_curie.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"CURIE (RDF ID) Predicate — is_curie","text":"","code":"is_curie(x, def = \"obo_generic\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/is_curie.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"CURIE (RDF ID) Predicate — is_curie","text":"x set CURIEs, character vector. def definition CURIEs test ; string. One \"obo\", \"obo_generic\" (default), \"w3c\", \"w3c_safe\" (see Notes section details).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/is_curie.html","id":"notes","dir":"Reference","previous_headings":"","what":"Notes","title":"CURIE (RDF ID) Predicate — is_curie","text":"W3C CURIE Syntax 1.0 standard defines general CURIE syntax allowed (def = \"w3c\"; perfect implementation, e.g. U+3000 non-breaking space accepted). Note definition URIs identified CURIEs. desirable distinguish use def = \"w3c_safe\" wrap CURIEs brackets (defined standard. Alternatively, use stricter OBO Foundry-based standards (stated standard, strict definitions CURIEs can defined). \"obo\" corresponds official OBO Foundry definition CURIE stated OBO Foundry ID Policy. work class CURIEs OBO Foundry ontologies recognize obo:IDSPACE_LOCALID formatted CURIEs CURIEs letters symbols local unique identifier. allow set still restricting CURIE patterns found OBO Foundry ontologies, use \"obo_generic\".","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/is_curie.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"CURIE (RDF ID) Predicate — is_curie","text":"","code":"id <- c( #### pass all #### \"DOID:0001816\", \"CL:0000066\", #### pass \"obo_generic\" & \"w3c\" #### \"obo:DOID_4\", \"obo:so#has_origin\", # obo prefixed CURIEs \"oboInOwl:hasDbXref\", \"skos:exactMatch\", # obo object properties \"alfred:LO362836C\", # not OBO but conforms to `\"obo_generic\"` pattern #### pass only \"w3c\" #### \"4dn.biosource:4DNSR73BT2A2\", \"aceview.worm:aap-1\", #### always fail #### \"0001816\", # bare number without prefix \" obo:HP_0000001\", # must have NO `[:space:]` characters \"http://purl.obolibrary.org/obo/DOID_0001816\" # URI )"},{"path":"https://allenbaron.github.io/DO.utils/reference/is_invariant.html","id":null,"dir":"Reference","previous_headings":"","what":"Test if an Object is Invariant — is_invariant","title":"Test if an Object is Invariant — is_invariant","text":"Test object invariant (.e. values equal, within given tolerance numeric vectors).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/is_invariant.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test if an Object is Invariant — is_invariant","text":"","code":"is_invariant(x, ...) # S3 method for default is_invariant(x, na.rm = FALSE, ...) # S3 method for numeric is_invariant(x, na.rm = FALSE, tol = sqrt(.Machine$double.eps), ...) # S3 method for list is_invariant(x, incl_nm = TRUE, ...) # S3 method for data.frame is_invariant(x, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/is_invariant.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test if an Object is Invariant — is_invariant","text":"x object tested ... unused; extensibility na.rm logical indicating whether exclude NA values tol double, tolerance use (numeric vectors) incl_nm Whether top-level names included determining list invariant (default: TRUE).","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/length_sort.html","id":null,"dir":"Reference","previous_headings":"","what":"Sort by Character Length — length_sort","title":"Sort by Character Length — length_sort","text":"Sort vector (length_sort()) data.frame (length_order()) character length. Multiple elements length secondarily sorted order appearance.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/length_sort.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sort by Character Length — length_sort","text":"","code":"length_sort(x, by_name = FALSE, ...) length_order(data, cols, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/length_sort.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sort by Character Length — length_sort","text":"x vector. by_name Whether sort vector name instead value, boolean. ... Arguments passed base::order decreasing logical. sort order increasing decreasing? \"radix\" method, can vector length equal number arguments .... methods, must length one. na.last controlling treatment NAs. TRUE, missing values data put last; FALSE, put first; NA, removed (see ‘Note’.) method method used: partial matches allowed. default (\"auto\") implies \"radix\" short numeric vectors, integer vectors, logical vectors factors. Otherwise, implies \"shell\". details methods \"shell\", \"quick\", \"radix\", see help sort. data data.frame. cols columns data order .","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/length_sort.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sort by Character Length — length_sort","text":"","code":"# Sorting vectors x <- c(\"ccc\", \"aaaa\", \"eee\", \"b\", \"DDD\") length_sort(x) #> [1] \"b\" \"ccc\" \"eee\" \"DDD\" \"aaaa\" length_sort(x, decreasing = TRUE) #> [1] \"aaaa\" \"ccc\" \"eee\" \"DDD\" \"b\" x2 <- c(1:9, NA, 100, 10) length_sort(x2) #> [1] 1 2 3 4 5 6 7 8 9 10 100 NA length_sort(x2, decreasing = TRUE) #> [1] 100 10 1 2 3 4 5 6 7 8 9 NA length_sort(x2, na.last = NA) #> [1] 1 2 3 4 5 6 7 8 9 10 100 x3 <- c(bb = 333, ccc = 1, a = 22) length_sort(x3, by_name = TRUE) #> a bb ccc #> 22 333 1 # Ordering data.frames x <- tibble::tibble( x = 1:3, y = c(\"b\", \"aa\", \"c\"), z = c(\"bb\", \"a\", \"c\") ) length_order(x, \"y\") #> # A tibble: 3 × 3 #> x y z #> #> 1 1 b bb #> 2 3 c c #> 3 2 aa a length_order(x, \"z\") #> # A tibble: 3 × 3 #> x y z #> #> 1 2 aa a #> 2 3 c c #> 3 1 b bb length_order(x, c(\"y\", \"z\")) #> # A tibble: 3 × 3 #> x y z #> #> 1 3 c c #> 2 1 b bb #> 3 2 aa a length_order(x, c(\"y\", \"z\"), decreasing = TRUE) #> # A tibble: 3 × 3 #> x y z #> #> 1 2 aa a #> 2 1 b bb #> 3 3 c c"},{"path":"https://allenbaron.github.io/DO.utils/reference/lengthen_col.html","id":null,"dir":"Reference","previous_headings":"","what":"Lengthen Column(s) — lengthen_col","title":"Lengthen Column(s) — lengthen_col","text":"Lengthens values column(s) specified, de-concatenating values columns, resulting duplicated rows differ values cols. NOTE: lengthen_col() exact reverse collapse_col(); see examples.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/lengthen_col.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Lengthen Column(s) — lengthen_col","text":"","code":"lengthen_col(data, cols, delim = \"|\", trim = TRUE, convert = FALSE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/lengthen_col.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Lengthen Column(s) — lengthen_col","text":"data data.frame. cols name column(s) data.frame lengthen. delim delimiter split elements within specified columns (default: \"|\"). trim Whether trim start/end whitespace, boolean (default: TRUE). convert Whether run utils::type.convert() .= TRUE new columns. useful de-concatenated columns integer, numeric logical. NOTE: \"NA\" strings always converted NAs.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/lengthen_col.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Lengthen Column(s) — lengthen_col","text":"data.frame specified columns lengthened.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/lengthen_col.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Lengthen Column(s) — lengthen_col","text":"","code":"z_unique <- tibble::tibble( x = c(1, 2, 3, 4, 4), y = c(\"a\", \"a\", \"b\", \"c\", \"e\"), z = c(\"Z\", \"Y\", \"X\", \"W|V\", \"U\") ) lengthen_col(z_unique, z) #> # A tibble: 6 × 3 #> x y z #> #> 1 1 a Z #> 2 2 a Y #> 3 3 b X #> 4 4 c W #> 5 4 c V #> 6 4 e U # Data will likely differ after round trip through `collapse_col()` and # `lengthen_col()` because: # 1. Duplicate rows (cc_df, row 4) are lost # 2. New crosses are created (cc_df2, row 6-8) # 3. Output is sorted by `cols` due to use of `dplyr::group_by()` # internally. cc_df <- tibble::tibble( x = c(1, 2, 3, 3, 4, 4, 4), y = c(\"a\", \"a\", \"b\", \"b\", \"c\", \"c\", \"e\"), z = c(\"Z\", \"Y\", \"X\", \"X\", \"W\", \"V\", \"U\") ) cc_df2 <- lengthen_col( collapse_col(cc_df, c(y, z)), c(y, z) ) if (rlang::is_installed(\"waldo\")) { waldo::compare(cc_df, cc_df2) } else { cc_df cc_df2 } #> `attr(old, 'row.names')[5:7]`: 5 6 7 #> `attr(new, 'row.names')[5:9]`: 5 6 7 8 9 #> #> old vs new #> x y z #> old[1, ] 1 a Z #> old[2, ] 2 a Y #> old[3, ] 3 b X #> - old[4, ] 3 b X #> old[5, ] 4 c W #> old[6, ] 4 c V #> + new[6, ] 4 c U #> + new[7, ] 4 e W #> + new[8, ] 4 e V #> old[7, ] 4 e U #> #> `old$x[4:7]`: 3 4 4 4 #> `new$x`: 1 2 3 4 4 4 4 4 4 #> #> `old$y[4:7]`: \"b\" \"c\" \"c\" \"e\" #> `new$y`: \"a\" \"a\" \"b\" \"c\" \"c\" \"c\" \"e\" \"e\" \"e\" #> #> `old$z`: \"Z\" \"Y\" \"X\" \"X\" \"W\" \"V\" \"U\" #> `new$z`: \"Z\" \"Y\" \"X\" \"W\" \"V\" \"U\" \"W\" \"V\" \"U\""},{"path":"https://allenbaron.github.io/DO.utils/reference/lexiclean.html","id":null,"dir":"Reference","previous_headings":"","what":"Prepare Text for Matching — lexiclean","title":"Prepare Text for Matching — lexiclean","text":"Process text improve exact, quasi-exact /lexical text matching (e.g. \"lexical cleaning\").","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/lexiclean.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prepare Text for Matching — lexiclean","text":"","code":"lexiclean(x, mod = \"all\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/lexiclean.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prepare Text for Matching — lexiclean","text":"x character vector. mod Desired modifications, character string: \"\" : Use modifications. \"lc\" : Convert lowercase. \"roman\" : Convert numbers roman numerals. \"rm_space\" : Remove spaces, defined [:space:], see regex(). \"rm_punct\" : Remove punctuation, defined [:punct:], see regex().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/lexiclean.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prepare Text for Matching — lexiclean","text":"character vector specified modifications applied.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/lexiclean.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Prepare Text for Matching — lexiclean","text":"","code":"x <- c(\"disease\", \"X-linked exudative vitreoretinopathy 2\", \"hepatitis D\", \"dilated cardiomyopathy 1FF\", \"chromosome 15q25 deletion syndrome\", \"spinocerebellar ataxia type 19/22\", \"Addison's disease\", \"disease type II\", \"B-lymphoblastic leukemia/lymphoma, BCR-ABL1–like\") lexiclean(x) #> [1] \"disease\" #> [2] \"xlinkedexudativevitreoretinopathyii\" #> [3] \"hepatitisd\" #> [4] \"dilatedcardiomyopathyiff\" #> [5] \"chromosomexvqxxvdeletionsyndrome\" #> [6] \"spinocerebellarataxiatypexixxxii\" #> [7] \"addisonsdisease\" #> [8] \"diseasetypeii\" #> [9] \"blymphoblasticleukemialymphomabcrablilike\" lexiclean(x, \"roman\") #> [1] \"disease\" #> [2] \"X-linked exudative vitreoretinopathy II\" #> [3] \"hepatitis D\" #> [4] \"dilated cardiomyopathy IFF\" #> [5] \"chromosome XVqXXV deletion syndrome\" #> [6] \"spinocerebellar ataxia type XIX/XXII\" #> [7] \"Addison's disease\" #> [8] \"disease type II\" #> [9] \"B-lymphoblastic leukemia/lymphoma, BCR-ABLI–like\""},{"path":"https://allenbaron.github.io/DO.utils/reference/lgl_predicates.html","id":null,"dir":"Reference","previous_headings":"","what":"Logical predicate — lgl_predicates","title":"Logical predicate — lgl_predicates","text":"predicate designed identify boolean vectors (.e. length 1 logical vectors).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/lgl_predicates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logical predicate — lgl_predicates","text":"","code":"is_boolean(x)"},{"path":"https://allenbaron.github.io/DO.utils/reference/lgl_predicates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logical predicate — lgl_predicates","text":"x vector tested","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/make_contributor_html.html","id":null,"dir":"Reference","previous_headings":"","what":"Make ","title":"Make ","text":"Makes \"Contributor\"
  • elements disease-ontology.org. Can used ontology given appropriate input.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/make_contributor_html.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make ","text":"","code":"make_contributor_html(contrib_df)"},{"path":"https://allenbaron.github.io/DO.utils/reference/make_contributor_html.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make ","text":"contrib_df data.frame information contributors, including required columns: 'name', 'team_member', 'github', 'orcid'. 'github' 'orcid' columns can data missing least one present contributor.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/make_contributor_html.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make ","text":"","code":"if (FALSE) { # interactive() trans_contributors <- googlesheets4::read_sheet( ss = \"1kD7rgOWO2uVUwKYoKFSLBEpv1WZFf-GDhEusAq_H5sM\", sheet = \"TRANS\", col_types = \"c\" ) %>% dplyr::mutate(dplyr::across(dplyr::everything(), readr::parse_guess)) trans_contributors make_contributors_html(trans_contributors) }"},{"path":"https://allenbaron.github.io/DO.utils/reference/make_use_case_html.html","id":null,"dir":"Reference","previous_headings":"","what":"Make HTML for DO Use Case Tables — make_use_case_html","title":"Make HTML for DO Use Case Tables — make_use_case_html","text":"Makes row cell html code various sections/tables disease-ontology.org \"Use Cases\" page team's \"DO_uses\" google sheet. function explicitly avoids including html code defining table provide flexibility. \"html\" output files specified must manually copied pasted disease-ontology.org \"Use Cases\" file appropriate section/table.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/make_use_case_html.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make HTML for DO Use Case Tables — make_use_case_html","text":"","code":"make_use_case_html(out_dir = \"graphics/website\", group = \"all\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/make_use_case_html.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make HTML for DO Use Case Tables — make_use_case_html","text":"out_dir path directory output saved, string. group group(s) generate html , character vector. One : \"\" (default), \"ontology\", \"resource\", \"methodology\".","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/make_use_case_html.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make HTML for DO Use Case Tables — make_use_case_html","text":"One \"html\" file out_dir group named \"DO_use_case-{group}.html\" \"User\" data Google Sheet invisibly.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/make_user_list_html.html","id":null,"dir":"Reference","previous_headings":"","what":"Make HTML for DO User List (DEPRECATED) — make_user_list_html","title":"Make HTML for DO User List (DEPRECATED) — make_user_list_html","text":"Makes row cell html code \"Users Disease Ontology\" section collaborators page disease-ontology.org team's \"Uses\" google sheet. function explicitly avoids including html code defining table provide flexibility.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/make_user_list_html.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make HTML for DO User List (DEPRECATED) — make_user_list_html","text":"","code":"make_user_list_html(file)"},{"path":"https://allenbaron.github.io/DO.utils/reference/make_user_list_html.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make HTML for DO User List (DEPRECATED) — make_user_list_html","text":"file file path output saved, string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/make_user_list_html.html","id":"deprecation-notice","dir":"Reference","previous_headings":"","what":"Deprecation Notice","title":"Make HTML for DO User List (DEPRECATED) — make_user_list_html","text":"information formatting disease-ontology.org moved \"Collaborators\" page new \"Use Cases\" page mid-2022 split one section three, making function obsolete. Use make_use_case_html() instead.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_arg_several.html","id":null,"dir":"Reference","previous_headings":"","what":"Match Length-2+ Vector Arguments — match_arg_several","title":"Match Length-2+ Vector Arguments — match_arg_several","text":"Matches arguments several inputs allowed set choices. Similar base::match.arg() several.ok = TRUE EXCEPT match_arg_several() signal error unmatching values arg instead silently dropping .","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_arg_several.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Match Length-2+ Vector Arguments — match_arg_several","text":"","code":"match_arg_several(arg, choices)"},{"path":"https://allenbaron.github.io/DO.utils/reference/match_arg_several.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Match Length-2+ Vector Arguments — match_arg_several","text":"arg Function argument, character vector, NULL. choices Candidate values, character vector.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_carefully.html","id":null,"dir":"Reference","previous_headings":"","what":"Matches Carefully — match_carefully","title":"Matches Carefully — match_carefully","text":"Wrapper base::match() match NA values. Uses dplyr::if_else() skip NA values.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_carefully.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Matches Carefully — match_carefully","text":"","code":"match_carefully(x, table, nomatch = NA_integer_, incomparables = NULL)"},{"path":"https://allenbaron.github.io/DO.utils/reference/match_carefully.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Matches Carefully — match_carefully","text":"x vector NULL: values matched. Long vectors supported. table vector NULL: values matched . Long vectors supported. nomatch value returned case match found. Note coerced integer. incomparables vector values matched. value x matching value vector assigned nomatch value. historical reasons, FALSE equivalent NULL.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_citations.html","id":null,"dir":"Reference","previous_headings":"","what":"Citation Matching — match_citations","title":"Citation Matching — match_citations","text":"Essentially, base::match() tailored citations. Returns vector positions (first) matches citation input (first argument) reference citation input (second argument) based common publication IDs (PMID, PMCID, DOI).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_citations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Citation Matching — match_citations","text":"","code":"match_citations(x, ref, add_col = NULL, nomatch = NA_integer_)"},{"path":"https://allenbaron.github.io/DO.utils/reference/match_citations.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Citation Matching — match_citations","text":"x, ref vector PMID, PMCID, DOI, Scopus IDs; \"citation\" dataframe 1 columns (column names correspond ID type; case-insensitive) add_col name column add x match results, string, NULL (default) results returned vector. nomatch value returned case match found. Note coerced integer.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_citations.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Citation Matching — match_citations","text":"x vector add_col FALSE (default), integer vector length x (data.frame, length equal number rows). x data.frame add_col TRUE, mutated data.frame cite_match integer column identifying match positions ref.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_citations.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Citation Matching — match_citations","text":"citation inputs can vectors, data.frames, mix. matching, input requires least one vector containing one three standard, consistent publication identifiers (PMID, PMCID, DOI). Columns data.frames identified name (case-insensitive, e.g. 'PMID' 'pmid'). inputs data.frames, match_citations() match ID types present inputs, returning matches highest priority ID type (priority: PMID > PMCID > DOI > Scopus EID). also tells user ID columns identified order used message. matching citation ref can found, NA returned.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_fz.html","id":null,"dir":"Reference","previous_headings":"","what":"Fuzzy (Approximate) String Matching — match_fz","title":"Fuzzy (Approximate) String Matching — match_fz","text":"Wraps stringdist::amatch() perform \"fuzzy\" (approximate) string matching providing informative output. Instead integer vector best match positions, function returns tibble input, corresponding best match, approximate string distance.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_fz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fuzzy (Approximate) String Matching — match_fz","text":"","code":"match_fz(x, table, method = \"lcs\", maxDist = 115, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/match_fz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fuzzy (Approximate) String Matching — match_fz","text":"x elements approximately matched: coerced character unless list consisting integer vectors. table lookup table matching. coerced character unless list consting integer vectors. method Matching algorithm use. See stringdist-metrics. maxDist Elements x matched elements table distance larger maxDist. Note maximum distance strings depends method: always specified. ... arguments passed stringdist::amatch()","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_fz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fuzzy (Approximate) String Matching — match_fz","text":"tibble 3 columns: x table_match: closest match x dist: distance x closest match (given method selected","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/match_fz.html","id":"notes","dir":"Reference","previous_headings":"","what":"NOTES","title":"Fuzzy (Approximate) String Matching — match_fz","text":"Fuzzy string matching SLOW. Expect function take >1 min comparisons 500 values methods. comparison citation titles specifically, \"lcs\" method faster \"osa\" seems work better. Based light experimentation, good setting maxDist value citation titles 80-115.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/multimaps.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify One-to-Multiple Mappings — multimaps","title":"Identify One-to-Multiple Mappings — multimaps","text":"Identifies values x map multiple values y specified mapping predicates.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/multimaps.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify One-to-Multiple Mappings — multimaps","text":"","code":"multimaps( x, pred, y, include_pred = c(\"skos:exactMatch\", \"skos:closeMatch\", \"oboInOwl:hasDbXref\"), when_pred_NA = \"error\" )"},{"path":"https://allenbaron.github.io/DO.utils/reference/multimaps.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify One-to-Multiple Mappings — multimaps","text":"x Vector subject mappings (.e. tested; \"one\" \"one--multiple\" test). pred Vector predicate(s) mappings. Predicate(s) formatted CURIEs can include multiple delimited predicates. y Vector object mappings (.e. counted; \"multiple\" \"one--multiple\" test). include_pred predicates include testing one--multiple mappings, character vector (default: skos:exactMatch, skos:closeMatch, oboInOwl:hasDbXref). predicates ignored. when_pred_NA missing predicates detected, string; one \"error\" (default), \"warn\", NULL (nothing). NA predicates always ignored mapping exists (.e. one corresponding values x y /also NA).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/multimaps.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify One-to-Multiple Mappings — multimaps","text":"logical vector specifying positions x map multiple values y. Incomplete mappings, values x, y, NA, ignored return FALSE.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/ns_prefix.html","id":null,"dir":"Reference","previous_headings":"","what":"Namespace Prefixes — ns_prefix","title":"Namespace Prefixes — ns_prefix","text":"Prefixes namespaces, primarily sourced ROBOT, cover uses OBO Foundry ontologies, slight modification match prefixes used Human Disease Ontology additional prefixes cross-references -related SPARQL query support.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/ns_prefix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Namespace Prefixes — ns_prefix","text":"","code":"ns_prefix obo_prefix obo_prop_prefix not_obo_prefix"},{"path":"https://allenbaron.github.io/DO.utils/reference/ns_prefix.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Namespace Prefixes — ns_prefix","text":"Character vectors namespaces named corresponding prefix: ns_prefix: Superset 533 objects listed . obo_prefix: 255 standard OBO Foundry namespaces (e.g. AAO = \"http://purl.obolibrary.org/obo/AAO_\"). obo_prop_prefix: 255 OBO Foundry property namespaces; may actual use (e.g. aao = \"http://purl.obolibrary.org/obo/aao#\") not_obo_prefix: 21 namespaces outside commonly used OBO Foundry (e.g. dc = \"http://purl.org/dc/elements/1.1/\"), federated SPARQL queries (e.g.  = \"http://purl.uniprot.org/core/\").","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/ns_prefix.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Namespace Prefixes — ns_prefix","text":"ROBOT (v1.9.4) via data-raw/ns_prefix.R; last updated 2023-06-12.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/num_val_predicates.html","id":null,"dir":"Reference","previous_headings":"","what":"Number value predicates — num_val_predicates","title":"Number value predicates — num_val_predicates","text":"value predicates designed identify common values appear numeric vectors.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/num_val_predicates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number value predicates — num_val_predicates","text":"","code":"is_positive(x) is_negative(x) is_whole_number(x, tol = .Machine$double.eps) is_scalar_whole_number(x, tol = .Machine$double.eps)"},{"path":"https://allenbaron.github.io/DO.utils/reference/num_val_predicates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number value predicates — num_val_predicates","text":"x vector tested tol value specifiying precision desired (see .Machine double info)","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/num_val_predicates.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Number value predicates — num_val_predicates","text":"is_whole_number() generally used whole number desired (whether integer double) instead base::.integer rlang::is_integer family test data type value.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/obo_ID_predicates.html","id":null,"dir":"Reference","previous_headings":"","what":"OBO ID predicates — obo_ID_predicates","title":"OBO ID predicates — obo_ID_predicates","text":"predicates designed identify validate common ID formats defined within OBO Foundry ontologies.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/obo_ID_predicates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OBO ID predicates — obo_ID_predicates","text":"","code":"is_valid_obo(x) is_valid_doid(x)"},{"path":"https://allenbaron.github.io/DO.utils/reference/obo_ID_predicates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"OBO ID predicates — obo_ID_predicates","text":"x set IDs, character vector.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/obo_ID_predicates.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"OBO ID predicates — obo_ID_predicates","text":"is_valid_obo() determine identifiers match OBO Foundry IRI pattern obo:LUI CURIE. is_valid_doid() determine identifiers match 's IRI CURIE pattern.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/obo_ID_predicates.html","id":"notes","dir":"Reference","previous_headings":"","what":"Notes","title":"OBO ID predicates — obo_ID_predicates","text":"predicates attempt confirm ID actually exists OBO Foundry ontology, test IDs syntactically formatted correctly (see OBO Foundry ID Policy OBO File Specification). OBO formats valid DOID formats vice versa.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/obo_ID_predicates.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"OBO ID predicates — obo_ID_predicates","text":"","code":"# OBO formats obo_id <- c( #### valid #### \"http://purl.obolibrary.org/obo/DOID_0001816\", # URI \"\", # bracketed_URI \"obo:DOID_4\", # CURIE, standard version \"obo:so#has_origin\", # '#' separator ~ OBO annotation properties #### invalid #### \"0001816\", # bare number without prefix \"obo:DOID:14566\", # namespace-lui separator must be '_' or '#' \" obo:HP_0000001\" # must have NO `[:space:]` characters ) is_valid_obo(obo_id) #> [1] TRUE TRUE TRUE TRUE FALSE FALSE FALSE # DOID formats doid <- c( #### valid #### \"http://purl.obolibrary.org/obo/DOID_0001816\", # URI \"DOID:4\", # CURIE, standard version \"obo:DOID_4\", # OBO CURIE, less common \"DOID_0040001\", # basename (OBO prefix removed) #### invalid #### \"0001816\", # bare number without prefix \"doid#DO_IEDB_slim\", # namespace-lui separator must be '_' \"obo:doid#DO_IEDB_slim\", \"obo:DOID_21 \" # must have NO `[:space:]` characters ) is_valid_doid(doid) #> [1] TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE"},{"path":"https://allenbaron.github.io/DO.utils/reference/obofoundry_metadata.html","id":null,"dir":"Reference","previous_headings":"","what":"OBO Foundry Metadata — obofoundry_metadata","title":"OBO Foundry Metadata — obofoundry_metadata","text":"Metadata OBO Foundry ontologies.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/obofoundry_metadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OBO Foundry Metadata — obofoundry_metadata","text":"","code":"obofoundry_metadata"},{"path":"https://allenbaron.github.io/DO.utils/reference/obofoundry_metadata.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"OBO Foundry Metadata — obofoundry_metadata","text":"data frame 22 variables: id title domain description activity_status is_obsolete replaced_by ontology_purl preferred_prefix homepage contact_name contact_email contact_github license_label taxon_id taxon_label twitter facebook publications in_foundry_order in_foundry build_infallible","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/obofoundry_metadata.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"OBO Foundry Metadata — obofoundry_metadata","text":"http://www.obofoundry.org/registry/ontologies.jsonld, last accessed 2021-11-05.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/onto_missing.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify Data Missing from an Ontology (DEPRECATED) — onto_missing","title":"Identify Data Missing from an Ontology (DEPRECATED) — onto_missing","text":"Identifies data missing ontology. Currently works mappings, includes xrefs skos matches. Requires ROBOT comparison.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/onto_missing.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify Data Missing from an Ontology (DEPRECATED) — onto_missing","text":"","code":"onto_missing(onto_path, input, what = \"OMIM\", report_present = TRUE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/onto_missing.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify Data Missing from an Ontology (DEPRECATED) — onto_missing","text":"onto_path path ontology -edit file, string. input path TSV/CSV file data compare data ontology, string. compare two files, string. report_present Whether report data present ontology (default) along data missing, boolean.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/onto_missing.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify Data Missing from an Ontology (DEPRECATED) — onto_missing","text":"report_present = TRUE (default), list two data.frames indicating data ontology (in_onto) data missing (missing); otherwise, single data.frame showing missing data .","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/onto_missing.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Identify Data Missing from an Ontology (DEPRECATED) — onto_missing","text":"","code":"if (FALSE) { onto_missing( onto_path = \"~/Ontologies/HumanDiseaseOntology/src/ontology/doid-edit.owl\", input = \"omimps.csv\", # e.g. manually copied from https://www.omim.org/phenotypicSeries/PS609060 \"OMIM\" ) }"},{"path":"https://allenbaron.github.io/DO.utils/reference/owl_xml.html","id":null,"dir":"Reference","previous_headings":"","what":"Instantiate an owl_xml object — owl_xml","title":"Instantiate an owl_xml object — owl_xml","text":"Instantiate python owl.xml object pyDOID package (powered reticulate). file loaded memory instantiated. Though named \"owl\" method also work RDF files.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/owl_xml.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Instantiate an owl_xml object — owl_xml","text":"","code":"owl_xml(path)"},{"path":"https://allenbaron.github.io/DO.utils/reference/owl_xml.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Instantiate an owl_xml object — owl_xml","text":"path path OWL (RDF) XML-formatted file, string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/owl_xml.html","id":"classes-amp-methods","dir":"Reference","previous_headings":"","what":"Classes & Methods","title":"Instantiate an owl_xml object — owl_xml","text":"owl.xml class thinly wraps small set python rdflib methods enable SPARQL 1.1 queries, following methods: owl_xml$query(query, reload): Execute SPARQL 1.1 query. query may string path .sparql/.rq file. Use reload = TRUE force reload file memory; useful iterating releases/tags DOrepo$tag_iterate(). owl_xml$load(): Manually load file memory. Generally, necessary.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/parse_mapping.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse Mapping — parse_mapping","title":"Parse Mapping — parse_mapping","text":"Parses mappings generated pyobo_map() otherwise produced python module GILDA.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/parse_mapping.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse Mapping — parse_mapping","text":"","code":"parse_mapping(py_gilda_res_list, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/parse_mapping.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse Mapping — parse_mapping","text":"py_gilda_res_list named list term mapping lists (see parse_term_mapping()), likely generated pyobo_map(). ... Arguments passed extract_ScoredMatch, parse_term_mapping prefix Optional prefix add namespace local unique identifiers (LUI; e.g. 4, LUI \"disease\" ), string; preferably create complete namespace ID (e.g. \"DOID:4\"). prefix_sep Optional separator placed prefix namespace LUIs, string. Ignored prefix = NULL. best_only Whether return best scoring result(s) , boolean. FALSE return results. NOTE: TRUE return one result case ties. warn_best_gt1 Whether warn best mapping ties exist term.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/parse_mapping.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parse Mapping — parse_mapping","text":"List data frames mapping result(s) term.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/parse_term_mapping.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse Mapping for Single Term (INTERNAL) — parse_term_mapping","title":"Parse Mapping for Single Term (INTERNAL) — parse_term_mapping","text":"Parses mappings generated pyobo_map() otherwise produced python module GILDA LEVEL single input term.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/parse_term_mapping.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse Mapping for Single Term (INTERNAL) — parse_term_mapping","text":"","code":"parse_term_mapping( py_gilda_term_mappings, best_only = TRUE, warn_best_gt1 = FALSE, ... )"},{"path":"https://allenbaron.github.io/DO.utils/reference/parse_term_mapping.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse Mapping for Single Term (INTERNAL) — parse_term_mapping","text":"py_gilda_term_mappings list mappings single input term one namespace terms (stored specialized ScoredMatch python objects, defined GILDA; see extract_ScoredMatch). best_only Whether return best scoring result(s) , boolean. FALSE return results. NOTE: TRUE return one result case ties. warn_best_gt1 Whether warn best mapping ties exist term. ... Arguments passed extract_ScoredMatch prefix Optional prefix add namespace local unique identifiers (LUI; e.g. 4, LUI \"disease\" ), string; preferably create complete namespace ID (e.g. \"DOID:4\"). prefix_sep Optional separator placed prefix namespace LUIs, string. Ignored prefix = NULL.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/parse_term_mapping.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parse Mapping for Single Term (INTERNAL) — parse_term_mapping","text":"List data frames mapping result(s) term.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Pipe operator — %>%","title":"Pipe operator — %>%","text":"See magrittr::%>% details.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pipe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pipe operator — %>%","text":"","code":"lhs %>% rhs"},{"path":"https://allenbaron.github.io/DO.utils/reference/pipe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pipe operator — %>%","text":"lhs value magrittr placeholder. rhs function call using magrittr semantics.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pipe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pipe operator — %>%","text":"result calling rhs(lhs).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_branch_counts.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Branch Counts — plot_branch_counts","title":"Plot Branch Counts — plot_branch_counts","text":"Plots count non-obsolete terms major branch Human Disease Ontology.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_branch_counts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Branch Counts — plot_branch_counts","text":"","code":"plot_branch_counts( DO_repo, out_dir = \"graphics/website\", w = 8, h = 5.6, aspect_ratio = 1 )"},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_branch_counts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Branch Counts — plot_branch_counts","text":"DO_repo local path HumanDiseaseOntology repo, string, DOrepo object. out_dir directory plot \"DO_branch_count.png\" saved, string. NULL, plot saved disk. w width plot inches, numeric. h height plot inches, numeric. aspect_ratio aspect ratio panel (.e. plot area), numeric. NULL, aspect ratio set.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_citedby.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Publications Citing DO by Year — plot_citedby","title":"Plot Publications Citing DO by Year — plot_citedby","text":"Plots count publications cite Human Disease Ontology year.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_citedby.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Publications Citing DO by Year — plot_citedby","text":"","code":"plot_citedby( data_file = \"data/citedby/DO_citedby.csv\", out_dir = \"graphics/website\", color_set = c(Article = \"#4C3E45\", `Clinical Trial` = \"#B9964B\", Book = \"#83C85F\", Conference = \"#95B1BB\", Review = \"#934FBB\", Other = \"#C45055\", Retracted = \"#000000\"), retracted = \"warn\", w = 6, h = 3.15 )"},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_citedby.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Publications Citing DO by Year — plot_citedby","text":"data_file path file containing list publications citing , string. out_dir directory plot \"DO_cited_by_count.png\" saved, string. NULL plot saved disk. color_set named set 7 colors, one possible publication types (see Colors section) prefix color set use DO_colors, character vector. retracted handle retracted publications, string. One : \"warn\" (default) drop warning. \"include\" display plot category. \"\" include \"\" category. w width plot inches, numeric. h height plot inches, numeric.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_citedby.html","id":"data-preparation","dir":"Reference","previous_headings":"","what":"Data Preparation","title":"Plot Publications Citing DO by Year — plot_citedby","text":"prepare data, execute scripts/citedby_full_procedure.R.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_citedby.html","id":"colors","dir":"Reference","previous_headings":"","what":"Colors","title":"Plot Publications Citing DO by Year — plot_citedby","text":"specifying color set manually, one color included following publication types: \"Article\", \"Book\", \"Clinical Trial\", \"Conference\", \"Review\", \"\", \"Retracted\". \"\" serves catch category (generally small subset otherwise uncategorized publications). Sets available DO_colors include: \"sat\" (saturated), \"accent1\", \"accent2\", \"orange\". default light versions specified color set used generate gradient.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_def_src.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Definition Sources — plot_def_src","title":"Plot Definition Sources — plot_def_src","text":"Plots count definition sources non-obsolete terms Human Disease Ontology.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_def_src.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Definition Sources — plot_def_src","text":"","code":"plot_def_src(DO_repo, out_dir = \"graphics/website\", w = 8, h = 5.6)"},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_def_src.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Definition Sources — plot_def_src","text":"DO_repo local path HumanDiseaseOntology repo, string. out_dir directory plot \"DO_def_src.png\" saved, string. NULL plot saved disk. w width plot inches, numeric. h height plot inches, numeric.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_def_src.html","id":"data-preparation","dir":"Reference","previous_headings":"","what":"Data Preparation","title":"Plot Definition Sources — plot_def_src","text":"plot added disease-ontology.org, latest release HumanDiseaseOntology Github repo checked prior running function.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_term_def_counts.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot DO Term & Definition Counts — plot_term_def_counts","title":"Plot DO Term & Definition Counts — plot_term_def_counts","text":"Plots count non-obsolete terms definitions Human Disease Ontology time (using data release).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_term_def_counts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot DO Term & Definition Counts — plot_term_def_counts","text":"","code":"plot_term_def_counts( release_file = \"data/DO_release/DO_release_details.csv\", counts_file = \"data/DO_release/DO_term_def_counts.csv\", out_dir = \"graphics/website\", w = 8, h = 5.6 )"},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_term_def_counts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot DO Term & Definition Counts — plot_term_def_counts","text":"release_file path file containing release details, string. counts_file path file containing count terms definitions release, string. out_dir directory plot \"DO_term_def_count.png\" saved, string. NULL plot saved disk. w width plot inches, numeric. h height plot inches, numeric.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_term_def_counts.html","id":"data-preparation","dir":"Reference","previous_headings":"","what":"Data Preparation","title":"Plot DO Term & Definition Counts — plot_term_def_counts","text":"prepare data, execute: scripts/DO_term_def_counts.R - requires installation python virtual environment using scripts/install_reticulate_python.R. scripts/DO_release_details.R","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_xref_counts.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Xref Counts — plot_xref_counts","title":"Plot Xref Counts — plot_xref_counts","text":"Plots count cross-references source Human Disease Ontology.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_xref_counts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Xref Counts — plot_xref_counts","text":"","code":"plot_xref_counts(DO_repo, out_dir = \"graphics/website\", w = 8, h = 5.6)"},{"path":"https://allenbaron.github.io/DO.utils/reference/plot_xref_counts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Xref Counts — plot_xref_counts","text":"DO_repo local path HumanDiseaseOntology repo, string, DOrepo object. out_dir directory plot \"DO_xref_count.png\" saved, string. NULL plot saved disk. w width plot inches, numeric. h height plot inches, numeric.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pmc_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Get PubMed Central Summary — pmc_summary","title":"Get PubMed Central Summary — pmc_summary","text":"Retrieves PubMed Central Summary information specified publications. Acts exactly manner pubmed_summary(). Consult documentation details.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pmc_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get PubMed Central Summary — pmc_summary","text":"","code":"pmc_summary(input, config = NULL, version = \"2.0\", retmode = \"xml\", ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/pmc_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get PubMed Central Summary — pmc_summary","text":"input One following: 1. vector unique PubMed Central IDs. 2. list vectors unique PubMed Central IDs. 3. web_history object (see NCBI Entrez API documentation information). config vector configuration options passed httr::GET version Argument included flexibility, best left defaults set; see rentrez::entrez_summary() details. retmode \"xml\" (default) \"json\"; \"xml\" preferred higher response limit. default opposite rentrez::entrez_summary() default. ... character Additional terms add request, see NCBI documentation linked references complete list","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/print.oieb.html","id":null,"dir":"Reference","previous_headings":"","what":"Print OMIM inventory report statistics — print.oieb","title":"Print OMIM inventory report statistics — print.oieb","text":"Prints OMIM inventory report statistics.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/print.oieb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print OMIM inventory report statistics — print.oieb","text":"","code":"# S3 method for oieb print(x, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/print.oieb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print OMIM inventory report statistics — print.oieb","text":"x object class oieb. ... Arguments passed base::print.default digits non-null value digits specifies minimum number significant digits printed values. default, NULL, uses getOption(\"digits\"). ( interpretation complex numbers see signif.) Non-integer values rounded , values greater equal 1 greater 22 accepted. na.print character string used indicate NA values printed output, NULL (see ‘Details’). print.gap non-negative integer \\(\\le 1024\\), NULL (meaning 1), giving spacing adjacent columns printed vectors, matrices arrays. right logical, indicating whether strings right aligned. default left alignment. max non-null value max specifies approximate maximum number entries printed. default, NULL, uses getOption(\"max.print\"): see help page details. width controls maximum number columns line used printing vectors, matrices, etc. default, NULL, uses getOption(\"width\"): see help page details including allowed values. useSource logical, indicating whether use source references copies rather deparsing language objects. default use original source available.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/priority_sort.html","id":null,"dir":"Reference","previous_headings":"","what":"Sort Vectors by Priority — priority_sort","title":"Sort Vectors by Priority — priority_sort","text":"Sort vectors, prioritizing according levels specified. Uses base::factor() internally unspecified arguments disabled.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/priority_sort.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sort Vectors by Priority — priority_sort","text":"","code":"priority_sort(x, levels, exclude = NA)"},{"path":"https://allenbaron.github.io/DO.utils/reference/priority_sort.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sort Vectors by Priority — priority_sort","text":"x vector data, usually taking small number distinct values. levels optional vector unique values (character strings) x might taken. default unique set values taken .character(x), sorted increasing order x. Note set can specified smaller sort(unique(x)). exclude vector values excluded forming set levels. may factor level set x character.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/progress_bar-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Progress Bar (RefClass) — progress_bar-class","title":"Progress Bar (RefClass) — progress_bar-class","text":"Instantiate base R-style progress bar advances one 'tick' time.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/progress_bar-class.html","id":"fields","dir":"Reference","previous_headings":"","what":"Fields","title":"Progress Bar (RefClass) — progress_bar-class","text":"bar progress_bar object created utils::txtProgressBar(). tick integer track progress.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/progress_bar-class.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Progress Bar (RefClass) — progress_bar-class","text":"advance(...) Advances progress bar one tick. initialize(n, ...) Initializes progress bar called progress_bar$new(n, ...). n: Total number ticks. ...: Arguments passed utils::txtProgressBar().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pub_id_match.html","id":null,"dir":"Reference","previous_headings":"","what":"Prioritized List of Publication IDs & Regex's for Matching — pub_id_match","title":"Prioritized List of Publication IDs & Regex's for Matching — pub_id_match","text":"Prioritized List Publication IDs & Regex's Matching","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pub_id_match.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prioritized List of Publication IDs & Regex's for Matching — pub_id_match","text":"","code":"pub_id_match"},{"path":"https://allenbaron.github.io/DO.utils/reference/pub_id_match.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Prioritized List of Publication IDs & Regex's for Matching — pub_id_match","text":"length-4 character vector named regex's prioritized follows:","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pubmed_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Get PubMed Summary — pubmed_summary","title":"Get PubMed Summary — pubmed_summary","text":"Retrieves PubMed Summary information specified publications. Acts wrapper around rentrez::entrez_summary allow larger number IDs input (using rentrez::entrez_post) input ID list (addition id vector web_history object).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pubmed_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get PubMed Summary — pubmed_summary","text":"","code":"pubmed_summary(input, config = NULL, version = \"2.0\", retmode = \"xml\", ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/pubmed_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get PubMed Summary — pubmed_summary","text":"input One following: 1) vector unique PubMed IDs, 2) list vectors PubMed IDs (example, output citedby_pmid(.... by_id = TRUE) > extract_pmid()), 3) web_history object (see NCBI Entrez API documentation information). config vector configuration options passed httr::GET version Argument included flexibility, best left defaults set; see rentrez::entrez_summary() details. retmode \"xml\" (default) \"json\"; \"xml\" preferred higher response limit. default opposite rentrez::entrez_summary() default. ... character Additional terms add request, see NCBI documentation linked references complete list","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pubs.html","id":null,"dir":"Reference","previous_headings":"","what":"Publication Info — pubs","title":"Publication Info — pubs","text":"Datasets describing official publications Human Disease Ontology project, grouped ontology. Data includes publication identifiers various sources, along publication titles NLM-formatted citations. DO_pubs: Human Disease Ontology publications ST_pubs: Symptom Ontology & Pathogen Transmission Ontology publications","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pubs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Publication Info — pubs","text":"","code":"DO_pubs ST_pubs"},{"path":"https://allenbaron.github.io/DO.utils/reference/pubs.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Publication Info — pubs","text":"data frame consists 10 variables: internal_id short-version identifier used team pmid PubMed ID pmcid PubMed Central ID doi DOI scopus_eid Scopus Electronic Identification, Scopus ID lens_id Lens.org ID semantic_scholar_id Semantic Scholar Corpus ID first_author Publication First Author title Publication Title citation_nlm Full NLM-formatted citation DO_pubs includes 10 publications. ST_pubs includes 1 publications.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pubs.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Publication Info — pubs","text":"Compiled J. Allen Baron; last updated 2022-07-22.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pyDOID.html","id":null,"dir":"Reference","previous_headings":"","what":"pyDOID — pyDOID","title":"pyDOID — pyDOID","text":"pyDOID python package developed intent .utils, provide methods updating, maintaining, organizing, analyzing Human Disease Ontology. .utils, powered reticulate, wraps pyDOID functionality currently unavailable R. pyDOID provides two primary classes: DOrepo class owl.xml class. Classes methods accessible via $ notation.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pyDOID.html","id":"version","dir":"Reference","previous_headings":"","what":"Version","title":"pyDOID — pyDOID","text":"Documentation assumes pyDOID >= v0.1.2","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pyDOID.html","id":"dorepo-class","dir":"Reference","previous_headings":"","what":"DOrepo class","title":"pyDOID — pyDOID","text":"DOrepo class inherits methods & subclasses GitPython.repo.Repo class adds additional classes & methods, see DOrepo() details.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pyDOID.html","id":"owl-xml-class","dir":"Reference","previous_headings":"","what":"owl.xml class","title":"pyDOID — pyDOID","text":"owl.xml class thinly wraps small set python rdflib methods enable SPARQL 1.1 queries, see owl_xml() details.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pyobo_map.html","id":null,"dir":"Reference","previous_headings":"","what":"Map Terms to Terms of Specified Namespace — pyobo_map","title":"Map Terms to Terms of Specified Namespace — pyobo_map","text":"Map term terms specified namespace (e.g. \"DOID\") using PyOBO (dependency biopragmatics INDRA labs programs; e.g. GILDA, bioregistry). INDRA labs terminology, GILDA grounds (predicts matches ) term namespace terms.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pyobo_map.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map Terms to Terms of Specified Namespace — pyobo_map","text":"","code":"pyobo_map(terms, namespace)"},{"path":"https://allenbaron.github.io/DO.utils/reference/pyobo_map.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map Terms to Terms of Specified Namespace — pyobo_map","text":"terms Term(s) map, character vector. namespace Namespace map terms (according bioregistry), string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/pyobo_map.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Map Terms to Terms of Specified Namespace — pyobo_map","text":"List results term. See parse_mapping() dependencies details format results.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/queue_xref_split.html","id":null,"dir":"Reference","previous_headings":"","what":"Curation Queue: DOIDs to split? — queue_xref_split","title":"Curation Queue: DOIDs to split? — queue_xref_split","text":"Create curation queue DOIDs may need split multiple diseases based fact multiple xrefs source.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/queue_xref_split.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Curation Queue: DOIDs to split? — queue_xref_split","text":"","code":"queue_xref_split(.DOrepo, src = \"all\")"},{"path":"https://allenbaron.github.io/DO.utils/reference/queue_xref_split.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Curation Queue: DOIDs to split? — queue_xref_split","text":".DOrepo path local HumanDiseaseOntology repository pyDOID.repo.DOrepo object created DOrepo(). src xref sources include output identified prefix character vector \"\" (default) include everything.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_alliance.html","id":null,"dir":"Reference","previous_headings":"","what":"Read Alliance .tsv.gz File — read_alliance","title":"Read Alliance .tsv.gz File — read_alliance","text":"Reads .tsv .tsv.gz file Alliance Genome Resources tibble. recommended Alliance files downloaded using download_alliance_tsv().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_alliance.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read Alliance .tsv.gz File — read_alliance","text":"","code":"read_alliance(alliance_tsv)"},{"path":"https://allenbaron.github.io/DO.utils/reference/read_alliance.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read Alliance .tsv.gz File — read_alliance","text":"alliance_tsv path Alliance .tsv .tsv.gz file","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_alliance.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read Alliance .tsv.gz File — read_alliance","text":"dataframe.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_delim_auto.html","id":null,"dir":"Reference","previous_headings":"","what":"Automatically Identify & Read TSV/CSV files (INTERNAL) — read_delim_auto","title":"Automatically Identify & Read TSV/CSV files (INTERNAL) — read_delim_auto","text":"light wrapper around readr::read_delim() automatically identifies delimiter based file extension (can include compression extensions).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_delim_auto.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Automatically Identify & Read TSV/CSV files (INTERNAL) — read_delim_auto","text":"","code":"read_delim_auto(file, ..., show_col_types = FALSE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/read_delim_auto.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Automatically Identify & Read TSV/CSV files (INTERNAL) — read_delim_auto","text":"file Either path file, connection, literal data (either single string raw vector). Files ending .gz, .bz2, .xz, .zip automatically uncompressed. Files starting http://, https://, ftp://, ftps:// automatically downloaded. Remote gz files can also automatically downloaded decompressed. ... Arguments passed readr::read_delim quote Single character used quote strings. escape_backslash file use backslashes escape special characters? general escape_double backslashes can used escape delimiter character, quote character, add special characters like \\\\n. escape_double file escape quotes doubling ? .e. option TRUE, value \"\"\"\" represents single quote, \\\". col_names Either TRUE, FALSE character vector column names. TRUE, first row input used column names, included data frame. FALSE, column names generated automatically: X1, X2, X3 etc. col_names character vector, values used names columns, first row input read first row output data frame. Missing (NA) column names generate warning, filled dummy names ...1, ...2 etc. Duplicate column names generate warning made unique, see name_repair control done. col_types One NULL, cols() specification, string. See vignette(\"readr\") details. NULL, column types inferred guess_max rows input, interspersed throughout file. convenient (fast), robust. guessed types wrong, need increase guess_max supply correct types . Column specifications created list() cols() must contain one column specification column. want read subset columns, use cols_only(). Alternatively, can use compact string representation character represents one column: c = character = integer n = number d = double l = logical f = factor D = date T = date time t = time ? = guess _ - = skip default, reading file without column specification print message showing readr guessed . remove message, set show_col_types = FALSE set `options(readr.show_col_types = FALSE). col_select Columns include results. can use mini-language dplyr::select() refer columns name. Use c() use one selection expression. Although usage less common, col_select also accepts numeric column index. See ?tidyselect::language full details selection language. id name column store file path. useful reading multiple input files data file paths, data collection date. NULL (default) extra column created. locale locale controls defaults vary place place. default locale US-centric (like R), can use locale() create locale controls things like default time zone, encoding, decimal mark, big mark, day/month names. na Character vector strings interpret missing values. Set option character() indicate missing values. comment string used identify comments. text comment characters silently ignored. trim_ws leading trailing whitespace (ASCII spaces tabs) trimmed field parsing ? skip Number lines skip reading data. comment supplied commented lines ignored skipping. n_max Maximum number lines read. guess_max Maximum number lines use guessing column types. never use number lines read. See vignette(\"column-types\", package = \"readr\") details. name_repair Handling column names. default behaviour ensure column names \"unique\". Various repair strategies supported: \"minimal\": name repair checks, beyond basic existence names. \"unique\" (default value): Make sure names unique empty. \"check_unique\": name repair, check unique. \"universal\": Make names unique syntactic. function: apply custom name repair (e.g., name_repair = make.names names style base R). purrr-style anonymous function, see rlang::as_function(). argument passed repair vctrs::vec_as_names(). See details terms strategies used enforce . num_threads number processing threads use initial parsing lazy reading data. data contains newlines within fields parser automatically detect fall back using one thread . However know file newlines within quoted fields safest set num_threads = 1 explicitly. progress Display progress bar? default display interactive session knitting document. automatic progress bar can disabled setting option readr.show_progress FALSE. skip_empty_rows blank rows ignored altogether? .e. option TRUE blank rows represented . FALSE represented NA values columns. lazy Read values lazily? default, FALSE, special considerations reading file lazily tripped users. Specifically, things get tricky reading writing back file. , general, lazy reading (lazy = TRUE) many benefits, especially interactive use downstream work involves subset rows columns. Learn should_read_lazy() documentation altrep argument vroom::vroom(). show_col_types FALSE, show guessed column types. TRUE always show column types, even supplied. NULL (default) show column types explicitly supplied col_types argument.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_delim_auto.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Automatically Identify & Read TSV/CSV files (INTERNAL) — read_delim_auto","text":"Note function primarily intended internal use; therefore, messages guessed column types generated.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_doid_edit.html","id":null,"dir":"Reference","previous_headings":"","what":"Read doid-edit.owl (INTERNAL) — read_doid_edit","title":"Read doid-edit.owl (INTERNAL) — read_doid_edit","text":"Read doid-edit.owl file local copy Human Disease Ontology Github repo.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_doid_edit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read doid-edit.owl (INTERNAL) — read_doid_edit","text":"","code":"read_doid_edit(DO_repo)"},{"path":"https://allenbaron.github.io/DO.utils/reference/read_doid_edit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read doid-edit.owl (INTERNAL) — read_doid_edit","text":"DO_repo local path HumanDiseaseOntology repo, string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_ga.html","id":null,"dir":"Reference","previous_headings":"","what":"Read Google Analytics Exports — read_ga","title":"Read Google Analytics Exports — read_ga","text":"Read exported Google Analytics data saved .csv.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_ga.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read Google Analytics Exports — read_ga","text":"","code":"read_ga(ga_file, read_all = FALSE, tidy = TRUE, keep_total = FALSE, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/read_ga.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read Google Analytics Exports — read_ga","text":"ga_file path Google Analytics .csv file. read_all Whether tables exported file read, logical scalar. FALSE (default), first (main) table read. tidy Whether tables tidied tidy_ga_tbl(), logical scalar (default: TRUE). keep_total Whether keep row totals appears bottom table, logical scalar (default: FALSE). ... Arguments passed readr::read_csv file Either path file, connection, literal data (either single string raw vector). Files ending .gz, .bz2, .xz, .zip automatically uncompressed. Files starting http://, https://, ftp://, ftps:// automatically downloaded. Remote gz files can also automatically downloaded decompressed. Literal data useful examples tests. recognised literal data, input must either wrapped (), string containing least one new line, vector containing least one string new line. Using value clipboard() read system clipboard. quote Single character used quote strings. col_names Either TRUE, FALSE character vector column names. TRUE, first row input used column names, included data frame. FALSE, column names generated automatically: X1, X2, X3 etc. col_names character vector, values used names columns, first row input read first row output data frame. Missing (NA) column names generate warning, filled dummy names ...1, ...2 etc. Duplicate column names generate warning made unique, see name_repair control done. col_types One NULL, cols() specification, string. See vignette(\"readr\") details. NULL, column types inferred guess_max rows input, interspersed throughout file. convenient (fast), robust. guessed types wrong, need increase guess_max supply correct types . Column specifications created list() cols() must contain one column specification column. want read subset columns, use cols_only(). Alternatively, can use compact string representation character represents one column: c = character = integer n = number d = double l = logical f = factor D = date T = date time t = time ? = guess _ - = skip default, reading file without column specification print message showing readr guessed . remove message, set show_col_types = FALSE set `options(readr.show_col_types = FALSE). col_select Columns include results. can use mini-language dplyr::select() refer columns name. Use c() use one selection expression. Although usage less common, col_select also accepts numeric column index. See ?tidyselect::language full details selection language. id name column store file path. useful reading multiple input files data file paths, data collection date. NULL (default) extra column created. locale locale controls defaults vary place place. default locale US-centric (like R), can use locale() create locale controls things like default time zone, encoding, decimal mark, big mark, day/month names. na Character vector strings interpret missing values. Set option character() indicate missing values. quoted_na missing values inside quotes treated missing values (default) strings. parameter soft deprecated readr 2.0.0. comment string used identify comments. text comment characters silently ignored. trim_ws leading trailing whitespace (ASCII spaces tabs) trimmed field parsing ? skip Number lines skip reading data. comment supplied commented lines ignored skipping. n_max Maximum number lines read. guess_max Maximum number lines use guessing column types. never use number lines read. See vignette(\"column-types\", package = \"readr\") details. name_repair Handling column names. default behaviour ensure column names \"unique\". Various repair strategies supported: \"minimal\": name repair checks, beyond basic existence names. \"unique\" (default value): Make sure names unique empty. \"check_unique\": name repair, check unique. \"universal\": Make names unique syntactic. function: apply custom name repair (e.g., name_repair = make.names names style base R). purrr-style anonymous function, see rlang::as_function(). argument passed repair vctrs::vec_as_names(). See details terms strategies used enforce . num_threads number processing threads use initial parsing lazy reading data. data contains newlines within fields parser automatically detect fall back using one thread . However know file newlines within quoted fields safest set num_threads = 1 explicitly. progress Display progress bar? default display interactive session knitting document. automatic progress bar can disabled setting option readr.show_progress FALSE. skip_empty_rows blank rows ignored altogether? .e. option TRUE blank rows represented . FALSE represented NA values columns. lazy Read values lazily? default, FALSE, special considerations reading file lazily tripped users. Specifically, things get tricky reading writing back file. , general, lazy reading (lazy = TRUE) many benefits, especially interactive use downstream work involves subset rows columns. Learn should_read_lazy() documentation altrep argument vroom::vroom().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_omim.html","id":null,"dir":"Reference","previous_headings":"","what":"Read OMIM Data — read_omim","title":"Read OMIM Data — read_omim","text":"Reads formats OMIM data copied manually downloaded https://omim.org/, downloaded download_omim() (permission required), appends columns speed subsequent curation activities.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_omim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read OMIM Data — read_omim","text":"","code":"read_omim(file, keep_mim = c(\"#\", \"%\"), ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/read_omim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read OMIM Data — read_omim","text":"file path file (possibly compressed) copy/pasted manually downloaded https://omim.org/ (see \"Manual Input Requirements\" details), downloaded download_omim(). keep_mim [OMIM search data ] MIM symbols representing data types keep, character vector, NULL retain (default: \"#\" \"%\"). OMIM defined MIM symbols : ... Arguments passed read_delim_auto","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_omim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read OMIM Data — read_omim","text":"omim_tbl (tibble) omim column containing OMIM CURIEs formatted xrefs, followed complete OMIM data arranged seen omim.org OMIM entries (possible). omim.org \"Download \" button used download data, omim_tbl additionally modified based download type: Search list download: Additional omim_search class search column containing search used. OMIM phenotypic series titles download: Additional omim_PS_titles class. OMIM phenotypic series download: Additional omim_PS class row representing OMIM phenotypic series . Output columns typical OMIM phenotype entries, including omim_PS, additional geno_inheritance column containing best guess inheritance GENO ontology. simplifies adding inheritance logical subClassOf axioms supporting curation. NOTE: OMIM phenotypic series https://omim.org/ include data entries column ordered differently.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_omim.html","id":"manual-input-requirements","dir":"Reference","previous_headings":"","what":"Manual Input Requirements","title":"Read OMIM Data — read_omim","text":"file OMIM data copied downloaded must include headers top. data can left copied & pasted omim.org even formatted correctly, read_omim() process correct headers, includes fixing multi-line misarranged column headers, trim whitespace.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_pubmed_txt.html","id":null,"dir":"Reference","previous_headings":"","what":"Read in PubMed Citations (from txt file) — read_pubmed_txt","title":"Read in PubMed Citations (from txt file) — read_pubmed_txt","text":"Reads PubMed text-format citations spanning multiple lines, usually obtained downloading text file PubMed 'Summary (text)'.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_pubmed_txt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read in PubMed Citations (from txt file) — read_pubmed_txt","text":"","code":"read_pubmed_txt(file)"},{"path":"https://allenbaron.github.io/DO.utils/reference/read_pubmed_txt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read in PubMed Citations (from txt file) — read_pubmed_txt","text":"file Path .txt file; another possible input readLines().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/read_pubmed_txt.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read in PubMed Citations (from txt file) — read_pubmed_txt","text":"data.frame record number (n), identifiers (pmid, pmcid, doi), full citation (citation).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. rentrez set_entrez_key tibble as_tibble tidyr replace_na","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_blank.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Blanks with Specified Value — replace_blank","title":"Replace Blanks with Specified Value — replace_blank","text":"Replace blanks specified value.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_blank.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Blanks with Specified Value — replace_blank","text":"","code":"replace_blank(data, replace = NA_character_, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_blank.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Blanks with Specified Value — replace_blank","text":"data data object. replace string use replacement. ... Additional arguments passed methods. currently used.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_blank.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Replace Blanks with Specified Value — replace_blank","text":"data vector, replace_blank() returns vector class data (blanks character vectors modified). data list, replace_blank() recurse list (necessary) replace blank values character/list elements skip internal components (e.g. data.frames, matrices, etc).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_na.list.html","id":null,"dir":"Reference","previous_headings":"","what":"[DEPRECATED] Replace NAs with specified value — replace_na.list","title":"[DEPRECATED] Replace NAs with specified value — replace_na.list","text":"Replace NAs lists specified value. method replace_na recurse nested lists skip internal components lists simple vectors (e.g. data.frames, matrices, etc). NOTE [REQUIRES tidyr <= 1.1.4]: Coercion occur vectors list different types replace, either vector replace coercedaccording type order: logical < integer < numeric < complex < character < list.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_na.list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"[DEPRECATED] Replace NAs with specified value — replace_na.list","text":"","code":"# S3 method for list replace_na(data, replace, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_na.list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"[DEPRECATED] Replace NAs with specified value — replace_na.list","text":"data data frame vector. replace data data frame, replace takes named list values, one value column missing values replaced. value replace cast type column data used replacement . data vector, replace takes single value. single value replaces missing values vector. replace cast type data. ... Additional arguments methods. Currently unused.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_na.list.html","id":"deprecation-note","dir":"Reference","previous_headings":"","what":"DEPRECATION NOTE","title":"[DEPRECATED] Replace NAs with specified value — replace_na.list","text":"\"unsafe\" type conversion allowed replace_na.list() work tidyr v1.2.0, uses \"safe\" type conversion via vctrs::vec_cast(). replace_na.list() work tidyr <= 1.1.4. replace_na.list() frequently needed, removed future updates.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_null.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace NULLs with specified value — replace_null","title":"Replace NULLs with specified value — replace_null","text":"Replace NULLs (lists) specified value. replace_null recurse nested lists skip internal components lists (e.g. data.frames, matrices, etc). NOTE replace also added empty lists (.e. list()) zero-length vectors.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_null.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace NULLs with specified value — replace_null","text":"","code":"replace_null(data, replace)"},{"path":"https://allenbaron.github.io/DO.utils/reference/replace_null.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace NULLs with specified value — replace_null","text":"data list (list column data frame). replace single value use replacement.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/restore_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Restore Element Names — restore_names","title":"Restore Element Names — restore_names","text":"Restores names elements within objects name-removing events.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/restore_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Restore Element Names — restore_names","text":"","code":"restore_names(x, names_from)"},{"path":"https://allenbaron.github.io/DO.utils/reference/restore_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Restore Element Names — restore_names","text":"x object needing names retored names_from object restore names ","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/restore_names.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Restore Element Names — restore_names","text":"Necessary following scenarios: string operations stringr stringi, stringi fixes issue #59","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/robot.html","id":null,"dir":"Reference","previous_headings":"","what":"Execute Robot Commands — robot","title":"Execute Robot Commands — robot","text":"Light wrapper OBO Foundry ROBOT program (OBO Foundry). See ROBOT documentation information subcommands arguments.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/robot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Execute Robot Commands — robot","text":"","code":"robot(..., .robot_path = NULL)"},{"path":"https://allenbaron.github.io/DO.utils/reference/robot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Execute Robot Commands — robot","text":"... Command(s) passed ROBOT, including subcommand(s), either single string named strings, name corresponds long short form option value option value. options use value, use \"\". Subcommands unnamed. Examples: Subcommands: \"query\", \"export\" Common options: \"--input doid.owl\" input = \"doid.owl\" (named argument). \"-o result.owl\" (.e. --output) o = \"result.owl\" (named argument). \"--remove-annotations\" (option annotate) \"remove-annotations\" = \"\" (named argument form). .robot_path path ROBOT executable .jar file, string. NULL (default), system ROBOT executable available used, otherwise error signaled. NOTE: .utils caches last ROBOT used future use.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/robot.html","id":"robot-setup","dir":"Reference","previous_headings":"","what":"ROBOT Setup","title":"Execute Robot Commands — robot","text":"Requires installation Java (supported versions listed \"Getting Started\" section http://robot.obolibrary.org/). Can use OBO Foundry ROBOT tool installed system path. may achieved install_robot() described http://robot.obolibrary.org/. Can also use standalone robot.jar file (.robot_path must specified) case executed java -Xmx10G -jar (10 GB memory). first use R session, ROBOT executable/.jar specified tested. must succeed prior command execution. success, robot() announce version & path used. time new .robot_path specified, previous version replaced new announcement.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/robot.html","id":"citation","dir":"Reference","previous_headings":"","what":"Citation","title":"Execute Robot Commands — robot","text":"R.C. Jackson, J.P. Balhoff, E. Douglass, N.L. Harris, C.J. Mungall, J.. Overton. ROBOT: tool automating ontology workflows. BMC Bioinformatics, vol. 20, July 2019.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/robot_query.html","id":null,"dir":"Reference","previous_headings":"","what":"Execute a SPARQL Query with ROBOT — robot_query","title":"Execute a SPARQL Query with ROBOT — robot_query","text":"Wrapper robot(\"query\", ...) accepts file text query, convenient arguments.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/robot_query.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Execute a SPARQL Query with ROBOT — robot_query","text":"","code":"robot_query( input, query, output = NULL, ..., tidy_what = \"nothing\", col_types = NULL )"},{"path":"https://allenbaron.github.io/DO.utils/reference/robot_query.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Execute a SPARQL Query with ROBOT — robot_query","text":"input path RDF/OWL file recognized ROBOT, string. query text path valid SPARQL query (ASK, SELECT, CONSTRUCT, UPDATE) string. output path output written, string, NULL (default) load data directly. output required UPDATE CONSTRUCT queries. ... Additional arguments ROBOT query formatted described robot(). tidy_what elements SPARQL-created data.frame tidy, character vector. One following: \"everything\" apply tidy operations (precedence \"nothing\"). \"header\" remove leading ? header labels. \"unnest\" unnest list columns unnest_cross(). \"uri_to_curie\" convert URIs recognized .utils CURIEs to_curie(). \"lgl_NA_false\" replace NA logical columns FALSE. \"as_tibble\" make output tibble. \"nothing\" prevent tidying. col_types One NULL, cols() specification, string. See vignette(\"readr\") details. NULL, column types inferred guess_max rows input, interspersed throughout file. convenient (fast), robust. guessed types wrong, need increase guess_max supply correct types . Column specifications created list() cols() must contain one column specification column. want read subset columns, use cols_only(). Alternatively, can use compact string representation character represents one column: c = character = integer n = number d = double l = logical f = factor D = date T = date time t = time ? = guess _ - = skip default, reading file without column specification print message showing readr guessed . remove message, set show_col_types = FALSE set `options(readr.show_col_types = FALSE).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/robot_query.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Execute a SPARQL Query with ROBOT — robot_query","text":"output specified, path output file query result. Otherwise, query result (ASK boolean SELECT tibble).","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/round_down.html","id":null,"dir":"Reference","previous_headings":"","what":"Round Number Down — round_down","title":"Round Number Down — round_down","text":"Round Number ","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/round_down.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Round Number Down — round_down","text":"","code":"round_down(x, digits = 0)"},{"path":"https://allenbaron.github.io/DO.utils/reference/round_down.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Round Number Down — round_down","text":"x numeric vector. digits number decimal places, integer. Negative values allowed (see 'Details').","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/round_down.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Round Number Down — round_down","text":"Rounding negative number digits means rounding power ten, example round_down(x, digits = -2) rounds nearest hundred.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/round_up.html","id":null,"dir":"Reference","previous_headings":"","what":"Round Number Up — round_up","title":"Round Number Up — round_up","text":"Round Number ","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/round_up.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Round Number Up — round_up","text":"","code":"round_up(x, digits = 0)"},{"path":"https://allenbaron.github.io/DO.utils/reference/round_up.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Round Number Up — round_up","text":"x numeric vector. digits number decimal places, integer. Negative values allowed (see 'Details').","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/round_up.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Round Number Up — round_up","text":"Rounding negative number digits means rounding power ten, example round_up(x, digits = -2) rounds nearest hundred.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/round_zero.html","id":null,"dir":"Reference","previous_headings":"","what":"Round Number to Zero — round_zero","title":"Round Number to Zero — round_zero","text":"Round Number Zero","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/round_zero.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Round Number to Zero — round_zero","text":"","code":"round_zero(x, digits)"},{"path":"https://allenbaron.github.io/DO.utils/reference/round_zero.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Round Number to Zero — round_zero","text":"x numeric vector. digits number decimal places, integer. Negative values allowed (see 'Details').","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/round_zero.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Round Number to Zero — round_zero","text":"Rounding negative number digits means rounding power ten, example round_zero(x, digits = -2) rounds nearest hundred.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/sandwich_text.html","id":null,"dir":"Reference","previous_headings":"","what":"Sandwich Text Between Placeholders — sandwich_text","title":"Sandwich Text Between Placeholders — sandwich_text","text":"Sandwiches strings one two placeholders.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/sandwich_text.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sandwich Text Between Placeholders — sandwich_text","text":"","code":"sandwich_text(x, placeholder, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/sandwich_text.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sandwich Text Between Placeholders — sandwich_text","text":"x string character vector. placeholder One two placeholders sandwich element x . two placeholders provided, x sandwiched first left second right. Otherwise, x sandwiched sides placeholder. ... Arguments passed base::paste0 collapse optional character string separate results. NA_character_. recycle0 logical indicating zero-length character arguments lead zero-length character(0) sep-phase (turns \"\" collapse-phase, .e., collapse NULL).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/sandwich_text.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sandwich Text Between Placeholders — sandwich_text","text":"","code":"sandwich_text(\"a\", placeholder = \"h\") #> [1] \"hah\" sandwich_text(\"a\", placeholder = c(\"b\", \"h\")) #> [1] \"bah\""},{"path":"https://allenbaron.github.io/DO.utils/reference/save_alliance_counts.html","id":null,"dir":"Reference","previous_headings":"","what":"Writes Alliance Counts to File — save_alliance_counts","title":"Writes Alliance Counts to File — save_alliance_counts","text":"Writes Alliance record counts .csv file version info Alliance file came footer.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/save_alliance_counts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Writes Alliance Counts to File — save_alliance_counts","text":"","code":"save_alliance_counts(counts_tbl, file, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/save_alliance_counts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Writes Alliance Counts to File — save_alliance_counts","text":"counts_tbl record counts alliance_tbl (e.g. output count_alliance_records()) file file write ... arguments pass readr::write_csv()","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/save_alliance_counts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Writes Alliance Counts to File — save_alliance_counts","text":"Returns counts_tbl version info footer invisibly.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/search_pmc.html","id":null,"dir":"Reference","previous_headings":"","what":"Search PubMed Central — search_pmc","title":"Search PubMed Central — search_pmc","text":"Searches PubMed Central using Entrez Utilities API via rentrez.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/search_pmc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Search PubMed Central — search_pmc","text":"","code":"search_pmc( term, config = NULL, retmode = \"xml\", use_history = FALSE, pmid = FALSE, retmax = NULL, ... )"},{"path":"https://allenbaron.github.io/DO.utils/reference/search_pmc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Search PubMed Central — search_pmc","text":"term search term (character); see reference rentrez::entrez_search syntax details config vector configuration options passed httr::GET retmode character, one json (default) xml. make difference cases. use_history logical. TRUE return web_history object use later calls NCBI pmid whether return PMID well PMCID (default = FALSE); TRUE, PMIDs obtained via rcrossref::id_converter) retmax maximum number PubMed IDs return (integer; default = 20, max = 100,000); see reference 'Optional Parameters – Retrieval' ... character, additional terms add request, see NCBI documentation linked references complete list","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/search_pubmed.html","id":null,"dir":"Reference","previous_headings":"","what":"Search PubMed — search_pubmed","title":"Search PubMed — search_pubmed","text":"Searches PubMed using Entrez Utilities API via rentrez.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/search_pubmed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Search PubMed — search_pubmed","text":"","code":"search_pubmed( term, config = NULL, retmode = \"xml\", use_history = FALSE, retmax = NULL, ... )"},{"path":"https://allenbaron.github.io/DO.utils/reference/search_pubmed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Search PubMed — search_pubmed","text":"term search term (character); see reference rentrez::entrez_search syntax details config vector configuration options passed httr::GET retmode character, one json (default) xml. make difference cases. use_history logical. TRUE return web_history object use later calls NCBI retmax maximum number PubMed IDs return (integer; default = 20, max = 100,000); see reference 'Optional Parameters – Retrieval' ... character, additional terms add request, see NCBI documentation linked references complete list","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/search_pubmed.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Search PubMed — search_pubmed","text":"https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4_ESearch","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/set_scopus_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"Set Keys for Scopus API Access — set_scopus_keys","title":"Set Keys for Scopus API Access — set_scopus_keys","text":"Sets Elsevier API key /institutional token environment variables (Elsevier_API Elsevier_insttoken) access subsequent Scopus functions.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/set_scopus_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set Keys for Scopus API Access — set_scopus_keys","text":"","code":"set_scopus_keys(api_key, insttoken)"},{"path":"https://allenbaron.github.io/DO.utils/reference/set_scopus_keys.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set Keys for Scopus API Access — set_scopus_keys","text":"api_key Elsevier API key, string. insttoken Elsevier institutional token, string.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/set_scopus_keys.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set Keys for Scopus API Access — set_scopus_keys","text":"Named logical vector stating whether setting operation successful key provided input (invisibly).","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/theme_DO.html","id":null,"dir":"Reference","previous_headings":"","what":"DO Theme for Stats Plots — theme_DO","title":"DO Theme for Stats Plots — theme_DO","text":"default ggplot2 theme used statistical plots uploaded disease-ontology.org. manages base plot style incorporate 's color scheme.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/theme_DO.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"DO Theme for Stats Plots — theme_DO","text":"","code":"theme_DO( base_size = 11, base_family = \"\", base_line_size = base_size/22, base_rect_size = base_size/22 )"},{"path":"https://allenbaron.github.io/DO.utils/reference/theme_DO.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"DO Theme for Stats Plots — theme_DO","text":"base_size base font size, given pts. base_family base font family base_line_size base size line elements base_rect_size base size rect elements","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/theme_DO.html","id":"background","dir":"Reference","previous_headings":"","what":"Background","title":"DO Theme for Stats Plots — theme_DO","text":"information refer ggplot2's theme documentation.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_ga_tbl.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy Google Analytics Tables (INTERNAL) — tidy_ga_tbl","title":"Tidy Google Analytics Tables (INTERNAL) — tidy_ga_tbl","text":"Tidies Google Analytics tables loaded read_ga().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_ga_tbl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy Google Analytics Tables (INTERNAL) — tidy_ga_tbl","text":"","code":"tidy_ga_tbl(ga_tbl, keep_total = FALSE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_ga_tbl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy Google Analytics Tables (INTERNAL) — tidy_ga_tbl","text":"ga_tbl Google analytics table loaded read_ga(), needs tidied. keep_total Whether keep row totals appears bottom table, logical scalar (default: FALSE).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_pub_records.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy Publication Records — tidy_pub_records","title":"Tidy Publication Records — tidy_pub_records","text":"Tidy publication record results tibble. Limited data retained. full data retention desired, consider using as_tibble() instead (expect list columns untidy column names).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_pub_records.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy Publication Records — tidy_pub_records","text":"","code":"tidy_pub_records(x, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_pub_records.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy Publication Records — tidy_pub_records","text":"x publication record object, produced citedby_pubmed(), citedby_scopus() pubmed_summary(). ... Ignored; included extensibility.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_pubmed_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert PubMed summary to tibble (DEPRECATED) — tidy_pubmed_summary","title":"Convert PubMed summary to tibble (DEPRECATED) — tidy_pubmed_summary","text":"Convert list result generated rentrez::entrez_summary() PubMed database tibble.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_pubmed_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert PubMed summary to tibble (DEPRECATED) — tidy_pubmed_summary","text":"","code":"tidy_pubmed_summary(pm_summary, addl_items = NULL)"},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_pubmed_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert PubMed summary to tibble (DEPRECATED) — tidy_pubmed_summary","text":"pm_summary result rentrez::entrez_summary(db = \"pubmed\", ...) addl_items character vector listing \"items\" (.e. data variables) include tidy dataset beyond default: uid, pubdate, title, authors, fulljournalname","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_pubmed_summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert PubMed summary to tibble (DEPRECATED) — tidy_pubmed_summary","text":"dataframe uid, pubdate, title, fulljournalname; may also include authors, authtype auth_clusterid author information present additional variables included addl_items","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_pubmed_summary.html","id":"deprecation-notice","dir":"Reference","previous_headings":"","what":"DEPRECATION NOTICE","title":"Convert PubMed summary to tibble (DEPRECATED) — tidy_pubmed_summary","text":"function favor tidy_pub_records() work esummary_list objects.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_sparql.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy SPARQL Query — tidy_sparql","title":"Tidy SPARQL Query — tidy_sparql","text":"Tidies SPARQL query results according desired specifications (see tidy_what parameter details).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_sparql.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy SPARQL Query — tidy_sparql","text":"","code":"tidy_sparql(query_res, tidy_what = \"everything\", ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/tidy_sparql.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy SPARQL Query — tidy_sparql","text":"query_res results SPARQL query, data.frame (usually produced owl_xml()$query() similar DOrepo(), can also used tidy results robot(\"query\", ...) loaded readr). tidy_what elements SPARQL-created data.frame tidy, character vector. One following: \"everything\" apply tidy operations (precedence \"nothing\"). \"header\" remove leading ? header labels. \"unnest\" unnest list columns unnest_cross(). \"uri_to_curie\" convert URIs recognized .utils CURIEs to_curie(). \"lgl_NA_false\" replace NA logical columns FALSE. \"as_tibble\" make output tibble. \"nothing\" prevent tidying. ... Arguments passed to_curie strip_angle_brackets Whether remove < > input, boolean (default: TRUE). might undesirable consequences, e.g. angle brackets need removed, perform removal beforehand use strip_angle_brackets = FALSE.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_character.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert to Character — to_character","title":"Convert to Character — to_character","text":"Provides character conversion methods base::.character() additional methods lists data.frames. to_character() created enable collapse_to_string() handle many data types avoiding unintended conversions character, occurred methods added .character().","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_character.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert to Character — to_character","text":"","code":"to_character(x, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/to_character.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert to Character — to_character","text":"x object coerced tested. ... arguments passed methods.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_curie.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert URI to CURIE — to_curie","title":"Convert URI to CURIE — to_curie","text":"Converts URI(s) CURIE(s).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_curie.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert URI to CURIE — to_curie","text":"","code":"to_curie(x, strip_angle_brackets = TRUE)"},{"path":"https://allenbaron.github.io/DO.utils/reference/to_curie.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert URI to CURIE — to_curie","text":"x URI(s), character vector. strip_angle_brackets Whether remove < > input, boolean (default: TRUE). might undesirable consequences, e.g. angle brackets need removed, perform removal beforehand use strip_angle_brackets = FALSE.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_curie.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Convert URI to CURIE — to_curie","text":"Performs URI validation, relying simple string matching namespace-prefix pairs ns_prefix conversion. values matching one returned without modification.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/to_curie.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert URI to CURIE — to_curie","text":"","code":".uri <- c( \"http://www.w3.org/2000/01/rdf-schema#comment\", \"http://purl.org/dc/elements/1.1/date\", \"http://purl.org/dc/terms/license\", \"http://www.w3.org/2002/07/owl#deprecated\", \"http://www.geneontology.org/formats/oboInOwl#id\", \"http://purl.obolibrary.org/obo/UBERON_0000002\", \"http://purl.obolibrary.org/obo/DOID_0001816\", \"http://purl.obolibrary.org/obo/doid#DO_AGR_slim\", \"\" ) to_curie(.uri) #> [1] \"rdfs:comment\" \"dc:date\" \"terms:license\" #> [4] \"owl:deprecated\" \"oboInOwl:id\" \"UBERON:0000002\" #> [7] \"DOID:0001816\" \"doid:DO_AGR_slim\" \"oboInOwl:hasDbXref\" # uses 'obo' namespace when an OBO Foundry ontology namespace isn't available to_curie( c(\"http://purl.obolibrary.org/obo/SO_0000110\", \"http://purl.obolibrary.org/obo/so#has_origin\") ) #> [1] \"SO:0000110\" \"so:has_origin\" #returns non-URI or unknown namespace prefixes unmodified to_curie( c(\"http://purl.obolibrary.org/obo/SYMP_0000000\", \"not a URI\", \"https://disease-ontology.org/\") ) #> [1] \"SYMP:0000000\" \"not a URI\" #> [3] \"https://disease-ontology.org/\""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_range.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Vectors to Range String — to_range","title":"Convert Vectors to Range String — to_range","text":"Converts vectors string ranges. vector types accepted original values appear final output range, input numeric vector whole numbers, function convert values integers must provided (int_fn) purpose identifying range(s).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_range.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Vectors to Range String — to_range","text":"","code":"to_range( x, int_fn = NULL, ..., sep = c(\",\", \"-\"), start_rm = NULL, end_rm = NULL )"},{"path":"https://allenbaron.github.io/DO.utils/reference/to_range.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Vectors to Range String — to_range","text":"x numeric vector whole numbers. int_fn function (tidyverse-style formula) convert x integer vector, used creating ranges; original value appear range except modified start_rm /end_rm. int_fun required x numeric vector. ... Arguments passed int_fn. sep separators use ranges (default: ',') within range (default: '-'), length-2 character vector. start_rm regular expression remove x values beginning range. end_rm regular expression remove x values end range.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_range.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Vectors to Range String — to_range","text":"range(s) formatted string NA input empty vector.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_range.html","id":"notes","dir":"Reference","previous_headings":"","what":"Notes","title":"Convert Vectors to Range String — to_range","text":"NA values always dropped. to_range() inspired answers https://stackoverflow.com/q/16911773/6938922, heavily speendo (CC--SA 3.0, accessed 2022-07-01). fastest approach inputs significantly slower answers large inputs. internal approach likely modified future, arguments output remain .","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_range.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Vectors to Range String — to_range","text":"","code":"x <- c(1:2, 8:6, 4, -1:-2, 20:37, 4, 40, 43, 45) to_range(x) #> [1] \"-2,-1,1,2,4,6-8,20-37,40,43,45\" # `NA` values are dropped y <- c(1:4, NA, 5, 7:10) to_range(x) #> [1] \"-2,-1,1,2,4,6-8,20-37,40,43,45\" # Use `int_fn` when `x` is not a numeric vector (tidyverse-style formulas # accepted) x_char <- as.character(x) to_range(x, int_fn = as.integer) #> [1] \"-2,-1,1,2,4,6-8,20-37,40,43,45\" to_range(x, int_fn = ~ as.integer(.x)) #> [1] \"-2,-1,1,2,4,6-8,20-37,40,43,45\" # `int_fn` allows non-numeric ranges to be created txt <- paste0(x, \"txt\") to_int <- function(x, y) as.integer(stringr::str_remove(x, \"txt\")) to_range(txt, to_int, y = \"txt\") #> [1] \"-2txt,-1txt,1txt,2txt,4txt,6txt-8txt,20txt-37txt,40txt,43txt,45txt\" # text can be selectively removed from the values at the beginning of ranges # (`start_rm`) or end of ranges (`end_rm`) to_range(txt, to_int, start_rm = \"txt\") #> [1] \"-2txt,-1txt,1txt,2txt,4txt,6-8txt,20-37txt,40txt,43txt,45txt\" to_range(txt, to_int, end_rm = \"txt\") #> [1] \"-2txt,-1txt,1txt,2txt,4txt,6txt-8,20txt-37,40txt,43txt,45txt\""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_uri.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert CURIE to URI — to_uri","title":"Convert CURIE to URI — to_uri","text":"Converts CURIE(s) URI(s). Angle brackets added.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_uri.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert CURIE to URI — to_uri","text":"","code":"to_uri(x)"},{"path":"https://allenbaron.github.io/DO.utils/reference/to_uri.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert CURIE to URI — to_uri","text":"x CURIE(s), character vector.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/to_uri.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Convert CURIE to URI — to_uri","text":"Performs CURIE validation relies properly formatted CURIE conversion (e.g. prefix:reference, according CURIE standard). inputs matching prefix ns_prefix returned without modification.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/to_uri.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert CURIE to URI — to_uri","text":"","code":".curie <- c(\"rdfs:comment\", \"dc:date\", \"terms:license\", \"owl:deprecated\", \"oboInOwl:id\", \"UBERON:0000002\", \"DOID:0001816\", \"doid:DO_AGR_slim\") to_uri(.curie) #> [1] \"http://www.w3.org/2000/01/rdf-schema#comment\" #> [2] \"http://purl.org/dc/elements/1.1/date\" #> [3] \"http://purl.org/dc/terms/license\" #> [4] \"http://www.w3.org/2002/07/owl#deprecated\" #> [5] \"http://www.geneontology.org/formats/oboInOwl#id\" #> [6] \"http://purl.obolibrary.org/obo/UBERON_0000002\" #> [7] \"http://purl.obolibrary.org/obo/DOID_0001816\" #> [8] \"http://purl.obolibrary.org/obo/doid#DO_AGR_slim\" #returns non-CURIE or unknown namespace prefixes unmodified to_curie(c(\"SYMP:0000000\", \"not a CURIE\", \"bioregistry.collection:0000001\")) #> [1] \"SYMP:0000000\" \"not a CURIE\" #> [3] \"bioregistry.collection:0000001\""},{"path":"https://allenbaron.github.io/DO.utils/reference/today_datestamp.html","id":null,"dir":"Reference","previous_headings":"","what":"Today's Date Stamp — today_datestamp","title":"Today's Date Stamp — today_datestamp","text":"Returns today's date format appropriate use date stamp. Format = YMD (Year Month Day) without separators (e.g. \"20210728\" July 28, 2021).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/today_datestamp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Today's Date Stamp — today_datestamp","text":"","code":"today_datestamp()"},{"path":"https://allenbaron.github.io/DO.utils/reference/unique_if_invariant.html","id":null,"dir":"Reference","previous_headings":"","what":"Return Unique Value for Invariant Vectors — unique_if_invariant","title":"Return Unique Value for Invariant Vectors — unique_if_invariant","text":"Returns unique value input, , 1 unique value exists (.e. input invariant), otherwise returns original input. Uniqueness determined base::unique() flexibility unique_if_invariant() may fail custom methods.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/unique_if_invariant.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return Unique Value for Invariant Vectors — unique_if_invariant","text":"","code":"unique_if_invariant(x, na.rm = FALSE, incl_nm = FALSE, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/unique_if_invariant.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return Unique Value for Invariant Vectors — unique_if_invariant","text":"x R object, except arrays supported. na.rm logical scalar indicating whether NA values removed (default: FALSE); powered stats::na.omit() may limited methods. incl_nm logic scalar indicating whether names also examined (default: FALSE). ... Arguments passed base::unique() methods.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/unique_if_invariant.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Return Unique Value for Invariant Vectors — unique_if_invariant","text":"","code":"unique_if_invariant(c(\"a\", \"a\")) #> [1] \"a\" unique_if_invariant(c(\"a\", \"b\")) #> [1] \"a\" \"b\" # `NA` can be ignored unique_if_invariant(c(\"a\", NA)) #> [1] \"a\" NA unique_if_invariant(c(\"a\", NA), na.rm = TRUE) #> [1] \"a\" # names are ignored by default (and often dropped); to consider and preserve # them use `incl_nm = TRUE` unique_if_invariant(c(a = \"A\", b = \"A\")) #> [1] \"A\" unique_if_invariant(c(a = \"A\", b = \"A\"), incl_nm = TRUE) #> a b #> \"A\" \"A\" unique_if_invariant(c(a = \"A\", a = \"A\"), incl_nm = TRUE) #> a #> \"A\" # na.rm & incl_nm are ignored for matrices & data.frames due to undesirable # results; as with base::unique(), matrix comparison preserves columns m <- matrix(rep(1, 4), 2) unique_if_invariant(m) #> [,1] [,2] #> [1,] 1 1 .df <- data.frame(m, check.names = TRUE) unique_if_invariant(.df) #> X1 X2 #> 1 1 1"},{"path":"https://allenbaron.github.io/DO.utils/reference/unnest_cross.html","id":null,"dir":"Reference","previous_headings":"","what":"Unnest data frame list columns — unnest_cross","title":"Unnest data frame list columns — unnest_cross","text":"Like tidyr::unnest() always produces cartesian product requires list columns \"parallel entries ... compatible sizes\".","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/unnest_cross.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Unnest data frame list columns — unnest_cross","text":"","code":"unnest_cross(data, cols, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/unnest_cross.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Unnest data frame list columns — unnest_cross","text":"data data.frame. cols Columns unnest. ... Arguments passed tidyr::unchop, tidyr::unpack error_call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information. keep_empty default, get one row output element list unchopping/unnesting. means size-0 element (like NULL empty data frame vector), entire row dropped output. want preserve rows, use keep_empty = TRUE replace size-0 elements single row missing values. ptype Optionally, named list column name-prototype pairs coerce cols , overriding default guessed combining individual values. Alternatively, single empty ptype can supplied, applied cols. names_repair Used check output data frame valid names. Must one following options: \"minimal\": name repair checks, beyond basic existence, \"unique\": make sure names unique empty, \"check_unique\": (default), name repair, check unique, \"universal\": make names unique syntactic function: apply custom name repair. tidyr_legacy: use name repair tidyr 0.8. formula: purrr-style anonymous function (see rlang::as_function()) See vctrs::vec_as_names() details terms strategies used enforce .","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/unnest_cross.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Unnest data frame list columns — unnest_cross","text":"","code":"df <- tibble::tibble( n = 1:2, interjection = list(c(\"oh\", \"wow\"), \"zap\"), letter = list(c(\"a\", \"b\", \"c\"), \"d\"), keep_list = list(\"please\", c(\"don't\", \"unnest\")) ) df #> # A tibble: 2 × 4 #> n interjection letter keep_list #> #> 1 1 #> 2 2 # Uses tidyselect semantics, like tidyr::unnest() unnest_cross(df, cols = tidyselect::starts_with(\"inter\")) #> # A tibble: 3 × 4 #> n interjection letter keep_list #> #> 1 1 oh #> 2 1 wow #> 3 2 zap # Works when list column sizes differ, unlike tidyr::unnest() tryCatch( tidyr::unnest(df, cols = c(interjection, letter)), error = function(e) message(e) ) #> Error in tidyr::unnest(df, cols = c(interjection, letter)): In row 1, can't recycle input of size 2 to size 3. unnest_cross(df, cols = c(interjection, letter)) #> # A tibble: 7 × 4 #> n interjection letter keep_list #> #> 1 1 oh a #> 2 1 oh b #> 3 1 oh c #> 4 1 wow a #> 5 1 wow b #> 6 1 wow c #> 7 2 zap d # Always produces a cartesian product, unlike tidyr::unnest() df2 <- tibble::tibble( n = list(1:2, 3L), letter = list(c(\"a\", \"b\"), \"c\"), ) df2 #> # A tibble: 2 × 2 #> n letter #> #> 1 #> 2 tidyr::unnest(df2, cols = tidyselect::everything()) #> # A tibble: 3 × 2 #> n letter #> #> 1 1 a #> 2 2 b #> 3 3 c unnest_cross(df2, cols = tidyselect::everything()) #> # A tibble: 5 × 2 #> n letter #> #> 1 1 a #> 2 1 b #> 3 2 a #> 4 2 b #> 5 3 c"},{"path":"https://allenbaron.github.io/DO.utils/reference/unnest_mapping.html","id":null,"dir":"Reference","previous_headings":"","what":"Unnest Mapping — unnest_mapping","title":"Unnest Mapping — unnest_mapping","text":"Tidies pyobo_map() results stored column data frame two steps: Extracts mapping results specialized ScoredMatch python objects (defined GILDA). Unnests results (list data frames).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/unnest_mapping.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Unnest Mapping — unnest_mapping","text":"","code":"unnest_mapping( df, col, prefix = NULL, prefix_sep = \":\", best_only = TRUE, warn_best_gt1 = FALSE, ... )"},{"path":"https://allenbaron.github.io/DO.utils/reference/unnest_mapping.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Unnest Mapping — unnest_mapping","text":"df data.frame. col column pyobo_map() results, tidy-select specification. prefix Optional prefix add namespace local unique identifiers (LUI; e.g. 4, LUI \"disease\" ), string; preferably create complete namespace ID (e.g. \"DOID:4\"). prefix_sep Optional separator placed prefix namespace LUIs, string. Ignored prefix = NULL. best_only Whether return best scoring result(s) , boolean. FALSE return results. NOTE: TRUE return one result case ties. warn_best_gt1 Whether warn best mapping ties exist term. ... Arguments passed tidyr::unnest keep_empty default, get one row output element list unchopping/unnesting. means size-0 element (like NULL empty data frame vector), entire row dropped output. want preserve rows, use keep_empty = TRUE replace size-0 elements single row missing values. ptype Optionally, named list column name-prototype pairs coerce cols , overriding default guessed combining individual values. Alternatively, single empty ptype can supplied, applied cols. names_sep NULL, default, outer names come inner names. string, outer names formed pasting together outer inner column names, separated names_sep. names_repair Used check output data frame valid names. Must one following options: \"minimal\": name repair checks, beyond basic existence, \"unique\": make sure names unique empty, \"check_unique\": (default), name repair, check unique, \"universal\": make names unique syntactic function: apply custom name repair. tidyr_legacy: use name repair tidyr 0.8. formula: purrr-style anonymous function (see rlang::as_function()) See vctrs::vec_as_names() details terms strategies used enforce .","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/unnest_mapping.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Unnest Mapping — unnest_mapping","text":"input data frame additional columns id, term (namespace label), score (mapping score determined GILDA). data frame additional rows best_score = FALSE ties best score exist term.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/update_website_count_tables.html","id":null,"dir":"Reference","previous_headings":"","what":"Update Counts in DO Website HTML — update_website_count_tables","title":"Update Counts in DO Website HTML — update_website_count_tables","text":"Directly updates counts listed tables disease-ontology.org \"Imports\" \"Slims\" pages using data specified release. Changes html files reviewed , correct, committed svn repo deployment.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/update_website_count_tables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Update Counts in DO Website HTML — update_website_count_tables","text":"","code":"update_website_count_tables(DO_repo, tag, svn_repo)"},{"path":"https://allenbaron.github.io/DO.utils/reference/update_website_count_tables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Update Counts in DO Website HTML — update_website_count_tables","text":"DO_repo pyDOID.repo.DOrepo object (see DOrepo()). tag repo tag extract data , string. svn_repo local path website svn directory, string. correct directory include Dockerfile 'disease_ontology' directory.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/update_website_count_tables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Update Counts in DO Website HTML — update_website_count_tables","text":"Updated counts directly html svn repo page, well , old new counts comparison list tibbles (invisibly).","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/update_website_count_tables.html","id":"speed-note","dir":"Reference","previous_headings":"","what":"Speed Note","title":"Update Counts in DO Website HTML — update_website_count_tables","text":"Expect function make minute. majority time consumed loading doid-merged.owl file sped without faster RDF/OWL parser. currently handled via .utils' dependency python package pyDOID RDF handled RDFLib python package.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/vctr_to_string.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Vectors to Strings — vctr_to_string","title":"Convert Vectors to Strings — vctr_to_string","text":"Concatenate values vector single string. * vctr_to_string performs simple concatenation. * unique_to_string reduces vector unique values prior concatenation.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/vctr_to_string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Vectors to Strings — vctr_to_string","text":"","code":"vctr_to_string( x, delim = \"|\", na.rm = FALSE, sort = FALSE, decreasing = FALSE, ... ) unique_to_string( x, delim = \"|\", na.rm = FALSE, sort = FALSE, decreasing = FALSE, ... )"},{"path":"https://allenbaron.github.io/DO.utils/reference/vctr_to_string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Vectors to Strings — vctr_to_string","text":"x vector. delim delimiter place vector elements (default: \"|\"). na.rm logical scalar indicating whether NA values removed (default: FALSE). sort logical scalar indicating whether values sorted (default: FALSE). decreasing logical. sort increasing decreasing? \"radix\" method, can vector length equal number arguments .... methods, must length one. available partial sorting. ... arguments passed methods ( default methods objects without class) sort.int.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/reference/wrap_onscreen.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrap an On-screen Message — wrap_onscreen","title":"Wrap an On-screen Message — wrap_onscreen","text":"Wraps -screen message, used messages, warnings, errors.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/wrap_onscreen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrap an On-screen Message — wrap_onscreen","text":"","code":"wrap_onscreen(msg, exdent = 2, ...)"},{"path":"https://allenbaron.github.io/DO.utils/reference/wrap_onscreen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrap an On-screen Message — wrap_onscreen","text":"msg message wrap, string. exdent non-negative integer specifying indentation subsequent lines paragraphs. ... Arguments passed base::strwrap x character vector, object can converted character vector .character. width positive integer giving target column wrapping lines output. indent non-negative integer giving indentation first line paragraph. prefix,initial character string used prefix line except first, initial used. simplify logical. TRUE, result single character vector line text; otherwise, list length x elements character vectors line text obtained corresponding element x. (Hence, result former case obtained unlisting latter.)","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/wrap_onscreen.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Wrap an On-screen Message — wrap_onscreen","text":"","code":"short_msg <- \"This is a short message.\" long_msg <- \"This is a long message to demonstrate how wrap_onscreen() works. It's basically intended to be a multi-line paragraph but, as you can see if you view this variable, it is really just a very long string. We hope you enjoy!\" # no effect on short messages message(wrap_onscreen(short_msg)) #> This is a short message. # wrapping of longer messages, has default exdent message(wrap_onscreen(long_msg)) #> This is a long message to demonstrate how wrap_onscreen() works. It's #> basically intended to be a multi-line paragraph but, as you can see #> if you view this variable, it is really just a very long string. We #> hope you enjoy! # wrapping without exdent message(wrap_onscreen(long_msg, exdent = 0)) #> This is a long message to demonstrate how wrap_onscreen() works. It's #> basically intended to be a multi-line paragraph but, as you can see if #> you view this variable, it is really just a very long string. We hope #> you enjoy!"},{"path":"https://allenbaron.github.io/DO.utils/reference/write_access.html","id":null,"dir":"Reference","previous_headings":"","what":"Tests for Write Access — write_access","title":"Tests for Write Access — write_access","text":"Acts minimal wrapper around file.access(mode = 2) test whether R permission write files /directories.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/write_access.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tests for Write Access — write_access","text":"","code":"write_access(names)"},{"path":"https://allenbaron.github.io/DO.utils/reference/write_access.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tests for Write Access — write_access","text":"names character vector containing file names. Tilde-expansion done: see path.expand.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/write_access.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tests for Write Access — write_access","text":"Logical vector length equal names. NOTE differs base::file.access() returns integer vector.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/write_graphml.html","id":null,"dir":"Reference","previous_headings":"","what":"Write a Graph to .graphml File — write_graphml","title":"Write a Graph to .graphml File — write_graphml","text":"Writes graph object (tidygraph/iGraph) file GraphML.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/write_graphml.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write a Graph to .graphml File — write_graphml","text":"","code":"write_graphml(graph, file)"},{"path":"https://allenbaron.github.io/DO.utils/reference/write_graphml.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write a Graph to .graphml File — write_graphml","text":"graph tidygraph igraph object. file file path write , string. '.graphml' extension missing, appended.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/write_graphml.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Write a Graph to .graphml File — write_graphml","text":"Absolute path .graphml file written.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/write_gs.html","id":null,"dir":"Reference","previous_headings":"","what":"Write Data to a Google Sheet — write_gs","title":"Write Data to a Google Sheet — write_gs","text":"Specialized methods writing data created .utils specified Google Sheet.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/write_gs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write Data to a Google Sheet — write_gs","text":"","code":"write_gs(data, ss, hyperlink_curie = NULL, ...) # S3 method for omim_inventory write_gs( data, ss, hyperlink_curie = c(\"omim\", \"doid\"), datestamp = \"%Y%m%d\", ... )"},{"path":"https://allenbaron.github.io/DO.utils/reference/write_gs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write Data to a Google Sheet — write_gs","text":"data specially-classed data.frame defined method. ss Something identifies Google Sheet: file id string drive_id URL can recover id one-row dribble, googledrive represents Drive files instance googlesheets4_spreadsheet, gs4_get() returns Processed as_sheets_id(). hyperlink_curie columns CURIEs convert hyperlinks written Google Sheets. ... Arguments passed methods. datestamp NULL NA use default sheet name ('omim_inventory') format recognized format.Date() add date stamp suffix, separated '-', default sheet name.","code":""},{"path":"https://allenbaron.github.io/DO.utils/reference/write_gs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Write Data to a Google Sheet — write_gs","text":"data written Google Sheet, invisibly.","code":""},{"path":[]},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updated-development-version","dir":"Changelog","previous_headings":"","what":"Updated","title":"DO.utils (development version)","text":"is_invariant() works just character & numeric vectors, new list data.frame methods default method able handle cases (replaces character method).","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updated-development-version-1","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"Updated","title":"DO.utils (development version)","text":"read_omim() now additionally parses official API-key requiring phenotypicSeries.txt downloads may able handle additional API-key requiring downloads. plot_citedby(): * _[BREAKING CHANGE]_color_setargument now requires names one color 7 possible publication types specifying colors manually. *retracted` argument added specify retracted articles managed.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-development-version","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"New","title":"DO.utils (development version)","text":"download_omim() downloads official API-key requiring files directly OMIM (e.g. mim2gene.txt, phenotypicSeries.txt, etc.). extract_ordo_mappings() extracts mappings Orphanet Rare Disease Ontology, native format oboInOwl:hasDbXref Orphanet’s text-based predicate modifiers, SKOS (supplemented filler doid: predicates SKOS predicates don’t exist.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"dependency-update-0-3-1","dir":"Changelog","previous_headings":"","what":"Dependency Update","title":"DO.utils 0.3.1","text":"dplyr > v1.1.0 now required.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-3-1","dir":"Changelog","previous_headings":"General","what":"New","title":"DO.utils 0.3.1","text":"elucidate() (generic) describes data given object. Currently, omim_inventory defined method.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updated-0-3-1","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"Updated","title":"DO.utils 0.3.1","text":"Includes omim_official attribute indicate source official download. input official source, output class indicate type. keep_mim arg can used filter OMIM search results. tidy_sparql() now removes ? column names new argument lgl_NA_false specifying whether NA values replaced FALSE logical columns. write_gs.omim_inventory() now datestamp method.","code":""},{"path":[]},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updated-0-3-0","dir":"Changelog","previous_headings":"General","what":"Updated","title":"DO.utils 0.3.0","text":"Aligned read_delim_auto() closely readr::read_delim() handle compressed input. Broadened unique_if_invariant() longer uses ’s methods instead relies base::unique(). may unintended consequences, particularly custom methods unique() defined works inputs, better matching expectations. format_html() txt argument renamed text align fully expectations.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-3-0","dir":"Changelog","previous_headings":"General","what":"New","title":"DO.utils 0.3.0","text":"lexiclean() processes text improved text matching. round_zero() round numbers toward zero. round_down() round numbers ; flexible base::floor().","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"website-supporting-updates-0-3-0","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"WEBSITE-Supporting Updates","title":"DO.utils 0.3.0","text":"Fix make_use_case_html() case-insensitive sorting. Now accepts manually-defined color sets, addition color sets provided .utils. Default plot size changed better fit new position disease-ontology.org statistics page.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"other-updates-0-3-0","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"Other Updates","title":"DO.utils 0.3.0","text":".path argument renamed .robot_path avoid use functions without changing name. Now informs testing caching ROBOT executable future use. onto_missing() poorly designed deprecated. determine OMIM entries present mappings, use inventory_omim() instead.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-3-0-1","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"New","title":"DO.utils 0.3.0","text":"Previously internal function limited capability handle specific copy/paste operation OMIM. Now expanded read data downloaded omim.org phenotypic series pages using “Download ” button handle copy paste tabular data omim.org without need manual corrections. longer returns tidy_label provisional columns, particularly useful, instead includes omim geno_inheritance columns help curation. inventory_omim() compares OMIM entry records mappings reports whether exist, accompanying class data . omim_inventory first method. Eliminates need time-consuming, corrections get GA exported file tidy format use Can optionally read multiple tables single file (exports two). Can merge GA data split multiple files due size. must merged manually trivial.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"do-management--analysis-0-2-10","dir":"Changelog","previous_headings":"","what":"DO Management & Analysis","title":"DO.utils 0.2.10","text":"onto_missing() & tidy_sparql() output now improved column types (longer character vectors). append_to_url() new named URL option, “DO_website”, direct link disease info disease-ontology.org.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"assessing-resource-use-0-2-10","dir":"Changelog","previous_headings":"","what":"Assessing Resource Use","title":"DO.utils 0.2.10","text":"citedby_scopus() longer retain responses zero results gained new argument no_results control signaled user, making consistent citedby_pubmed().","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"doutils-029","dir":"Changelog","previous_headings":"","what":"DO.utils 0.2.9","title":"DO.utils 0.2.9","text":"Fix dplyr code error onto_missing().","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"highlights-0-2-8","dir":"Changelog","previous_headings":"","what":"Highlights","title":"DO.utils 0.2.8","text":"Adds onto_missing() character length-sorting functions. support creating links CURIEs. Includes fixes eliminate warnings use tidyverse (#15) errors due updates tidyverse packages.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-2-8","dir":"Changelog","previous_headings":"General Utilities","what":"New","title":"DO.utils 0.2.8","text":"length_sort(): Sorts vector elements character length. length_order(): Sorts data.frames character length elements specified column(s). iff_all_vals(): Tests values present vector values present.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updated-0-2-8","dir":"Changelog","previous_headings":"General Utilities","what":"Updated","title":"DO.utils 0.2.8","text":"drop_blank(): Now generic character list methods. vctr_to_string(): Now always returns NA input NA, even na.rm = FALSE; previously returned \"NA\".","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-2-8-1","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"New","title":"DO.utils 0.2.8","text":"is_curie(): Tests CURIEs character vectors, according specified definition always conforms W3C CURIE Syntax 1.0. onto_missing(): Compares tsv/csv data data ontology identify data may missing. Optionally returns data present.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updated-0-2-8-1","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"Updated","title":"DO.utils 0.2.8","text":"robot() errors now signaled R longer specifies max heap size using robot.jar file. to_curie()/to_uri() now appropriately remove brackets URIs handle delimited input. tidy_sparql() new as_curies argument converts IRIs CURIEs default. ns_prefix now includes namespace prefixes, including MeSH UniProt. append_to_url() now vectorized can append additional prefixes, including anything ns_prefix URLs commonly used disease-ontology.org cross-references. format_url() longer uses NA txt argument text input. build_hyperlink() takes advantage updates append_to_url() format_url().","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"dependencies-0-2-7","dir":"Changelog","previous_headings":"","what":"Dependencies","title":"DO.utils 0.2.7","text":"reticulate updated >=v1.28 effort resolve python package installation issues; see https://github.com/DiseaseOntology/.utils/issues/12. stringr updated >= 1.5.0, access new str_escape() function. igraph added new tidygraph/graphml functions. change doesn’t affect much since tidygraph already dependency depends igraph. Now SUGGESTS keyring package API key management.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"announcements-0-2-7","dir":"Changelog","previous_headings":"","what":"Announcements","title":"DO.utils 0.2.7","text":"Migrated .utils repository DiseaseOntology organization. .utils documentation now available web https://diseaseontology.github.io/.utils/ significant updates supporting citation-based assessment use workflow.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-2-7","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"New","title":"DO.utils 0.2.7","text":"extract_as_tidygraph(): Extracts nodes relationships identified SPARQL query RDF/XML file returns tidygraph. write_graphml(): Writes graph object (tidygraph/iGraph) .graphml file.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updated-0-2-7","dir":"Changelog","previous_headings":"DO Management & Analysis","what":"Updated","title":"DO.utils 0.2.7","text":"[BREAKING CHANGE] robot() wrapper function updated make easier use programming. Identifies count classes branch asserted inferred. Uses data directly local copy HumanDiseaseOntology repo instead manually copied release notes. Gained aspect_ratio argument. plot_xref_counts() now uses data directly local copy HumanDiseaseOntology repo instead manually copied release notes. plot_citedby() gained color_set argument permit flexible color choice. NOTE: 2023 Database paper describing ‘Assessing Resource Use’ workflow added publication describing use ). DO_colors now include accent colors generated part -KB addition website. colors available standard, “_mid”, “_light” versions.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-2-7-1","dir":"Changelog","previous_headings":"Assessing Resource Use","what":"New","title":"DO.utils 0.2.7","text":"‘Assessing Resource Use: Obtaining Use Records’ tutorial/vignette added. Describes set .utils execute functions support ‘Assessing Resource Use’ workflow. tidy_pub_records(): creates tibble limited information Scopus PubMed references; includes columns: first_author, title, journal, pub_date, doi, pmid, scopus_eid, pub_type, added_dt. set_scopus_keys(): makes Scopus API key /insttoken available use R session. set_entrez_key(): makes Entrez Utils API key available use R session; imported rentrez package.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updated-0-2-7-1","dir":"Changelog","previous_headings":"Assessing Resource Use","what":"Updated","title":"DO.utils 0.2.7","text":"as_tibble() methods publication results now include added_dt column output standardizes record timestamps created. tidy_pubmed_summary() now soft deprecated favor tidy_pub_records().","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updated-0-2-7-2","dir":"Changelog","previous_headings":"General Utilities","what":"Updated","title":"DO.utils 0.2.7","text":"to_range() now returns NA passed empty vectors. citedby_scopus() new insttoken argument. collapse_col() gained methods collapse_col_flex(), along na.rm argument can used methods. append_to_url() build_hyperlink() longer add trailing slash end URLs one. Also, new sep argument added provide greater control. [BREAKING CHANGE] format_hyperlink() preserve_NA argument removed replaced preserve argument. change, output value URL missing either URL (.e. NA) text passed txt. allows flexibility output support use cases. format_hyperlink() now warns values passed ... equal “html” reduce likelihood losing arguments silently.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"doutils-026","dir":"Changelog","previous_headings":"","what":"DO.utils 0.2.6","title":"DO.utils 0.2.6","text":"Change license CC0 1.0 Universal match standard Human Disease Ontology project preparation use resource use assessment publication.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"deprecations-0-2-5","dir":"Changelog","previous_headings":"","what":"Deprecations","title":"DO.utils 0.2.5","text":"Website * make_user_list_html() deprecated user/use case information disease-ontology.org moved ‘Collaborators’ page new ‘Use Cases’ page. Replaced make_use_case_html().","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"breaking-changes-0-2-5","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"DO.utils 0.2.5","text":"Website * plot_*() longer include datestamp saved file names. Formatters * format_doid() parameters changed: * allow_bare renamed convert_bare * validate_input added allow invalid input pass-without modification. Cited / Search * read_pubmed_txt() now parses IDs (PMID, PMCID, & DOI) citations returns data.frame includes record number, IDs, full citations instead vector citations.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"bug-fixes-0-2-5","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"DO.utils 0.2.5","text":"Cited / Search * extract_pmid() updated recognize 1- 8-long PubMed IDs cover whole set actual PMIDs; previously limited recognizing 8-long PMIDs. * as_tibble.esummary_list() fixed error due reduced data output (fewer columns information) pubmed_summary() caused API changes. * match_citations() now matches DOIs case insensitive manner bringing compliance DOI spec.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updates-0-2-5","dir":"Changelog","previous_headings":"","what":"Updates","title":"DO.utils 0.2.5","text":"URLs * append_to_url(): * Gained new parameter preserve_NA, allows NA values pass instead appended URL. * Added ‘github’ ‘orcid’ named URLs might appended (via get_url()). Datasets * prefixes ns_prefix new prefix subsets added: * not_obo_prefix: Subset ns_prefix everything except OBO ontology prefixes (e.g. ‘dc’, ‘terms’, ‘skos’, ‘owl’, etc.). * obo_prefix: Subset ns_prefix standard OBO ontology prefixes namespaces. * obo_prop_prefix: New set prefixes created represent frequently used OBO ontology property prefixes. NOTE: one per ontology may exist may actual property prefix used stated ontology… use caution. General Utilities * unique_to_string()/vctr_to_string(): added sort arguments control sorting.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-2-5","dir":"Changelog","previous_headings":"","what":"New","title":"DO.utils 0.2.5","text":"Ontology Extracters/Modifiers * extract_*_axiom() family: Extract equivalentClass (‘eq’), subClassOf (‘subclass’), (‘class’) logical axioms. * queue_xref_split(): Creates ‘curation queue’ diseases may need split multiple cross-references source. * tidy_sparql(): Tidies SPARQL query results. Website * update_website_count_tables(): Update counts tables ‘Imports’ ‘Slims’ pages data specified release doid-merged.owl. Updates data place. * make_use_case_html(): Produces html new ‘Use Cases’ page, split 3 files, 1 per section : Ontologies, Resources, Methodologies. * update data place. HTML rows & cells must copied pasted HTML section ‘Use Cases’ file. * Content sorted alphabetically column. * make_contributor_html(): Produces HTML list contributors
  • elements disease-ontology.org, including links Github ORCID, available. URLs * format_hyperlink(): Converts URLs hyperlinks Google Sheets, Excel, HTML. * build_hyperlink(): Shorthand common append_to_url() plus format_hyperlink() combination. Cited / Search * pub_id_match (DATA): named character vector regex’s identify/extract publication IDs (currently PMID, PMCID, DOI, & Scopus EID). General Utilities * sandwich_text(): Pastes text around strings. * wrap_onscreen(): Wraps messages printed screen. * invert_sublists(): Swaps list elements depths 2 & 3, essentially inverting grouping. * lengthen_col(): Splits column(s) delimiter lengthens data.frame value row. * NOTES: * reverse collapse_col() recreate original data.frame round trip cases. * Uses unnest_cross() internally results always cartesian product lengthened columns. * count_delim(): Counts values delimited columns; essentially combination lengthen_col() dplyr::count(). Type Predicates * is_valid_obo(): Tests whether elements character vector ‘valid’ OBO Foundry IDs (based formatting, actual existence). Formatters * format_obo(): Formats OBO Foundry IDs. * format_axiom(): Formats OWL functional syntax EQ/SubClassOf axioms human readable, similar Protege.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-2-4","dir":"Changelog","previous_headings":"","what":"New","title":"DO.utils 0.2.4","text":"Testing * is_boolean(): T/F type predicate. * write_access(): Test file write existence write access. Data Conversion * to_curie() & to_uri(): Convert URI & CURIEs. * to_range(): Convert vector values ranges (output single string). Data.frame Manipulation * append_empty_col(): Add empty columns data.frame. * unnest_cross(): Unnest list columns data.frame always creating cartesian product. * Useful expanding list columns produced SPARQL queries. Datasets * ST_pubs: Information official publications describing Symptom (SYMP) /Pathogen Transmission (TRANS) ontologies. * Currently, one conatins one publication. * ns_prefix: Named character vector common namespace-prefix pairs used /OBO ontologies.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updates-0-2-4","dir":"Changelog","previous_headings":"","what":"Updates","title":"DO.utils 0.2.4","text":"cast_to_string renamed collapse_to_string() DO_pubs now includes lens_id lens.org identifiers publication.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"dependencies-0-2-4","dir":"Changelog","previous_headings":"","what":"Dependencies","title":"DO.utils 0.2.4","text":"Imports ‘tidyselect’, explicitly required unnest_cross used throughout .utils enable tidyverse-style semantics (via dplyr).","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"cited-by--updates-0-2-3","dir":"Changelog","previous_headings":"","what":"Cited By – Updates","title":"DO.utils 0.2.3","text":"citedby_pubmed(), equivalent citedby_scopus(), now available (uses citedby_pmid() pubmed_summary() internally. BREAKING CHANGE – add_col argument changed boolean NULL (replaces FALSE) name column (replaces TRUE). Bug fixes & message improvements. elink method default no_result still “error” elink_list default now warning. as_tibble.esummary_list() bug caused results data fixed – caused errors as_tibble.esummary_list_nested() precipitated tidyverse’s move strict vector merging. IMPORTANT NOTE: “cited ” functionality .utils may longer improved recent review Lens.org results suggests may good replacement PubMed + Scopus search & merge strategy. improvements made likely facilitate one : Merging PubMed Scopus “cited ” results, probably using standardize() (similar). Reducing data requested APIs implementing timeframe parameters citedby_*().","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"doutils-022","dir":"Changelog","previous_headings":"","what":"DO.utils 0.2.2","title":"DO.utils 0.2.2","text":"Bug fix correct error format_subtree() subtree classes multi-parentage. (Error label: “fill needed”)","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"new-0-2-1","dir":"Changelog","previous_headings":"","what":"New","title":"DO.utils 0.2.1","text":"extract_subtree() extracts data doid.owl including descendants relationships specified DOID. format_subtree() arranges dataframe text-based hierarchy mirroring disease-ontology.org. Primarily designed creating high quality “tree view” graphics similar EBI’s Ontology Lookup Service. is_valid_doid() tests whether inputs valid DOIDs. Note mutliple formats considered valid. format_doid() converts valid DOID formats.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"updates-0-2-1","dir":"Changelog","previous_headings":"","what":"Updates","title":"DO.utils 0.2.1","text":"DOrepo() owl_xml() longer fail silently file/directory exist. pyDOID now verifies file paths instantiation underlying objects.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"dependencies-0-2-1","dir":"Changelog","previous_headings":"","what":"Dependencies","title":"DO.utils 0.2.1","text":"Suggests tidygraph, required format_subtree().","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"data-0-2-0","dir":"Changelog","previous_headings":"","what":"Data","title":"DO.utils 0.2.0","text":"Added Nucleic Acids Research 2022 publication data DO_pubs.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"dependencies-0-2-0","dir":"Changelog","previous_headings":"","what":"Dependencies","title":"DO.utils 0.2.0","text":"reticulate >= v1.23 required. replace_na.list() now deprecated (requires tidyr <= 1.1.4). Python dependency: pyDOID","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"general-purpose-0-2-0","dir":"Changelog","previous_headings":"","what":"General Purpose","title":"DO.utils 0.2.0","text":"Adds two new methods beyond “unique”: “first” & “last”. Adds ability collapse columns using different methods. DOrepo() wraps pyDOID.repo.DOrepo class owl_xml() wraps pyDOID.owl.xml class","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"graphics--website-0-2-0","dir":"Changelog","previous_headings":"","what":"Graphics / Website","title":"DO.utils 0.2.0","text":"plot_citedby() stacked bar chart showing publication types. DO_colors include saturated versions (names prefixed sat_). Functions generating html updated match html style guide standards. theme_DO() ggplot2 plotting theme . plot_def_src() display number times source used support disease definitions ontology (designed disease-ontology.org//statistics).","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"cited-by-0-2-0","dir":"Changelog","previous_headings":"","what":"Cited by","title":"DO.utils 0.2.0","text":"match_citations_fz() match_fz() concat_pm_citation() read_pubmed_txt() Updated match_citations() utilize Scopus EIDs. pmc_summary(), parallel pubmed_summary() works PubMed Central. tidy_ArticleId_set() (internal) as_tibble(), method esummary_list_nested","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"urls-0-2-0","dir":"Changelog","previous_headings":"","what":"URLs","title":"DO.utils 0.2.0","text":"read_doid_edit() extract_doid_url() validate_url() + helpers NOTE: Helpers robots.txt respectful validation remain INCOMPLETE care taken overwhelm web servers requests.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"doutils-017","dir":"Changelog","previous_headings":"","what":"DO.utils 0.1.7","title":"DO.utils 0.1.7","text":"Setup package wrap python via reticulate package. pyobo_map() create predicted mappings. parse_mapping() parse python.gilda.ScoredMatch results object list data frames matches (1 df/input term). unnest_mapping() unnest list column generated pyobo_map() inside dplyr::mutate() call; wraps parse_maping().","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"general-0-1-6","dir":"Changelog","previous_headings":"","what":"General","title":"DO.utils 0.1.6","text":"Added DEPENDENCIES ggplot2, googlesheets4, glue. Renamed match_citations_fz() match_fz(). Added cast_to_string(), generalized version vctr_to_string() accepts multiple inputs (similar paste()). Added function partition() vectors groups n elements per group.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"data-0-1-6","dir":"Changelog","previous_headings":"","what":"Data","title":"DO.utils 0.1.6","text":"Added latest official publication DO_pubs. Added official DO_colors.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"feature-website-updates-0-1-6","dir":"Changelog","previous_headings":"","what":"Feature: Website Updates","title":"DO.utils 0.1.6","text":"Added functions create statistics graphs: plot_citedby(), plot_terms_def_counts(), plot_branch_counts(), plot_xref_counts(). Added make_user_list_html() create rows table Community > Collaborators > Users Disease Ontology team’s curated “Uses” Google sheet.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"internal-use-only-0-1-6","dir":"Changelog","previous_headings":"","what":"Internal Use Only","title":"DO.utils 0.1.6","text":"Added to_character(), helper cast_to_string(), reduce lists data frames character vectors limiting data loss. Added html_in_rows(), helper make_user_list_html(), format html elements rows (optional row & cell attributes). Added Google sheets identifiers programmatic access.","code":""},{"path":[]},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"general-0-1-5","dir":"Changelog","previous_headings":"","what":"General","title":"DO.utils 0.1.5","text":"Added NEWS.md file track changes package. Created download_status Ref Class manage downloads based exit code/status. confine_list() / release_list() reversibly convert list column character vector (using json). is_invariant() test vectors 1 value; methods character & numeric vectors. unique_to_string() collapse vectors strings. unique_if_invariant() conditionally collapse vectors 1 value. Added na.rm argument vctr_to_scalar functions. NA, method lists. NULL, replace NULL values lists recursively. blank, replace “” values. collapse_col() collapse 1 specified columns data frame concatenating unique values together, preserving unique values columns. Created download_obo_ontology() download 1 ontologies maintained OBO Foundry.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"data-0-1-5","dir":"Changelog","previous_headings":"","what":"Data","title":"DO.utils 0.1.5","text":"Added publication info. Added OBO Foundry metadata.","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"feature-alliance-0-1-5","dir":"Changelog","previous_headings":"","what":"Feature: Alliance","title":"DO.utils 0.1.5","text":"Made possible count Alliance terms subset DOIDs. Increased record type count options (arg: record_lvl) –> “full_record”, “disease-object”, “disease”, “object”","code":""},{"path":"https://allenbaron.github.io/DO.utils/news/index.html","id":"feature-citedby-0-1-5","dir":"Changelog","previous_headings":"","what":"Feature: citedby","title":"DO.utils 0.1.5","text":"Updated capture datetime citedby data first retrieved. NEED new citedby_pubmed() combines citedby_pmid() & pubmed_summary(). Uses new extract_pmid() elink_list method. Changed citedby tidy() methods as_tibble() methods & added new methods. Created truncate_authors() shorten long PubMed author lists. Created get_url() & append_to_url() build DOI, PubMed, PMC URLs individual publications.","code":""}]