anchor_pmids {TFutils} | R Documentation |
check columns of a dataframe for numerical tokens of 7 or 8 digits and create HTML anchors to pubmed.gov constituting a link to a PMID
anchor_pmids(dataframe)
dataframe |
a data.frame instance |
data.frame with HTML anchors to pubmed.gov inserted where 7- or 8-digit numbers are found
The method of isolating putative PMIDs is peculiar to patterns found in
the comment fields of annotated TF table (supplemental table S1 found in
https://www.cell.com/cms/10.1016/j.cell.2018.01.029/attachment/88c0eca1-66f9-4068-b02e-bd3d55144f79/mmc2.xlsx of PMID 29425488). When DT::datatable is called on the output
of this function with escape=FALSE
the PMIDs will render as hyperlinks.
Note that column 1 is assumed to be an ENSEMBL ID which could have 7 or 8 digits but is handled differently
litdf = data.frame(id="ENSG00000116819", a="Binds the same GCCTGAGGC sequence as the other AP-2s (PMID: 24789576)", stringsAsFactors=FALSE) anchor_pmids(litdf)