library(rvest)
library(tidyr)
library(dplyr)
tab2 <- read_html("https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5526536/table/pone.0182027.t002/") %>% html_table()
tab2 <- tab2[[2]] %>%
as_tibble() %>%
rename(ID = `nPOD #`) %>%
rename_at(2:6, function(x) gsub("-", "", x)) %>%
filter(grepl("^6", ID)) %>% # remove group summary rows
separate(IP3R2, c("IP3R2", "IP3R2_SEM"), "±") %>% # separate values and SEM values
separate(TOM20, c("TOM20", "TOM20_SEM"), "±") %>%
separate(MFN2, c("MFN2", "MFN2_SEM"), "±") %>%
separate(VDAC1, c("VDAC1", "VDAC1_SEM"), "±") %>%
separate(PLA, c("PLA", "PLA_SEM"), "±") %>%
mutate_all(as.numeric)
# rename PLA to IP3R2.VDAC1 (IP3R2-VDAC1 interactions quantified by in situ proximity ligation assay (PLA))
# since that is clearer
tab2 <- tab2 %>%
rename_all(function(x) gsub("PLA", "IP3R2.VDAC1", x))
write.table(tab2, file = "PMID28742858_1_Thivolet-2017.tsv", sep = "\t", row.names = F, quote = F)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.