From d44ce458a34b649a84cd0ddb749c6c718ca2b12b Mon Sep 17 00:00:00 2001 From: Kate Isaac Date: Tue, 23 Jan 2024 18:28:18 -0500 Subject: [PATCH 1/8] add CEDAR and ARCHS4 and overhaul and simplify code base --- allTables.Rmd | 20 +-- allTables.html | 79 +++++---- alldataFilesEditor.Rmd | 62 +++++-- clinicalTable.Rmd | 138 ++-------------- data/{ictr_table.csv => itcr_table.csv} | 0 ...e_clinical.csv => itcr_table_clinical.csv} | 0 ...ble_general.csv => itcr_table_general.csv} | 0 ...ble_imaging.csv => itcr_table_imaging.csv} | 0 ...r_table_omics.csv => itcr_table_omics.csv} | 0 ...aging.csv => itcr_table_omics_imaging.csv} | 0 ...r_table_other.csv => itcr_table_other.csv} | 0 ...resources.csv => itcr_table_resources.csv} | 0 ...sv => itcr_table_resources_identifier.csv} | 5 +- imagingTable.Rmd | 153 ++++-------------- multiTable.Rmd | 144 +++-------------- omicsTable.Rmd | 133 ++------------- resourceTable.Rmd | 143 ++++++++-------- scripts/format-tables.R | 132 +++++++++++++++ 18 files changed, 391 insertions(+), 618 deletions(-) rename data/{ictr_table.csv => itcr_table.csv} (100%) rename data/{ictr_table_clinical.csv => itcr_table_clinical.csv} (100%) rename data/{ictr_table_general.csv => itcr_table_general.csv} (100%) rename data/{ictr_table_imaging.csv => itcr_table_imaging.csv} (100%) rename data/{ictr_table_omics.csv => itcr_table_omics.csv} (100%) rename data/{ictr_table_omics_imaging.csv => itcr_table_omics_imaging.csv} (100%) rename data/{ictr_table_other.csv => itcr_table_other.csv} (100%) rename data/{ictr_table_resources.csv => itcr_table_resources.csv} (100%) rename data/{ictr_table_resources_identifier.csv => itcr_table_resources_identifier.csv} (84%) create mode 100644 scripts/format-tables.R diff --git a/allTables.Rmd b/allTables.Rmd index 14a5e84..e52958c 100644 --- a/allTables.Rmd +++ b/allTables.Rmd @@ -16,9 +16,7 @@ The following table contains a list of ITCR-funded bioinformatics platforms, as ```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} -#Load DT, dplyr library(DT) -#library(dplyr) library(here) library(tidyverse) library(magrittr) @@ -31,17 +29,14 @@ library(magrittr) ```{r echo=FALSE, include=FALSE, message=FALSE, warning=FALSE} ## Solution using child Rmds: https://stackoverflow.com/questions/70785139/accessing-objects-from-another-mardown-file -## general refers to multi-data types -knitr::knit_child("multiTable.Rmd") -knitr::knit_child("imagingTable.Rmd") -knitr::knit_child("omicsTable.Rmd") -knitr::knit_child("clinicalTable.Rmd") -tabMulti <- read_csv(file = "data/modified_general.csv") -tabImg <- read_csv(file = "data/modified_imaging.csv") -tabOmi <- read_csv(file = "data/modified_omics.csv") -tabCli <- read_csv(file = "data/modified_clinical.csv") +## general refers to multi-data types +knitr::knit_child("resourceTable.Rmd") +knitr::knit_child("multiTable.Rmd") #inherit modified_general +knitr::knit_child("imagingTable.Rmd") #inherit modified_imaging +knitr::knit_child("omicsTable.Rmd") #inherit modified_omics +knitr::knit_child("clinicalTable.Rmd") #inherit modified_clinical -fulltab <- bind_rows(tabMulti, tabImg, tabOmi, tabCli) +fulltab <- bind_rows(modified_general, modified_imaging, modified_omics, modified_clinical) names(fulltab) ``` @@ -78,5 +73,6 @@ ITCR_ALL <- fulltab %>% ``` ```{r,echo=FALSE,message=FALSE, warning=FALSE} +#Display the whole table ITCR_ALL ``` diff --git a/allTables.html b/allTables.html index 7392083..d0c2160 100644 --- a/allTables.html +++ b/allTables.html @@ -13,8 +13,8 @@ All Tables - - + + @@ -32,22 +32,20 @@ - + - - - - + + + + - - - - - - + + + + @@ -78,6 +76,7 @@ + @@ -103,6 +102,9 @@ summary { display: list-item; } +details > summary > p:only-child { + display: inline; +} pre code { padding: 0; } @@ -159,11 +161,15 @@ href = "index.html"; var menuAnchor = $('a[href="' + href + '"]'); - // mark it active - menuAnchor.tab('show'); - - // if it's got a parent navbar menu mark it active as well - menuAnchor.closest('li.dropdown').addClass('active'); + // mark the anchor link active (and if it's in a dropdown, also mark that active) + var dropdown = menuAnchor.closest('li.dropdown'); + if (window.bootstrap) { // Bootstrap 4+ + menuAnchor.addClass('active'); + dropdown.find('> .dropdown-toggle').addClass('active'); + } else { // Bootstrap 3 + menuAnchor.parent().addClass('active'); + dropdown.addClass('active'); + } // Navbar adjustments var navHeight = $(".navbar").first().height() + 15; @@ -192,8 +198,8 @@ border-radius: 4px; } -.tabset-dropdown > .nav-tabs > li.active:before { - content: ""; +.tabset-dropdown > .nav-tabs > li.active:before, .tabset-dropdown > .nav-tabs.nav-tabs-open:before { + content: "\e259"; font-family: 'Glyphicons Halflings'; display: inline-block; padding: 10px; @@ -201,16 +207,9 @@ } .tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before { - content: ""; - border: none; -} - -.tabset-dropdown > .nav-tabs.nav-tabs-open:before { - content: ""; + content: "\e258"; font-family: 'Glyphicons Halflings'; - display: inline-block; - padding: 10px; - border-right: 1px solid #ddd; + border: none; } .tabset-dropdown > .nav-tabs > li.active { @@ -254,7 +253,7 @@ ',' ', ''), - Documentation = paste0(' ',' ', ''), - Publications = paste0(' ',' ', '')) - -# Mutate generalData's Name to be bolded. -generalData %<>% - mutate(Name = paste0('', Name,'')) - -# Mutate the pricing column to have a link. -generalData %<>% - mutate(Price = paste0(' ', Price,'')) - -# Mutate the tibble to combine all three columns into a general "Platform" column. -## Awan Edit: Removed line-breaks between linked icons to save space. -generalData %<>% - mutate(Platform = paste0(Name, ":",'

', `Link (Hyperlinked Over Name)`, Documentation, Publications)) - -# Mutate Platform to contain an ITCR logo if the Platform is funded by ITCR. -## Awan Edit: Reduced ITCR Logo size. -for (row in 1:nrow(generalData)) { - status <- generalData[row, "Funding"] - target <- generalData[row, "Platform"] - - if(status == "Yes") { - target %<>% - mutate(Platform = paste0(Platform,'

',' ')) - - generalData[row,"Platform"] <- target - } -} - -# Shift the location of the "Platform" column. -generalData %<>% - relocate(Platform, .after = `Link (Hyperlinked Over Name)`) - -# Load file for Resource Table -resource <- read_csv(file = here::here("data/ictr_table_resources_identifier.csv")) - -# Create the html version of links in resources -## AwanEdit: added a column "identifier" to the resource table to use it as a merge key variable with the Data provided column entries in other tables -resource <- resource %>% - mutate(Link = paste0(' ',Name,'')) -## To have shorter acronyms use "identifier" in place of "Name" inside 'mutate' - -# # Create a function to merge resources and generalData (edit: This function seems redundant) -# resourceMerge <- function( generalData,row,col ) { -# generalData %>% -# filter(row_number() == row) %>% -# select(col) -# } - -# Alter the generalData df to see how it interacts with the resources tab. -# generalData %<>% -# mutate('Data Provided' = str_replace(string = pull(generalData,'Data Provided'), pattern = "TCGA", replacement = str_subset(string = pull(resource,Link), pattern = "tcga")[1])) - -# AwanEdit: Code for Linking Resource table to the other tables' Data Provided column -LinkUpdater <- bind_cols(Name = pull(generalData, Name), - read.table(text = as.character(generalData$`Data Provided`), sep = ",", as.is = TRUE, fill = TRUE, na.strings = "")) %>% - pivot_longer(cols = -Name, names_to = "vars", values_to = "vals") %>% - filter(!is.na(vals)) %>% - mutate(vals = str_trim(vals, side = "both")) %>% - select(-vars, identifier = vals) %>% - left_join(y = resource %>% select(identifier, Link), by = "identifier") %>% - mutate(Link = if_else(is.na(Link), identifier, Link)) %>% select(-identifier) %>% - group_by(Name) %>% mutate(var = paste0("var", 1:n() )) %>% ungroup() %>% relocate(var) %>% - pivot_wider(names_from = var, values_from = Link) %>% - unite(col = "Data Provided2", -Name, sep = ", ", na.rm = T, remove = T) - -generalData %<>% left_join(LinkUpdater, by = "Name") %>% - relocate(`Data Provided2`, .before = `Data Provided`) %>% - select(-`Data Provided`) %>% rename("Data Provided" = `Data Provided2`) - -# Create a trimmed version of the data by removing the non-consolidated columns. -trimmedData <- generalData[ -c(1,2,8,10,12,13) ] - -# Shift the location of the "Summary" column. -trimmedData %<>% - relocate(Summary, .after = Subcategories) +# Load file for Clinical Table and make any additions/edits to it here in this block +clinicalData <- read_csv(file = here::here("data/itcr_table_clinical.csv")) +``` -# save the trimmed version of the data file to call into allTables.Rmd -modified_clinical <- trimmedData %>% - mutate(Category = "Clinical") %>% relocate(Category, .after = Platform) +```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} +modified_clinical <- formatTheTables(clinicalData, "Clinical", non_resource = TRUE) # save this data file to the data folder write_csv(modified_clinical, file = "data/modified_clinical.csv") ``` ```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} -# Create a Imaging Table -ITCR_clinical <- trimmedData %>% - DT::datatable( - style = 'default', - width="100%", - colnames = c('Unique Factor' = 4, 'Types of Data' = 5, 'Summary' = 3), - rownames = FALSE, - escape = FALSE, - #caption = "some caption", - filter = "top", - #extensions = list("Scroller") - options = list(scrollX = TRUE, autoWidth = TRUE, pageLength = 10, - scrollCollapse = TRUE, fillContainer = TRUE, - order = (list(0, 'asc')), - columnDefs = list(list(className = 'dt-center', targets = "_all"), +# Create a Clinical Table + +columnDefsListOfLists <- list(list(className = 'dt-center', targets = "_all"), list(width = '280px', targets = c(2)) , - list(width = '120px', targets = c(3)) ), - # columnDefs = list(list(width = '300px', targets = c(2)), - # list(width = '100px', targets = c(4,5)), - # list(width = '120px', targets = c(0)), - # list(width = '200px', targets = c(3)), - # list(width = '150px', targets = "_all")), - initComplete = JS( - "function(settings, json) {", - #"$('body').css({'font-family': 'Calibri'});", - "$(this.api().table().header()).css({'backgroundColor': '#3f546f'});", - "$(this.api().table().header()).css({'color': '#fff'});", - "}")) - ) + list(width = '120px', targets = c(3)) + ) + +ITCR_clinical <- setup_dt_datatable(modified_clinical, columnDefsListOfLists) ``` ```{r,echo=FALSE,message=FALSE, warning=FALSE} +#Display the clinical table ITCR_clinical ``` diff --git a/data/ictr_table.csv b/data/itcr_table.csv similarity index 100% rename from data/ictr_table.csv rename to data/itcr_table.csv diff --git a/data/ictr_table_clinical.csv b/data/itcr_table_clinical.csv similarity index 100% rename from data/ictr_table_clinical.csv rename to data/itcr_table_clinical.csv diff --git a/data/ictr_table_general.csv b/data/itcr_table_general.csv similarity index 100% rename from data/ictr_table_general.csv rename to data/itcr_table_general.csv diff --git a/data/ictr_table_imaging.csv b/data/itcr_table_imaging.csv similarity index 100% rename from data/ictr_table_imaging.csv rename to data/itcr_table_imaging.csv diff --git a/data/ictr_table_omics.csv b/data/itcr_table_omics.csv similarity index 100% rename from data/ictr_table_omics.csv rename to data/itcr_table_omics.csv diff --git a/data/ictr_table_omics_imaging.csv b/data/itcr_table_omics_imaging.csv similarity index 100% rename from data/ictr_table_omics_imaging.csv rename to data/itcr_table_omics_imaging.csv diff --git a/data/ictr_table_other.csv b/data/itcr_table_other.csv similarity index 100% rename from data/ictr_table_other.csv rename to data/itcr_table_other.csv diff --git a/data/ictr_table_resources.csv b/data/itcr_table_resources.csv similarity index 100% rename from data/ictr_table_resources.csv rename to data/itcr_table_resources.csv diff --git a/data/ictr_table_resources_identifier.csv b/data/itcr_table_resources_identifier.csv similarity index 84% rename from data/ictr_table_resources_identifier.csv rename to data/itcr_table_resources_identifier.csv index 1b31ebc..7839771 100644 --- a/data/ictr_table_resources_identifier.csv +++ b/data/itcr_table_resources_identifier.csv @@ -13,7 +13,7 @@ "12","dcmqi","dcmqi: DICOM for Quantitative Imaging","Yes","DICOM Standards, Cancer Imaging","Segmentation Imaging, Parametric Map Imaging, Columetric Measurements","Lightweight collection of tools and resources with minimal dependencies. Promotes standardization through DICOM","Free","https://github.com/qiicr/dcmqi","dcmqi is a free, open source library that implements conversion of the data stored in commonly used research formats into the standard DICOM representation" "13","Region Templates","Region Templates","Yes","Image Analysis","Imaging Data","Highly technical setup to utilize the suite of image analysis tools.","Free","https://github.com/SBU-BMI/region-templates","A suite of libraries and runtime to support image analysis." "14","Cistrome","Cistrome","Yes","Genomics","Cistrome Anaysis","Contains CRISPR tools for data analysis; other tools available for use","Free","http://cistrome.org/Cistrome/Cistrome_Project.html","Curated and processed human/mouse ChIP/DNase-seq datasets in GEO, allowing users to search, browse, download ChIP-seq data signals, peaks, QC, motifs, target genes and similar datasets." -"15","TOPAS","TOPAS","Yes","Radiology Imaging","X-Ray, Particle Therapy, CT Imaging, Score Dose, Fluence","This resource models x-ray and particle therapy treatment heads, patient geometry, and replays phase space. With the correct set of inputs and data, this resource allows for easily accessible and reproducible modeling outputs.","Priced","http://www.topasmc.org/","Monte Carlo simulation of ionizing radiation transport for medical applications with focus on therapy and imaging with x-rays, electrons, protons and all other forms of ionizing radiation." +"15","TOPAS","TOPAS","Yes","Radiology Imaging","X-Ray, Particle Therapy, CT Imaging, Score Dose, Fluence","This resource models x-ray and particle therapy treatment heads, patient geometry, and replays phase space. With the correct set of inputs and data, this resource allows for easily accessible and reproducible modeling outputs."," Paid/Free","http://www.topasmc.org/","Monte Carlo simulation of ionizing radiation transport for medical applications with focus on therapy and imaging with x-rays, electrons, protons and all other forms of ionizing radiation." "16","TCGA","The Cancer Genome Atlas (TCGA)","No","Genomics, Proteomics","Clinical, Copy Number, DNA, Imaging, Methylation, Microsatellite Instability, miRNA, mRNA Expression, Protein Expression","TCGA functions through the Genomic Data Commons, allowing for direct comparisons with data found in other GDC datasets.","Free","https://www.cancer.gov/about-nci/organization/ccg/research/structural-genomics/tcga","TCGA is one of the most comprehensive resources on cancer data with over 20,000 tumor and normal samples. There are 33 cancer types represented in this resource, and this resource remains one of the largest publically avaiable sources for cancer data in the reserach community." "17","1000 Genomes","1000 Genomes Project","No","Genomics","Genomic Sequences, Genotype Variations","1000 Genomes Project is one of the largest continuously updated genomics resources available to researchers","Free","https://www.internationalgenome.org/","The 1000 Genomes Project aimed to collect common genetic variants with frequencies of at least 1% in the populations studied. This project sequenced thousands of genomes to create a publically accessible database for researchers." "18","TARGET","Therapeutically Applicable Research to Generate Effective Treatments (TARGET)","No","Genomics","Genomic Sequences, Transcriptome Data","Contains data collected from acute myeloid leukemia, osteosarcoma, kidney tumors, acute lymphoblastic leukemia, and neuroblastoma","Free","https://ocg.cancer.gov/programs/target","TARGET tracks genetic changes across several datasets in order to better understand reasons for the initiation and progression of several childhood cancers. The organization aims to make this information as freely accessible as possible to accelerate the development of novel solutions to pediatric cancer treatments." @@ -23,3 +23,6 @@ "22","PheKB","Phenotype KnowledgeBase (PheKB)","No","Genomics, Algorithms","Clinical, Algorithms","This resource contains a set of tools that allow for cross-site collaboration from algorithm development, validation, and sharing.","Free","https://phekb.org/","PheKB is a collaborative resource that allows users to contribute electronic algorithms to identify various characteristics of patient health data. This resource contains a series of integrated tools and standardizations for the user-contributed data that is added to the resource." "23","NSCLC Radiomics","NSCLC Radiomics","No","Genomics, Cancer Imaging","Clinical, Imaging Data","Focuses specifically on non-small cell lung cancer imaging","Free","https://wiki.cancerimagingarchive.net/display/Public/NSCLC-Radiomics","This resource contains a selection of images from non-small cell lung cancer patients acquired through CT scans. All datasets were manually delineated by radiation oncologists while also containing clinical outcome data in addition to the raw imaging files." "24","ICGC","ICGC Data Portal","No","Genomics","Algorithms, Genomic Seuqnces, Cancer Pathway Data","This resource is developed explicitly to work with the Overture Platform","Free","https://dcc.icgc.org/","This resource offers a suite of tools and datasets that allow for the visualization and retrieval of various cancer data." +"25","ISIC","ISIC Archive","Yes","Cancer Imaging","Clinical imaging","The largest public archive of dermatology photographs. It has around 20 million individual image downloads per month and is widely used for education and AI research.","Free","https://www.isic-archive.com/","The ISIC Archive is an academic-industry collaboration that is devoted to improving dermatology artificial intelligence. It is the largest public archive of images of skin conditions, with special attention to skin cancer detection. We also host grand challenges (and live challenges) for AI models as well as conference workshops." +"26","CEDAR","Cancer Epitope Database and Analysis Resource (CEDAR)","Yes","Proteomics","Curated literature data: experimentally-tested epitopes and their immunological, biological, and clinical contexts","It is a free resoure that provides the cancer community with a central repository of experimentally-tested cancer epitopes curated from peer-reviewed literature.","Free","https://cedar.iedb.org/","The Cancer Epitope Database and Analysis Resource (CEDAR) is a freely available resource funded by NCI. It catalogs experimental data on antibody and T cell epitopes studied in humans, non-human primates, and other animal species in the context of cancer disease. CEDAR also hosts tools to assist in the prediction and analysis of cancer epitopes." +"27","ARCHS4","ARCHS4","Yes","Transcriptomics","Transcriptomics, GEO","This resource is updated frequently. It contains all GEO samples and includes metadata and data search.","Free for academic institutions","https://maayanlab.cloud/archs4/","ARCHS4 provides gene and trasncript counts uniformly processed from all the human and mouse RNA-seq samples from GEO" diff --git a/imagingTable.Rmd b/imagingTable.Rmd index 0a582ec..5b06670 100644 --- a/imagingTable.Rmd +++ b/imagingTable.Rmd @@ -7,11 +7,6 @@ output: html_document The following table contains a list of imaging informatics platforms. These platforms work with several imaging data types, ranging from pathology imaging to radiographic imaging. These platforms allow researchers to create custom workflows, view and interact with analysis results, utilize imaging algorithms, as well as visualize and report analysis results. -```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} -## edit all the data files before loading them. Compiling this Rmd will generate modified data files. -knitr::knit_child("alldataFilesEditor.Rmd") -``` - ```{r,echo=FALSE,results='hide',,message=FALSE, warning=FALSE} #Load DT, dplyr library(DT) @@ -28,132 +23,48 @@ library(magrittr) ```{r,echo=FALSE,results='hide',,message=FALSE, warning=FALSE} -# Load file for Imaging Table -generalData <- read_csv(file = here::here("data/ictr_table_imaging_new.csv")) -#generalData +# Load file for Imaging Table and make any additions/edits within this block +imaging <- read_csv(file = here::here("data/itcr_table_imaging.csv")) + +## CaPTk: Submitted 06/01/2023, 11:12 (sbakas@upenn.edu) +new_imaging_CaPTk <- tibble( + Name = "The Cancer Imaging Phenomics Toolkit (CaPTk)", + `Link (Hyperlinked Over Name)` = "https://www.med.upenn.edu/cbica/captk/", + Subcategories = "Radiomics", + `Unique Factor` = "CaPTk is a stand-alone software client that allows for free image analysis through the Image Processing Portal (IPP) that offers compute power through CaPTk's supporting high performance computing cluster.", + `Data Types (Clean)` = "Radiographic Imaging", + Price = "Free", + Documentation = "https://cbica.github.io/CaPTk/", + `Data Provided` = "Sample Data available within CaPTk", + Publications = "https://doi.org/10.1117/1.jmi.5.1.011018", + `Summary` = "CaPTk is a software platform for analysis of radiographic cancer images, currently focusing on brain, breast, and lung cancer that integrates advanced, validated tools performing various aspects of medical image analysis, that have been developed in the context of active clinical research studies and collaborations toward addressing real clinical needs. CaPTk aims to facilitate the swift translation of advanced computational algorithms into routine clinical quantification, analysis, decision making, and reporting workflow.", + Funding = "Yes", + PLink = "https://github.com/CBICA/CaPTk/#downloads") + +## Add new rows to the existing dataset +imaging <- dplyr::rows_insert(imaging, new_imaging_CaPTk, conflict = "ignore") +``` +```{r,echo=FALSE,results='hide',,message=FALSE, warning=FALSE} # Mutate the tibble to alter three of the columns -generalData %<>% - mutate(`Link (Hyperlinked Over Name)` = paste0(' ',' ', ''), - Documentation = paste0(' ',' ', ''), - Publications = paste0(' ',' ', '')) - -# Mutate generalData's Name to be bolded. -generalData %<>% - mutate(Name = paste0('', Name,'')) - -# Mutate the pricing column to have a link. -generalData %<>% - mutate(Price = paste0(' ', Price,'')) - -# Mutate the tibble to combine all three columns into a general "Platform" column. -## Awan Edit: Removed line-breaks between linked icons to save space. -generalData %<>% - mutate(Platform = paste0(Name, ":",'

', `Link (Hyperlinked Over Name)`, Documentation, Publications)) - -# Mutate Platform to contain an ITCR logo if the Platform is funded by ITCR. -## Awan Edit: Reduced ITCR Logo size. -for (row in 1:nrow(generalData)) { - status <- generalData[row, "Funding"] - target <- generalData[row, "Platform"] - - if(status == "Yes") { - target %<>% - mutate(Platform = paste0(Platform,'

',' ')) - - generalData[row,"Platform"] <- target - } -} - -# Shift the location of the "Platform" column. -generalData %<>% - relocate(Platform, .after = `Link (Hyperlinked Over Name)`) - -# Load file for Resource Table -resource <- read_csv(file = here::here("data/ictr_table_resources_identifier.csv")) - -# Create the html version of links in resources -## AwanEdit: added a column "identifier" to the resource table to use it as a merge key variable with the Data provided column entries in other tables -resource <- resource %>% - mutate(Link = paste0(' ',Name,'')) -## To have shorter acronyms use "identifier" in place of "Name" inside 'mutate' - -# # Create a function to merge resources and generalData (edit: This function seems redundant) -# resourceMerge <- function( generalData,row,col ) { -# generalData %>% -# filter(row_number() == row) %>% -# select(col) -# } - -# Alter the generalData df to see how it interacts with the resources tab. -# generalData %<>% -# mutate('Data Provided' = str_replace(string = pull(generalData,'Data Provided'), pattern = "TCGA", replacement = str_subset(string = pull(resource,Link), pattern = "tcga")[1])) - -# AwanEdit: Code for Linking Resource table to the other tables' Data Provided column -LinkUpdater <- bind_cols(Name = pull(generalData, Name), - read.table(text = as.character(generalData$`Data Provided`), sep = ",", as.is = TRUE, fill = TRUE, na.strings = "")) %>% - pivot_longer(cols = -Name, names_to = "vars", values_to = "vals") %>% - filter(!is.na(vals)) %>% - mutate(vals = str_trim(vals, side = "both")) %>% - select(-vars, identifier = vals) %>% - left_join(y = resource %>% select(identifier, Link), by = "identifier") %>% - mutate(Link = if_else(is.na(Link), identifier, Link)) %>% select(-identifier) %>% - group_by(Name) %>% mutate(var = paste0("var", 1:n() )) %>% ungroup() %>% relocate(var) %>% - pivot_wider(names_from = var, values_from = Link) %>% - unite(col = "Data Provided2", -Name, sep = ", ", na.rm = T, remove = T) - -generalData %<>% left_join(LinkUpdater, by = "Name") %>% - relocate(`Data Provided2`, .before = `Data Provided`) %>% - select(-`Data Provided`) %>% rename("Data Provided" = `Data Provided2`) - -# Create a trimmed version of the data by removing the non-consolidated columns. -trimmedData <- generalData[ -c(1,2,8,10,12,13) ] - -# Shift the location of the "Summary" column. -trimmedData %<>% - relocate(Summary, .after = Subcategories) +modified_imaging <- formatTheTables(imaging, "Imaging", non_resource = TRUE) # save the trimmed version of the data file to call into allTables.Rmd -modified_imaging <- trimmedData %>% - mutate(Category = "Imaging") %>% relocate(Category, .after = Platform) -# save this data file to the data folder write_csv(modified_imaging, file = "data/modified_imaging.csv") ``` ```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} -# Create a Imaging Table -ITCR_imaging <- trimmedData %>% - DT::datatable( - style = 'default', - width="100%", - colnames = c('Unique Factor' = 4, 'Types of Data' = 5, 'Summary' = 3), - rownames = FALSE, - escape = FALSE, - #caption = "some caption", - filter = "top", - #extensions = list("Scroller"), - extensions = 'FixedHeader', - options = list(scrollX = TRUE, autoWidth = TRUE, pageLength = 10, - scrollCollapse = TRUE, fillContainer = TRUE, - order = (list(0, 'asc')), - columnDefs = list(list(className = 'dt-center', targets = "_all"), - list(width = '140px', targets = c(0)) , - list(width = '250px', targets = c(2)) , - list(width = '120px', targets = c(3))), - # columnDefs = list(list(width = '300px', targets = c(2)), - # list(width = '100px', targets = c(4,5)), - # list(width = '120px', targets = c(0)), - # list(width = '200px', targets = c(3)), - # list(width = '150px', targets = "_all")), - initComplete = JS( - "function(settings, json) {", - #"$('body').css({'font-family': 'Calibri'});", - "$(this.api().table().header()).css({'backgroundColor': '#3f546f'});", - "$(this.api().table().header()).css({'color': '#fff'});", - "}")) - ) +# Create an Imaging Table + +columnDefsListOfLists <- list(list(className = 'dt-center', targets = "_all"), + list(width = '280px', targets = c(2)) , + list(width = '130px', targets = c(3)) + ) + +ITCR_imaging <- setup_dt_datatable(modified_imaging, columnDefsListOfLists) ``` ```{r,echo=FALSE,message=FALSE, warning=FALSE} +#Display the imaging table ITCR_imaging ``` diff --git a/multiTable.Rmd b/multiTable.Rmd index 1126036..2b9088f 100644 --- a/multiTable.Rmd +++ b/multiTable.Rmd @@ -17,11 +17,11 @@ The following table contains a list of informatics and biomedical platforms that ```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} #Load DT, dplyr library(DT) -#library(dplyr) library(here) library(tidyverse) library(magrittr) -#library(RCurl) + +source("scripts/format-tables.R") ``` **Table keys:** @@ -30,140 +30,38 @@ library(magrittr) ```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} -## edit all the data files before loading them. Compiling this Rmd will generate modified data files. -knitr::knit_child("alldataFilesEditor.Rmd") -``` - - -```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} -# Load file for General Table -generalData <- read_csv(file = here::here("data/ictr_table_general.csv")) -#generalData - -# Mutate the tibble to alter three of the columns -generalData %<>% - mutate(`Link (Hyperlinked Over Name)` = paste0(' ',' ', ''), - Documentation = paste0(' ',' ', ''), - Publications = paste0(' ',' ', '')) - -# Mutate generalData's Name to be bolded. -generalData %<>% - mutate(Name = paste0('', Name,'')) - -# Mutate the pricing column to have a link. -generalData %<>% - mutate(Price = paste0(' ', Price,'')) - -# Mutate the tibble to combine all three columns into a general "Platform" column. -## Awan Edit: Removed line-breaks between linked icons to save space. -generalData %<>% - mutate(Platform = paste0(Name, ":",'

', `Link (Hyperlinked Over Name)`, Documentation, Publications)) - -# Mutate Platform to contain an ITCR logo if the Platform is funded by ITCR. -## Awan Edit: Reduced ITCR Logo size. -for (row in 1:nrow(generalData)) { - status <- generalData[row, "Funding"] - target <- generalData[row, "Platform"] - - if(status == "Yes") { - target %<>% - mutate(Platform = paste0(Platform,'

',' ')) - - generalData[row,"Platform"] <- target - } -} - -# Shift the location of the "Platform" column. -generalData %<>% - relocate(Platform, .after = `Link (Hyperlinked Over Name)`) - -# Load file for Resource Table -resource <- read_csv(file = here::here("data/ictr_table_resources_identifier.csv")) - -# Create the html version of links in resources -## AwanEdit: added a column "identifier" to the resource table to use it as a merge key variable with the Data provided column entries in other tables: see dataFilesEditor Rmd -resource <- resource %>% - mutate(Link = paste0(' ',identifier,'')) - -# # Create a function to merge resources and generalData (edit: This function seems redundant) -# resourceMerge <- function( generalData,row,col ) { -# generalData %>% -# filter(row_number() == row) %>% -# select(col) -# } - -# Alter the generalData df to see how it interacts with the resources tab. -# generalData %<>% -# mutate('Data Provided' = str_replace(string = pull(generalData,'Data Provided'), pattern = "TCGA", replacement = str_subset(string = pull(resource,Link), pattern = "tcga")[1])) +# Load file for General Table and make additions/edits here in this block +generalData <- read_csv(file = here::here("data/itcr_table_general.csv")) -# AwanEdit: Code for Linking Resource table to the other tables' Data Provided column -LinkUpdater <- bind_cols(Name = pull(generalData, Name), - ## create new columns for each comma separated string in the `Data Provided` column - ## without specifying the total number of columns in advance - read.table(text = as.character(generalData$`Data Provided`), sep = ",", as.is = TRUE, fill = TRUE, na.strings = "")) %>% - ## convert the data into long format to prepare for merging with resource table with corresponding identifier - pivot_longer(cols = -Name, names_to = "vars", values_to = "vals") %>% - ## filter out the rows with NA values - filter(!is.na(vals)) %>% - mutate(vals = str_trim(vals, side = "both")) %>% ## remove leading and trailing white spaces in the strings - select(-vars, identifier = vals) %>% - left_join(y = resource %>% select(identifier, Link), by = "identifier") %>% # merge the working data with the Link column from the resource table - mutate(Link = if_else(is.na(Link), identifier, Link)) %>% select(-identifier) %>% # fill out the missing values with with strings non-linked ids - group_by(Name) %>% mutate(var = paste0("var", 1:n() )) %>% ungroup() %>% relocate(var) %>% ## prepare data to re-convert into wide form - pivot_wider(names_from = var, values_from = Link) %>% - unite(col = "Data Provided2", -Name, sep = ", ", na.rm = T, remove = T) # unite all columns (except Name) into one string variables separated by commas +#While reworking the code, saw that ICGC and PCAWG were not separated by a comma and therefore ICGC wasn't linked +tibbleCGC <- tibble( + Name = "Cancer Genome Collaboratory", + `Data Provided` = "ICGC, PCAWG, DCC" +) -generalData %<>% left_join(LinkUpdater, by = "Name") %>% - relocate(`Data Provided2`, .before = `Data Provided`) %>% - select(-`Data Provided`) %>% rename("Data Provided" = `Data Provided2`) +generalData <- dplyr::rows_update(generalData, tibbleCGC, by = "Name") -# Create a trimmed version of the data by removing the non-consolidated columns. -trimmedData <- generalData[ -c(1,2,8,10,12,13) ] - -# Shift the location of the "Summary" column. -trimmedData %<>% - relocate(Summary, .after = Subcategories) +``` +```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} +generalData %<>% rename("Unique Factor" = "Unique Factor (free trial, extra guidance, privacy protection, development, unique dataset?)") +modified_general <- formatTheTables(generalData, "General", non_resource = TRUE) # save the trimmed version of the data file to call into allTables.Rmd -modified_general <- trimmedData %>% - rename("Unique Factor" = "Unique Factor (free trial, extra guidance, privacy protection, development, unique dataset?)") %>% - mutate(Category = "General") %>% relocate(Category, .after = Platform) -# save this data file to the data folder write_csv(modified_general, file = "data/modified_general.csv") ``` ```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} # Create a General Table -ITCR_general <- trimmedData %>% - DT::datatable( - style = 'default', - width="100%", - colnames = c('Unique Factor' = 4, 'Types of Data' = 5, 'Summary' = 3), - rownames = FALSE, - escape = FALSE, - #caption = "some caption", - filter = "top", - #extensions = list("Scroller") - options = list(scrollX = TRUE, autoWidth = TRUE, pageLength = 10, - scrollCollapse = TRUE, fillContainer = TRUE, - order = (list(0, 'asc')), - columnDefs = list(list(className = 'dt-center', targets = "_all"), + +columnDefsListOfLists <- list(list(className = 'dt-center', targets = "_all"), list(width = '280px', targets = c(2)) , - list(width = '120px', targets = c(3)) ), - # columnDefs = list(list(width = '300px', targets = c(2)), - # list(width = '100px', targets = c(4,5)), - # list(width = '120px', targets = c(0)), - # list(width = '200px', targets = c(3)), - # list(width = '150px', targets = "_all")), - initComplete = JS( - "function(settings, json) {", - #"$('body').css({'font-family': 'Calibri'});", - "$(this.api().table().header()).css({'backgroundColor': '#3f546f'});", - "$(this.api().table().header()).css({'color': '#fff'});", - "}")) - ) + list(width = '120px', targets = c(3)) + ) + +ITCR_general <- setup_dt_datatable(modified_general, columnDefsListOfLists) ``` ```{r,echo=FALSE,message=FALSE, warning=FALSE} +#display the ITCR general table ITCR_general ``` diff --git a/omicsTable.Rmd b/omicsTable.Rmd index 5e29f48..6c487f8 100644 --- a/omicsTable.Rmd +++ b/omicsTable.Rmd @@ -8,18 +8,12 @@ output: html_document The following table contains a list of "omics" informatics platforms funded by ITCR grants. "Omics" platforms are those which work with genomic or proteomic data types, such as RNA-Seq data. These platforms allow access to interactively explore and analyze large-scale cancer data, as well as create and share reproducible workspaces and results. The goals of these platforms are to facilitate scientific collaboration and to better empower the research community for "omic" research. ```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} -## edit all the data files before loading them. Compiling this Rmd will generate modified data files. -knitr::knit_child("alldataFilesEditor.Rmd") -``` - -```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} -#Load DT, dplyr library(DT) -#library(dplyr) library(here) library(tidyverse) library(magrittr) -#library(RCurl) + +source("scripts/format-tables.R") ``` **Table keys:** @@ -28,130 +22,31 @@ library(magrittr) ```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} -# Load file for Imaging Table -generalData <- read_csv(file = here::here("data/ictr_table_omics.csv")) -generalData - -# Mutate the tibble to alter three of the columns -generalData %<>% - mutate(`Link (Hyperlinked Over Name)` = paste0(' ',' ', ''), - Documentation = paste0(' ',' ', ''), - Publications = paste0(' ',' ', '')) - -# Mutate generalData's Name to be bolded. -generalData %<>% - mutate(Name = paste0('', Name,'')) - -# Mutate the pricing column to have a link. -generalData %<>% - mutate(Price = paste0(' ', Price,'')) - -# Mutate the tibble to combine all three columns into a general "Platform" column. -## Awan Edit: Removed line-breaks between linked icons to save space. -generalData %<>% - mutate(Platform = paste0(Name, ":",'

', `Link (Hyperlinked Over Name)`, Documentation, Publications)) - -# Mutate Platform to contain an ITCR logo if the Platform is funded by ITCR. -## Awan Edit: Reduced ITCR Logo size. -for (row in 1:nrow(generalData)) { - status <- generalData[row, "Funding"] - target <- generalData[row, "Platform"] - - if(status == "Yes") { - target %<>% - mutate(Platform = paste0(Platform,'

',' ')) - - generalData[row,"Platform"] <- target - } -} +# Load file for omics Table and make any edits/additions in this block +omicsData <- read_csv(file = here::here("data/itcr_table_omics.csv")) -# Shift the location of the "Platform" column. -generalData %<>% - relocate(Platform, .after = `Link (Hyperlinked Over Name)`) - -# Load file for Resource Table -resource <- read_csv(file = here::here("data/ictr_table_resources_identifier.csv")) - -# Create the html version of links in resources -## AwanEdit: added a column "identifier" to the resource table to use it as a merge key variable with the Data provided column entries in other tables -resource <- resource %>% - mutate(Link = paste0(' ',identifier,'')) - -# # Create a function to merge resources and generalData (edit: This function seems redundant) -# resourceMerge <- function( generalData,row,col ) { -# generalData %>% -# filter(row_number() == row) %>% -# select(col) -# } - -# Alter the generalData df to see how it interacts with the resources tab. -# generalData %<>% -# mutate('Data Provided' = str_replace(string = pull(generalData,'Data Provided'), pattern = "TCGA", replacement = str_subset(string = pull(resource,Link), pattern = "tcga")[1])) - -# AwanEdit: Code for Linking Resource table to the other tables' Data Provided column -LinkUpdater <- bind_cols(Name = pull(generalData, Name), - read.table(text = as.character(generalData$`Data Provided`), sep = ",", as.is = TRUE, fill = TRUE, na.strings = "")) %>% - pivot_longer(cols = -Name, names_to = "vars", values_to = "vals") %>% - filter(!is.na(vals)) %>% - mutate(vals = str_trim(vals, side = "both")) %>% - select(-vars, identifier = vals) %>% - left_join(y = resource %>% select(identifier, Link), by = "identifier") %>% - mutate(Link = if_else(is.na(Link), identifier, Link)) %>% select(-identifier) %>% - group_by(Name) %>% mutate(var = paste0("var", 1:n() )) %>% ungroup() %>% relocate(var) %>% - pivot_wider(names_from = var, values_from = Link) %>% - unite(col = "Data Provided2", -Name, sep = ", ", na.rm = T, remove = T) - -generalData %<>% left_join(LinkUpdater, by = "Name") %>% - relocate(`Data Provided2`, .before = `Data Provided`) %>% - select(-`Data Provided`) %>% rename("Data Provided" = `Data Provided2`) +``` -# Create a trimmed version of the data by removing the non-consolidated columns. -trimmedData <- generalData[ -c(1,2,8,10,12,13) ] +```{r, echo=FALSE,results='hide',message=FALSE, warning=FALSE} -# Shift the location of the "Summary" column. -trimmedData %<>% - relocate(Summary, .after = Subcategories) +modified_omics <- formatTheTables(omicsData, "Omics", non_resource = TRUE) # save the trimmed version of the data file to call into allTables.Rmd -modified_omics <- trimmedData %>% - mutate(Category= "Omics") %>% relocate(Category, .after = Platform) -# save this data file to the data folder write_csv(modified_omics, file = "data/modified_omics.csv") ``` ```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} -# Create a Imaging Table -ITCR_omics <- trimmedData %>% - DT::datatable( - style = 'default', - width="100%", - colnames = c('Unique Factor' = 4, 'Types of Data' = 5, 'Summary' = 3), - rownames = FALSE, - escape = FALSE, - #caption = "some caption", - filter = "top", - #extensions = list("Scroller") - options = list(scrollX = TRUE, autoWidth = TRUE, pageLength = 10, - scrollCollapse = TRUE, fillContainer = TRUE, - order = (list(0, 'asc')), - columnDefs = list(list(className = 'dt-center', targets = "_all"), +# Create an omics Table + +columnDefsListOfLists <- list(list(className = 'dt-center', targets = "_all"), list(width = '280px', targets = c(2)) , - list(width = '130px', targets = c(3)) ), - # columnDefs = list(list(width = '300px', targets = c(2)), - # list(width = '100px', targets = c(4,5)), - # list(width = '120px', targets = c(0)), - # list(width = '200px', targets = c(3)), - # list(width = '150px', targets = "_all")), - initComplete = JS( - "function(settings, json) {", - #"$('body').css({'font-family': 'Calibri'});", - "$(this.api().table().header()).css({'backgroundColor': '#3f546f'});", - "$(this.api().table().header()).css({'color': '#fff'});", - "}")) - ) + list(width = '130px', targets = c(3)) ) + +ITCR_omics <- setup_dt_datatable(modified_omics, columnDefsListOfLists) ``` ```{r,echo=FALSE,message=FALSE, warning=FALSE} +# Display the omics table ITCR_omics ``` diff --git a/resourceTable.Rmd b/resourceTable.Rmd index 292334a..8a04ecf 100644 --- a/resourceTable.Rmd +++ b/resourceTable.Rmd @@ -7,19 +7,14 @@ output: html_document The following table contains a list of cancer data resources that are available to researchers. These resources include genomic, epigenomic, transcriptomic, proteomic, and cancer imaging data. -```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} -## edit all the data files before loading them. Compiling this Rmd will generate modified data files. -knitr::knit_child("alldataFilesEditor.Rmd") -``` ```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} -#Load DT, dplyr library(DT) -#library(dplyr) library(here) library(tidyverse) library(magrittr) -#library(RCurl) + +source("scripts/format-tables.R") ``` **Table keys:** @@ -28,74 +23,88 @@ library(magrittr) ```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} -# Load file for Resource Table -generalData <- read_csv(file = here::here("data/ictr_table_resources_identifier.csv")) - -# Mutate the tibble to alter three of the columns -generalData %<>% - mutate(Name = paste0(' ',Name,'')) - -#Mutate generalData's Name to be bolded. -generalData %<>% - mutate(Name = paste0('', Name,'')) - -# Mutate Platform to contain an ITCR logo if the Platform is funded by ITCR. -for (row in 1:nrow(generalData)) { - status <- generalData[row, "Funding"] - target <- generalData[row, "Name"] - - if(status == "Yes") { - target %<>% - mutate(Name = paste0(Name,'

',' ')) - - generalData[row,"Name"] <- target - } -} - -# Create a trimmed version of the data by removing the non-consolidated columns. -trimmedData <- generalData[ -c(1, 2, 4, 9) ] -## if data is loaded from original ictr_table_resources.csv, only remove columns 2 and 7 generalData[ -c(2, 7) ] -trimmedData - -# Shift the location of the "Summary" column. -trimmedData %<>% - relocate(Summary, .after = Subcategories) %>% relocate(`Unique Factors`, .after = Summary) +# Load file for Resource Table and make edits/additions +## If adding any resources/platforms/not a tool to the ITCR tables, this code block is where you'll want to do that +resource <- readr::read_csv(file = here::here("data/itcr_table_resources.csv")) + +tibbleTOPAS <- tibble( + Name = "TOPAS", + Price = ' Paid/Free' +) + +resource <- dplyr::rows_update(resource, tibbleTOPAS, by="Name") #this will update the existing TOPAS entry + +## Add ISIC Archive: Submitted 06/01/2023, 13:31 (vrotemberg@gmail.com) +new_ISIC <- tibble( + Name = "ISIC Archive", + Funding = "Yes", + Subcategories = "Cancer Imaging", + `Data Type` = "Clinical imaging", + `Unique Factors` = "The largest public archive of dermatology photographs. It has around 20 million individual image downloads per month and is widely used for education and AI research.", + Price = "Free", + Link = "https://www.isic-archive.com/", + `Summary` = "The ISIC Archive is an academic-industry collaboration that is devoted to improving dermatology artificial intelligence. It is the largest public archive of images of skin conditions, with special attention to skin cancer detection. We also host grand challenges (and live challenges) for AI models as well as conference workshops.") + +resource <- dplyr::rows_insert(resource, new_ISIC, conflict = "ignore") #include conflict = ignore argument because it won't re-add the resource the next time this code is run if the file is overwritten/resource is already included. + +## Goal: Create the html version of links in resources +## Edit 1: Add a column "identifier" to the resource table to use it as a merge key variable with the Data provided column entries in other tables +## Edit 2: Make sure add new identifiers for new resources in the resource data set. +resource %<>% + mutate(identifier = c("PDX", "HemOnc", "ngchm", "OncoMX", "MethCon5", "CIViC", "BioMuta", "TCIA", "SCGV", "ivyGlimpse", "TCPA", "dcmqi", "Region Templates", "Cistrome", "TOPAS", "TCGA", "1000 Genomes", "TARGET", "CCLE", "dbGAP", "CPTAC", "PheKB", "NSCLC Radiomics", "ICGC", "ISIC")) %>% relocate(identifier) + +## From this point forward, any additions to the resource table need to include an "identifier" in the tibble/row that will be added + +## Add The Cancer Epitope Database and Analysis Resource (CEDAR): Submitted 07/26/2023, 10:48 (nblazeska@lji.org) +new_CEDAR <- tibble( + Name = "Cancer Epitope Database and Analysis Resource (CEDAR)", + Funding = "Yes", + Subcategories = "Proteomics" , #this is my assumption based on the use of epitopes; it was not submitted in the form or explicitly said on the website + `Data Type` = "Curated literature data: experimentally-tested epitopes and their immunological, biological, and clinical contexts" , + `Unique Factors` = "It is a free resoure that provides the cancer community with a central repository of experimentally-tested cancer epitopes curated from peer-reviewed literature.", + Price = "Free", + Link = "https://cedar.iedb.org/", + Summary = "The Cancer Epitope Database and Analysis Resource (CEDAR) is a freely available resource funded by NCI. It catalogs experimental data on antibody and T cell epitopes studied in humans, non-human primates, and other animal species in the context of cancer disease. CEDAR also hosts tools to assist in the prediction and analysis of cancer epitopes." , + identifier = "CEDAR" +) + +## Add ARCHS4: Submitted 09/13/2023, 12:36 (avi.maayan@mssm.edu) +new_ARCHS4 <- tibble( + Name = "ARCHS4", + Funding = "Yes", + Subcategories = "Transcriptomics", + `Data Type` = "Transcriptomics, GEO", + `Unique Factors` = "This resource is updated frequently. It contains all GEO samples and includes metadata and data search.", + Price = "Free for academic institutions", + Link = "https://maayanlab.cloud/archs4/" , + Summary = "ARCHS4 provides gene and trasncript counts uniformly processed from all the human and mouse RNA-seq samples from GEO" , + identifier = "ARCHS4" +) + +resource <- dplyr::rows_insert(resource, dplyr::bind_rows(new_CEDAR, new_ARCHS4), conflict = "ignore") + +write.csv(resource, file="data/itcr_table_resources_identifier.csv") #because this file is used as a linker for other tables/in other files, writing it out. + +``` + +```{r, echo=FALSE, results='hide', message=FALSE, warning=FALSE} +modified_resource <- formatTheTables(resource, "NA") ``` ```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} -# Create a Imaging Table -ITCR_resource <- trimmedData %>% - DT::datatable( - style = 'default', - width="100%", - colnames = c('Unique Factor' = 4, 'Types of Data' = 5, 'Summary' = 3), - rownames = FALSE, - escape = FALSE, - #caption = "some caption", - filter = "top", - #extensions = list("Scroller") - options = list(scrollX = TRUE, autoWidth = TRUE, pageLength = 10, - scrollCollapse = TRUE, fillContainer = TRUE, - order = (list(0, 'asc')), - columnDefs = list(list(className = 'dt-center', targets = "_all"), +# Create a Resource Table + +columnDefsListOfLists <- list(list(className = 'dt-center', targets = "_all"), list(width = '120px', targets = c(0)) , list(width = '300px', targets = c(2)) , list(width = '140px', targets = c(3)) , - list(width = '100px', targets = c(4)) ), - # columnDefs = list(list(width = '300px', targets = c(2)), - # list(width = '100px', targets = c(4,5)), - # list(width = '120px', targets = c(0)), - # list(width = '200px', targets = c(3)), - # list(width = '150px', targets = "_all")), - initComplete = JS( - "function(settings, json) {", - #"$('body').css({'font-family': 'Calibri'});", - "$(this.api().table().header()).css({'backgroundColor': '#3f546f'});", - "$(this.api().table().header()).css({'color': '#fff'});", - "}")) - ) + list(width = '100px', targets = c(4)) + ) + +ITCR_resource <- setup_dt_datatable(modified_resource, columnDefsListOfLists) ``` ```{r,echo=FALSE,message=FALSE, warning=FALSE} +#Display the resource table ITCR_resource ``` diff --git a/scripts/format-tables.R b/scripts/format-tables.R new file mode 100644 index 0000000..1da8c7e --- /dev/null +++ b/scripts/format-tables.R @@ -0,0 +1,132 @@ +#!/usr/bin/env Rscript + +library(magrittr) +library(tidyverse) +library(DT) +library(here) + +formatTheTables <- function(tableOI, keywordOI, non_resource = FALSE){ + + #check that it's tibble, if not, make it a tibble + + #Mutate the tibble to alter three of the columns + if (non_resource) { + generalData <- tableOI %>% + mutate(`Link (Hyperlinked Over Name)` = paste0(' ',' ', ''), + Documentation = paste0(' ',' ', ''), + Publications = paste0(' ',' ', '')) + } else { + generalData <- tableOI %>% + mutate(Name = paste0(' ',Name,'')) + } + + #Mutate generalData's Name to be bolded. + generalData %<>% + mutate(Name = paste0('', Name, "")) + + #Mutate the pricing column to have a link & Mutate the tibble to combine all three columns into a general "Platform" column. + if (non_resource){ + generalData %<>% + mutate(Price = paste0(' ', Price,'')) %>% + mutate(Platform = paste0(Name, ":",'

', `Link (Hyperlinked Over Name)`, Documentation, Publications)) + } + + #Mutate Platform to contain an ITCR logo if the Platform is funded by ITCR. + #If non-resource table, also shift the location of the "Platform" column and create html version of links in resources + if (non_resource){ + for (row in 1:nrow(generalData)){ + status <- generalData[row, "Funding"] + target <- generalData[row, "Platform"] + + if(status == "Yes"){ + target %<>% + mutate(Platform = paste0(Platform,'

','')) + + generalData[row, "Platform"] <- target + } + } + + generalData %<>% + relocate(Platform, .after = `Link (Hyperlinked Over Name)`) + + resource <- read_csv(file = here::here("data/itcr_table_resources_identifier.csv")) + + resource %<>% + mutate(Link = paste0(' ',identifier,'')) + + LinkUpdater <- bind_cols(Name = pull(generalData, Name), + read.table(text = as.character(generalData$`Data Provided`), sep = ",", + as.is = TRUE, fill = TRUE, na.strings = "")) %>% + pivot_longer(cols = -Name, names_to = "vars", values_to = "vals") %>% + filter(!is.na(vals)) %>% + mutate(vals = str_trim(vals, side = "both")) %>% + select(-vars, identifier = vals) %>% + left_join(y = resource %>% select(identifier, Link), by = "identifier") %>% + mutate(Link = if_else(is.na(Link), identifier, Link)) %>% + select(-identifier) %>% + group_by(Name) %>% mutate(var = paste0("var", 1:n() )) %>% ungroup() %>% + relocate(var) %>% + pivot_wider(names_from = var, values_from = Link) %>% + unite(col = "Data Provided2", -Name, sep = ", ", na.rm = T, remove = T) + + generalData %<>% left_join(LinkUpdater, by = "Name") %>% + relocate(`Data Provided2`, .before = `Data Provided`) %>% + select(-`Data Provided`) %>% rename("Data Provided" = `Data Provided2`) + + } else { + for (row in 1:nrow(generalData)) { + status <- generalData[row, "Funding"] + target <- generalData[row, "Name"] + + if(status == "Yes") { + target %<>% + mutate(Name = paste0(Name, '

', '')) + + generalData[row, "Name"] <- target + } + } + } + + #Create a trimmed version of the data by removing the non-consolidated columns + ##For non-resource Table want to keep columns "Platform", "Subcategories", "Unique Factor", "Data Types (Clean)", "Price", "Data Provided", "Summary" + ##For Resource Table Want to keep columns "Name", "Subcategories", "Summary", "Unique Factors", "Data Type", and "Price" + if (non_resource){ + trimmedData <- generalData[ c("Platform", "Subcategories", "Unique Factor", "Data Types (Clean)", "Price", "Data Provided", "Summary")] %>% + relocate(Summary, .after = Subcategories) %>% + mutate(Category = keywordOI) %>% + relocate(Category, .after = Platform) + } else { + trimmedData <- generalData[ c("Name", "Subcategories", "Data Type", "Unique Factors", "Price", "Summary") ] %>% + relocate(Summary, .after = Subcategories) %>% + relocate(`Unique Factors`, .after = Summary) + } + + return(trimmedData) +} + +setup_dt_datatable <- function(modified_data, columnDefsListOfLists){ + ITCR_table <- modified_data %>% + select(-any_of("Category")) %>% + DT::datatable( + style = 'default', + width="100%", + colnames = c('Unique Factor' = 4, 'Types of Data' = 5, 'Summary' =3), + rownames = FALSE, + escape = FALSE, + filter = "top", + options = list(scrollX = TRUE, autoWidth = TRUE, pageLength = 10, + scrollCollapse = TRUE, fillContainer = TRUE, + order = (list(0, 'asc')), + columnDefs = columnDefsListOfLists, + initComplete = JS( + "function(settings, json) {", + #"$('body').css({'font-family': 'Calibri'});", + "$(this.api().table().header()).css({'backgroundColor': '#3f546f'});", + "$(this.api().table().header()).css({'color': '#fff'});", + "}") + ) + ) + return(ITCR_table) +} \ No newline at end of file From 82d3221e64b1080d33d1265e3aefe1fe14ce68f0 Mon Sep 17 00:00:00 2001 From: Kate Isaac <41767733+kweav@users.noreply.github.com> Date: Tue, 23 Jan 2024 19:05:00 -0500 Subject: [PATCH 2/8] unnecessary fix for bug that does not matter anymore --- alldataFilesEditor.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alldataFilesEditor.Rmd b/alldataFilesEditor.Rmd index da9fee8..42ad1bd 100644 --- a/alldataFilesEditor.Rmd +++ b/alldataFilesEditor.Rmd @@ -81,7 +81,7 @@ resource <- dplyr::rows_insert(resource, dplyr::bind_rows(new_CEDAR, new_ARCHS4) ## Save the edited data file -write.csv(resource_identifier, file = "data/itcr_table_resources_identifier.csv") #Do I want to just rewrite the original file? +#write.csv(resource, file = "data/itcr_table_resources_identifier.csv") #Do I want to just rewrite the original file? ``` ## Adding new platforms to the Imaging Table From 05a5805e9be4263610431cbf56266dfa8a9233fd Mon Sep 17 00:00:00 2001 From: Kate Isaac <41767733+kweav@users.noreply.github.com> Date: Thu, 25 Jan 2024 18:21:35 -0500 Subject: [PATCH 3/8] documentation changes --- README.md | 205 +++++++++++++++++++- allTables.Rmd | 11 +- alldataFilesEditor.Rmd | 115 ----------- contact.Rmd | 19 +- contributing.md | 15 +- dataFilesEditor.html | 409 --------------------------------------- generalTable.html | 419 ---------------------------------------- multiTable.Rmd | 4 +- multiTable.html | 79 ++++---- omicsTable.Rmd | 8 + otherTable.Rmd | 19 +- resourceTable.Rmd | 34 +++- scripts/format-tables.R | 19 ++ 13 files changed, 340 insertions(+), 1016 deletions(-) delete mode 100644 alldataFilesEditor.Rmd delete mode 100644 dataFilesEditor.html delete mode 100644 generalTable.html diff --git a/README.md b/README.md index 97c3d38..6a679ae 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,203 @@ -# OTTR Template for Websites +# ITCR_Tables -This is a template for creating websites from Rmd files hosted on GitHub with three helpful automations following a pull request to the repository: spelling check, broken link check, and website rendering. +## General description of repo -Websites will be checked for: +This repo uses the [OTTR template](https://github.com/jhudsl/OTTR_Template) to [build the ITCR tools/resources table website](https://jhudatascience.org/ITCR_Tables/index.html). There are 6 tables that are generated (resources, clinical tools, imaging tools, multi-data type tools, omics tools, and all tools) using 5 input files (resources, clinical, imaging, multi-data, and omics). The resources table needs to be generated first so that a file with identifier acronyms is written that can be used in building the rest of the tables. Within each Rmarkdown building the resource, clinical, imaging, multi-data, or omics tables, the input file is read-in and then the table is formatted to add hyperlinks, rearrange columns, etc. Rather than saving these modified tables (clinical, imaging, multi-data, and omics) as output files, `knitr::knit_child` is used to force rendering the clinical, imaging, multi-data, and omics Rmarkdowns within the `allTables.Rmd`. This then allows the `allTables.Rmd` to inherit the modified table variables. Since the resources table has to be generated first, `knitr::knit_child` is used with the `resourcesTable.Rmd` first. The rows of these tables are joined together to form the all tools table (resources are not included in this). Two tools that were listed twice (each were listed once as multi-data type and once as omics) in this combo table were de-duplicated. If you need to add or edit existing resources/tools, see the instructions below. Which file you edit, depends on the type of tool or resource that you are adding/editing. -- Check for spelling errors more intensively than RStudio and allow you to add words to the dictionary -- Check for broken links - you will be warned about broken links +## Adding to or editing the Resource Table -Website files will also be automatically rendered remotely. This will be triggered when a pull request is merged with a change to files that might influence the contents of your website. +The resource table has different information for each resource compared to the tools in the other tables. -To learn more about how this site is created see [here](https://bookdown.org/yihui/rmarkdown/rmarkdown-site.html) and [here](https://garrettgman.github.io/rmarkdown/rmarkdown_websites.html). +### Adding a new data resource to the tables + +When adding a Data Resources Platform to the resources table, you will edit the first code block (which reads in the original `.csv` file) in [`resourcesTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/resourceTable.Rmd). + + * First, create a tibble for the new resource, including the following information: + * "Name" + * "Funding" ("Yes" or "No" --> If "Yes", then the ITCR logo will be displayed with the name) + * "Subcategories" + * "Data Type" + * "Unique Factors" + * "Price" + * "Link" + * "Summary" + * "identifier" (an acronym) + * Second, use the `dplyr::rows_insert` function with the `conflict = ignore` argument to add the new resource to the table. If the resource is already there, the `conflict = ignore` argument ensures that the addition will be skipped rather than causing an error. + +
+ +Example: + +``` +new_PCDC <- tibble( + Name = "Pediatric Cancer Data Commons (PCDC)", + Funding = "Yes", + Subcategories = "Clinical", + `Data Type` = "ALL Data Commons, C3P, CHIC, FA Data Commons, Global REACH, HIBiSCus, INRG, INSPiRE, INSTRuCT, INTERACT, MaGIC, NOBLE, NODAL, Reproductive HOPE", + `Unique Factors` = "Uses consensus-based data dictionaries and maps all clinical data in the portal to standardized terms; provides a data portal and analysis tools to assess study feasibility" , + Price = "Free", + Link = "https://portal.pedscommons.org/login", + Summary = "The PCDC Data Portal offers a unified platform where researchers can use the cohort explorer and other analysis tools to explore available data and assess study feasibility; if a user wishes to perform research with data from the PCDC, the proposed project undergoes review and approval by the relevant disease consortium.", + identifier = "PCDC" +) + +resource <- dplyr::rows_insert(resource, new_PCDC, conflict="ignore") +``` +
+ +### Editing an existing data resource in the tables + +When editing an existing entry in the resources table, you will edit the first code block (which reads in the original `itcr_table_resources.csv` file) in [`resourcesTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/resourceTable.Rmd). + +* First, make a tibble with the name of the entry you want to edit as well as the column/info you want to edit. The column/info you want to edit should be one of the following columns: + * "Name" + * "Funding" + * "Subcategories" + * "Data Type" + * "Unique Factors" + * "Price" + * "Link" + * "Summary" +* Second, use the `dplyr::rows_update` function, with the `by="Name"` argument to update the resource, matching the update with the table entry by the matching name. If the name is wrong/needs updated, you'll have to update by some other unique information and specify it with the `by` argument. +* Note, that if it's a resource that was listed in `itcr_table_resources.csv`, its `identifier` acronym is listed/added in the `mutate` function within the first code block that loads the `.csv` file. Therefore, if you need to edit an identifier, either edit the identifier there in the mutate statement, or later with a `rows_update` function. + +
+ +Example + +``` +tibbleTOPAS <- tibble( + Name = "TOPAS", + Price = ' Paid/Free' +) + +resource <- dplyr::rows_update(resource, tibbleTOPAS, by="Name") #this will update the existing TOPAS entry +``` +
+ +## Adding to or editing the Clinical, Imaging, Multi-data type, and Omics Tables + +Changes made to each of these tables will automatically propagate to the full table. + +All of these tables need the same info for each tool: +* "Name" +* "Link (Hyperlinked Over Name)" (this link will be hyperlinked over the name in the displayed table) +* "Subcategories" +* "Unique Factor" (what makes it unique) +* "Data Types (Clean)" +* "Price" (Free, paid, etc?) +* "Documentation" (NA, or Documentation link for the tool) +* "Data Provided" ("No Data Provided" or acronyms comma separated, or something like "Curated Data Sources" --> if they're comma separated acronyms, they'll be linked in the formatted/displayed table using information from the resource table and the matching acronym) +* "Publications" (NA, or links to publications or blogs) +* "Summary" +* "Funding" ("Yes" or "No" --> If "Yes", then the ITCR logo will be displayed with the name) +* "PLink" (this link will be hyperlinked over the price information) + + +### Clinical table edits, specifically + +When editing an existing entry in or adding a new tool to the clinical table, you will edit the first code block (which reads in the original `itcr_table_clinical.csv` file) in [`clinicalTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/clinicalTable.Rmd). + +### Imaging table edits, specifically + +When editing an existing entry in or adding a new tool to the imaging table, you will edit the first code block (which reads in the original `itcr_table_imaging.csv` file) in [`imagingTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/imagingTable.Rmd). + +### Multi-data type table edits, specifically + +When editing an existing entry in or adding a new tool to the Multi-data type table, you will edit the first code block (which reads in the original `itcr_table_general.csv` file) in [`omicsTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/multiTable.Rmd). You'll want to make any additions or edits after the `rename` function (that syncs the tool column names). + +### Omics table edits, specifically + +When editing an existing entry in or adding a new tool to the omics table, you will edit the first code block (which reads in the original `itcr_table_omics.csv` file) in [`omicsTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/omicsTable.Rmd). + +### Adding a new tool to the tables + +* First, create a tibble for the new tool, including the following information (see above for explanations of these tool columns): + * "Name" + * "Link (Hyperlinked Over Name)" + * "Subcategories" + * "Unique Factor" + * "Data Types (Clean)" + * "Price" + * "Documentation" + * "Data Provided" + * "Publications" + * "Summary" + * "Funding" + * "PLink" +* Second, use the `dplyr::rows_insert` function with the `conflict = ignore` argument to add the new tool to the table. If the tool is already there, the `conflict = ignore` argument ensures that the addition will be skipped rather than causing an error. + +
+Example + +``` +new_imaging_CaPTk <- tibble( + Name = "The Cancer Imaging Phenomics Toolkit (CaPTk)", + `Link (Hyperlinked Over Name)` = "https://www.med.upenn.edu/cbica/captk/", + Subcategories = "Radiomics", + `Unique Factor` = "CaPTk is a stand-alone software client that allows for free image analysis through the Image Processing Portal (IPP) that offers compute power through CaPTk's supporting high performance computing cluster.", + `Data Types (Clean)` = "Radiographic Imaging", + Price = "Free", + Documentation = "https://cbica.github.io/CaPTk/", + `Data Provided` = "Sample Data available within CaPTk", + Publications = "https://doi.org/10.1117/1.jmi.5.1.011018", + `Summary` = "CaPTk is a software platform for analysis of radiographic cancer images, currently focusing on brain, breast, and lung cancer that integrates advanced, validated tools performing various aspects of medical image analysis, that have been developed in the context of active clinical research studies and collaborations toward addressing real clinical needs. CaPTk aims to facilitate the swift translation of advanced computational algorithms into routine clinical quantification, analysis, decision making, and reporting workflow.", + Funding = "Yes", + PLink = "https://github.com/CBICA/CaPTk/#downloads") + +## Add new rows to the existing dataset +imaging <- dplyr::rows_insert(imaging, new_imaging_CaPTk, conflict = "ignore") +``` + +
+ +### Editing an existing tool in the tables + +* First, make a tibble with the name of the entry you want to edit as well as the column(s)/info you want to edit. Make sure to use the correct column name. Possibilities include: + * "Name" + * "Link (Hyperlinked Over Name)" + * "Subcategories" + * "Unique Factor" + * "Data Types (Clean)" + * "Price" + * "Documentation" + * "Data Provided" + * "Publications" + * "Summary" + * "Funding" + * "PLink" +* Second, use the `dplyr::rows_update` function, with the `by="Name"` argument to update the resource, matching the update with the table entry by the matching name. If the name is wrong/needs updated, you'll have to update by some other unique information and specify it with the `by` argument. + +
+Example + +``` +tibbleCGC <- tibble( + Name = "Cancer Genome Collaboratory", + `Data Provided` = "ICGC, PCAWG, DCC" +) + +generalData <- dplyr::rows_update(generalData, tibbleCGC, by = "Name") +``` + +
+ +## Important files in the repo +### Rendered files + +* [`resourcesTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/resourceTable.Rmd) -- renders the ["Data Resources" page](https://jhudatascience.org/ITCR_Tables/allTables.html) +* [`clinicalTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/clinicalTable.Rmd) -- renders the ["Computing Resources --> Clinical Platforms" page](https://jhudatascience.org/ITCR_Tables/clinicalTable.html) +* [`imagingTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/imagingTable.Rmd) -- renders the ["Computing Resources --> Imaging Platforms" page](https://jhudatascience.org/ITCR_Tables/imagingTable.html) +* [`multiTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/multiTable.Rmd) -- renders the ["Computing Resources --> Multi-data type Platforms" page](https://jhudatascience.org/ITCR_Tables/multiTable.html) +* [`omicsTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/omicsTable.Rmd) -- renders the ["Computing Resources --> Omics Platforms" page](https://jhudatascience.org/ITCR_Tables/omicsTable.html) +* [`allTables.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/allTables.Rmd) -- renders the ["Computing Resources --> All platforms" page](https://jhudatascience.org/ITCR_Tables/allTables.html) +* [`contact.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/contact.Rmd) -- renders the ["Contact" page](https://jhudatascience.org/ITCR_Tables/contact.html) +* [`feedback.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/feedback.Rmd) -- renders the ["Feedback Form" page](https://jhudatascience.org/ITCR_Tables/feedback.html) +* [`index.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/index.Rmd) -- renders the [home page](https://jhudatascience.org/ITCR_Tables/index.html) +* [`platformsOverview.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/platformsOverview.Rmd) -- renders the ["Computing Resources --> Platforms overview" page](https://jhudatascience.org/ITCR_Tables/platformsOverview.html) + +### Other files, not rendered + +* [`scripts/format-tables.R`](https://github.com/jhudsl/ITCR_Tables/blob/main/format-tables.R) -- functions that can be used to format the tables for the various `Table.Rmd` files. This script is sourced within the Rmarkdown files after loading libraries so the functions are available. +* [`contributing.md`](https://github.com/jhudsl/ITCR_Tables/blob/main/contributing.md) -- contributing guidelines (e.g., opening an issue or pull request) +* [`_site.yml`](https://github.com/jhudsl/ITCR_Tables/blob/main/_site.yml) -- which files are rendered and how the site is structured diff --git a/allTables.Rmd b/allTables.Rmd index e52958c..17c81cd 100644 --- a/allTables.Rmd +++ b/allTables.Rmd @@ -36,8 +36,15 @@ knitr::knit_child("imagingTable.Rmd") #inherit modified_imaging knitr::knit_child("omicsTable.Rmd") #inherit modified_omics knitr::knit_child("clinicalTable.Rmd") #inherit modified_clinical -fulltab <- bind_rows(modified_general, modified_imaging, modified_omics, modified_clinical) -names(fulltab) +fulltab <- bind_rows(modified_general, modified_imaging, modified_omics, modified_clinical) %>% + unite("PlatformCategory", c("Platform", "Category"), sep=";", remove=FALSE) + +duplicatesToRemove <- tibble( + PlatformCategory = c("Cancer Genomics Cloud:

;General", "Cancer Genome Collaboratory:

;General")) + +fulltab <- rows_delete(fulltab, duplicatesToRemove, by="PlatformCategory") %>% + select(-c(PlatformCategory)) + ``` ```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} diff --git a/alldataFilesEditor.Rmd b/alldataFilesEditor.Rmd deleted file mode 100644 index 42ad1bd..0000000 --- a/alldataFilesEditor.Rmd +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: "**Data Files Editor**" -output: html_document ---- - -### **Overview** - -This file is used to make edits to the data files. - -```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} -#Load DT, dplyr -library(DT) -#library(dplyr) -library(here) -library(tidyverse) -library(magrittr) -#library(RCurl) -``` - -## Resource table editor -```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} -# Load file for Resource Table -resource <- readr::read_csv(file = here::here("data/itcr_table_resources.csv")) - -tibbleTOPAS <- tibble( - Name = "TOPAS", - Price = ' Paid/Free' -) - -resource <- dplyr::rows_update(resource, tibbleTOPAS, by="Name") #this will update the existing TOPAS entry - -## Add ISIC Archive: Submitted 06/01/2023, 13:31 (vrotemberg@gmail.com) -new_ISIC <- tibble( - Name = "ISIC Archive", - Funding = "Yes", - Subcategories = "Cancer Imaging", - `Data Type` = "Clinical imaging", - `Unique Factors` = "The largest public archive of dermatology photographs. It has around 20 million individual image downloads per month and is widely used for education and AI research.", - Price = "Free", - Link = "https://www.isic-archive.com/", - `Summary` = "The ISIC Archive is an academic-industry collaboration that is devoted to improving dermatology artificial intelligence. It is the largest public archive of images of skin conditions, with special attention to skin cancer detection. We also host grand challenges (and live challenges) for AI models as well as conference workshops.") - -resource <- dplyr::rows_insert(resource, new_ISIC, conflict = "ignore") #include conflict = ignore argument because it won't re-add the resource the next time this code is run. - -## Goal: Create the html version of links in resources -## Edit 1: Add a column "identifier" to the resource table to use it as a merge key variable with the Data provided column entries in other tables -## Edit 2: Make sure add new identifiers for new resources in the resource data set. -resource <- resource %>% - mutate(identifier = c("PDX", "HemOnc", "ngchm", "OncoMX", "MethCon5", "CIViC", "BioMuta", "TCIA", "SCGV", "ivyGlimpse", "TCPA", "dcmqi", "Region Templates", "Cistrome", "TOPAS", "TCGA", "1000 Genomes", "TARGET", "CCLE", "dbGAP", "CPTAC", "PheKB", "NSCLC Radiomics", "ICGC", "ISIC")) %>% relocate(identifier) - -## From this point forward, any additions to the resource table need to include an "identifier" in the tibble/row that will be added - -## Add The Cancer Epitope Database and Analysis Resource (CEDAR): Submitted 07/26/2023, 10:48 (nblazeska@lji.org) -new_CEDAR <- tibble( - Name = "Cancer Epitope Database and Analysis Resource (CEDAR)", - Funding = "Yes", #Not certain about this - Subcategories = "Proteomics" , #this is my assumption based on the use of epitopes; it was not submitted in the form or explicitly said on the website - `Data Type` = "Curated literature data: experimentally-tested epitopes and their immunological, biological, and clinical contexts" , - `Unique Factors` = "It is a free resoure that provides the cancer community with a central repository of experimentally-tested cancer epitopes curated from peer-reviewed literature.", - Price = "Free", - Link = "https://cedar.iedb.org/", - Summary = "The Cancer Epitope Database and Analysis Resource (CEDAR) is a freely available resource funded by NCI. It catalogs experimental data on antibody and T cell epitopes studied in humans, non-human primates, and other animal species in the context of cancer disease. CEDAR also hosts tools to assist in the prediction and analysis of cancer epitopes." , - identifier = "CEDAR" -) - -## Add ARCHS4: Submitted 09/13/2023, 12:36 (avi.maayan@mssm.edu) -new_ARCHS4 <- tibble( - Name = "ARCHS4", - Funding = "Yes", #Fairly certain about this - Subcategories = "Transcriptomics", - `Data Type` = "Transcriptomics, GEO", - `Unique Factors` = "This resource is updated frequently. It contains all GEO samples and includes metadata and data search.", - Price = "Free for academic institutions", - Link = "https://maayanlab.cloud/archs4/" , - Summary = "ARCHS4 provides gene and trasncript counts uniformly processed from all the human and mouse RNA-seq samples from GEO" , - identifier = "ARCHS4" -) - - -resource <- dplyr::rows_insert(resource, dplyr::bind_rows(new_CEDAR, new_ARCHS4), conflict = "ignore") - - -## Save the edited data file -#write.csv(resource, file = "data/itcr_table_resources_identifier.csv") #Do I want to just rewrite the original file? -``` - -## Adding new platforms to the Imaging Table - -```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} -imaging <- read_csv(file = here::here("data/ictr_table_imaging.csv")) -# nameOfCols <- imaging %>% colnames() - -## CaPTk: Submitted 06/01/2023, 11:12 (sbakas@upenn.edu) -new_imaging_CaPTk <- tibble( - Name = "The Cancer Imaging Phenomics Toolkit (CaPTk)", - `Link (Hyperlinked Over Name)` = "https://www.med.upenn.edu/cbica/captk/", - Subcategories = "Radiomics", - `Unique Factor` = "CaPTk is a stand-alone software client that allows for free image analysis through the Image Processing Portal (IPP) that offers compute power through CaPTk's supporting high performance computing cluster.", - `Data Types (Clean)` = "Radiographic Imaging", - Price = "Free", - Documentation = "https://cbica.github.io/CaPTk/", - `Data Provided` = "Sample Data available within CaPTk", - Publications = "https://doi.org/10.1117/1.jmi.5.1.011018", - `Summary` = "CaPTk is a software platform for analysis of radiographic cancer images, currently focusing on brain, breast, and lung cancer that integrates advanced, validated tools performing various aspects of medical image analysis, that have been developed in the context of active clinical research studies and collaborations toward addressing real clinical needs. CaPTk aims to facilitate the swift translation of advanced computational algorithms into routine clinical quantification, analysis, decision making, and reporting workflow.", - Funding = "Yes", - PLink = "https://github.com/CBICA/CaPTk/#downloads") - -## Add new rows to the existing dataset -new_imaging <- dplyr::rows_insert(imaging, new_imaging_CaPTk, conflict = "ignore") - -## Create new data file -write.csv(new_imaging, file = "data/ictr_table_imaging_new.csv", row.names = FALSE) #Do I want to just rewrite the original file? -``` - - diff --git a/contact.Rmd b/contact.Rmd index bf04231..071f948 100644 --- a/contact.Rmd +++ b/contact.Rmd @@ -16,15 +16,24 @@ output: ```{r, fig.align='center', fig.alt="Banner", out.width="1540px", echo = FALSE} knitr::include_graphics("resources/images/bannerITCR.png") ``` -
+
### *Get in touch* Hey there! -The platforms and resources on the website are primarily made from ITCR Training Network (ITN) resources and are linked to the [ITCR table](https://itcr.cancer.gov/informatics-tools) hosted on the ITCR website. +The platforms and resources on the website are primarily made from ITCR Training Network (ITN) resources and are linked to the [ITCR table](https://itcr.cancer.gov/informatics-tools) hosted on the ITCR website. + +We would love to hear from you! If you have any feedback, suggestions or questions please contact us at [itcrtrainingnetwork@gmail.com](itcrtrainingnetwork@gmail.com). + +### *Contributing Guide* + +The code that renders this website is open source and [available on GitHub](https://github.com/jhudsl/ITCR_Tables). If you'd like to contribute by opening an issue or a pull request, visit the [`ITCR_Tables` repo](https://github.com/jhudsl/ITCR_Tables). If you would like to submit a tool or resource for inclusion, please [fill out this feedback form](https://jhudatascience.org/ITCR_Tables/feedback.html). + +#### Notes about Pull Requests + +There are GitHub actions that will take a few seconds to start tests for broken URLs and spelling/code styling. If there are spelling "errors" that are intentional, please modify the `dictionary.txt` file in the `resources` directory. -We would love to hear from you! If you have any feedback, suggestions or questions please contact: +#### Assigning reviewers -* **Carrie Wright** (cwright2@fredhutch.org) *[for ITCR stuff]* -* **Awan Afiaz** (aafiaz@uw.edu) *[for technical blurbs]* +If you open an issue or pull request, please assign Kate Isaac (`@kweav`) or Carrie Wright (`@carriewright11`) to review them. diff --git a/contributing.md b/contributing.md index b2a9f62..e0fd284 100644 --- a/contributing.md +++ b/contributing.md @@ -1,10 +1,11 @@ -## File name structure +## Contributing Guide -1. filename.csv = The original data files that we had initially. -2. filename_new.csv = the new entries/modifications added to the original files. Such changes were performed in the `alldataFilesEditor.Rmd`. (Overwriting the original file did not work since it kept adding the same row with new tool information every time it compiled the Rmd file.) -3. modifiled_filename.csv = the data files after preparing them for website view (keeping certain columns, removing others, hyperlinked, etc.). These were compiled in each of the different table's Rmd files and then we used the modified files (with all the editing) in the "All platforms" page. This allowed us to avoid copy pasting the same wrangling codes again in the "allTables.Rmd". +The code that renders this website is open source and [available on GitHub](https://github.com/jhudsl/ITCR_Tables). If you'd like to contribute by opening an issue or a pull request, visit the [`ITCR_Tables` repo](https://github.com/jhudsl/ITCR_Tables). If you would like to submit a tool or resource for inclusion, please [fill out this feedback form](https://jhudatascience.org/ITCR_Tables/feedback.html). -The workflow is basically this: -1. We add new/modify new/old entries in each datasets in the `alldataFilesEditor.Rmd` (filename.csv > filename_new.csv) -2. We wrangle each dataset and generate the modified datasets suitable for using with `DT::dataTable()` (filename_new.csv > modified_filename.csv). +### Notes about Pull Requests +There are GitHub actions that will take a few seconds to start tests for broken URLs and spelling/code styling. If there are spelling "errors" that are intentional, please modify the `dictionary.txt` file in the `resources` directory. + +### Assigning reviewers + +If you open an issue or pull request, please assign Kate Isaac (`@kweav`) or Carrie Wright (`@carriewright11`) to review them. diff --git a/dataFilesEditor.html b/dataFilesEditor.html deleted file mode 100644 index e464a43..0000000 --- a/dataFilesEditor.html +++ /dev/null @@ -1,409 +0,0 @@ - - - - - - - - - - - - - -Data Files Editor - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
-

Overview

-

This file is used to make edits to the data files.

-
-
-

Resource table editor

-
## 
-## ── Column specification ────────────────────────────────────────────────────────
-## cols(
-##   Name = col_character(),
-##   Funding = col_character(),
-##   Subcategories = col_character(),
-##   `Data Type` = col_character(),
-##   `Unique Factors` = col_character(),
-##   Price = col_character(),
-##   Link = col_character(),
-##   Summary = col_character()
-## )
-
- - - - -
- - - - - - - - - - - - - - - diff --git a/generalTable.html b/generalTable.html deleted file mode 100644 index cc19a25..0000000 --- a/generalTable.html +++ /dev/null @@ -1,419 +0,0 @@ - - - - - - - - - - - - - -General Informatics Table - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - -
-

Overview

-

The following table contains a list of general informatics and biomedical platforms that can help researchers work with publicly available data and or their own data. General platforms are those which work with a wide variety of data types, from imaging data to “omics” data, and provide computing resource support across different areas of bioinformatics research.

-Table keys: -
-

= Main Link, = Documentation, = Publications,   = ITCR Funded

-
-
## Warning: Missing column names filled in: 'X1' [1]
-
- -
- - - - -
- - - - - - - - - - - - - - - diff --git a/multiTable.Rmd b/multiTable.Rmd index 2b9088f..3698c89 100644 --- a/multiTable.Rmd +++ b/multiTable.Rmd @@ -31,7 +31,8 @@ source("scripts/format-tables.R") ```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} # Load file for General Table and make additions/edits here in this block -generalData <- read_csv(file = here::here("data/itcr_table_general.csv")) +generalData <- read_csv(file = here::here("data/itcr_table_general.csv")) %>% + rename("Unique Factor" = "Unique Factor (free trial, extra guidance, privacy protection, development, unique dataset?)") #While reworking the code, saw that ICGC and PCAWG were not separated by a comma and therefore ICGC wasn't linked tibbleCGC <- tibble( @@ -44,7 +45,6 @@ generalData <- dplyr::rows_update(generalData, tibbleCGC, by = "Name") ``` ```{r,echo=FALSE,results='hide',message=FALSE, warning=FALSE} -generalData %<>% rename("Unique Factor" = "Unique Factor (free trial, extra guidance, privacy protection, development, unique dataset?)") modified_general <- formatTheTables(generalData, "General", non_resource = TRUE) # save the trimmed version of the data file to call into allTables.Rmd write_csv(modified_general, file = "data/modified_general.csv") diff --git a/multiTable.html b/multiTable.html index 50bd647..0a04bc7 100644 --- a/multiTable.html +++ b/multiTable.html @@ -13,8 +13,8 @@ Multi-data type Platforms - - + + @@ -32,20 +32,20 @@ - + - - - - + + + + - - - - + + + + @@ -76,6 +76,7 @@ + @@ -101,6 +102,9 @@ summary { display: list-item; } +details > summary > p:only-child { + display: inline; +} pre code { padding: 0; } @@ -157,11 +161,15 @@ href = "index.html"; var menuAnchor = $('a[href="' + href + '"]'); - // mark it active - menuAnchor.tab('show'); - - // if it's got a parent navbar menu mark it active as well - menuAnchor.closest('li.dropdown').addClass('active'); + // mark the anchor link active (and if it's in a dropdown, also mark that active) + var dropdown = menuAnchor.closest('li.dropdown'); + if (window.bootstrap) { // Bootstrap 4+ + menuAnchor.addClass('active'); + dropdown.find('> .dropdown-toggle').addClass('active'); + } else { // Bootstrap 3 + menuAnchor.parent().addClass('active'); + dropdown.addClass('active'); + } // Navbar adjustments var navHeight = $(".navbar").first().height() + 15; @@ -190,8 +198,8 @@ border-radius: 4px; } -.tabset-dropdown > .nav-tabs > li.active:before { - content: ""; +.tabset-dropdown > .nav-tabs > li.active:before, .tabset-dropdown > .nav-tabs.nav-tabs-open:before { + content: "\e259"; font-family: 'Glyphicons Halflings'; display: inline-block; padding: 10px; @@ -199,16 +207,9 @@ } .tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before { - content: ""; - border: none; -} - -.tabset-dropdown > .nav-tabs.nav-tabs-open:before { - content: ""; + content: "\e258"; font-family: 'Glyphicons Halflings'; - display: inline-block; - padding: 10px; - border-right: 1px solid #ddd; + border: none; } .tabset-dropdown > .nav-tabs > li.active { @@ -252,7 +253,7 @@ ',''), - `Documentation Link` = paste0(' ', ''), - Publications = paste0(' ', '')) - -# Mutate the tibble to combine all three columns into a general "Platform" column. -generalData %<>% - mutate(Platform = paste0(Name, ":",'

', `Link (Hyperlinked Over Name)`,'

', `Documentation Link`,'

', Publications)) - -# Shift the location of the "Platform" column. -generalData %<>% - relocate(Platform, .after = `Link (Hyperlinked Over Name)`) - -# Create a trimmed version of the data by removing the non-consolidated columns. -trimmedData <- generalData[ -c(1,2,8,10) ] -trimmedData -``` - - -```{r,echo=FALSE,results='hide',message=FALSE} -# Create a Imaging Table -ICTR_omics <- trimmedData %>% - DT::datatable( - style = 'default', - width="100%", - colnames = c('Unique Factor' = 2, 'Types of Data' = 3, - 'Summary' = 7), - rownames = FALSE, - caption = 'Each resource will have up to three links that navigate towards their main site, their documentation, and a list of their publications.', - escape = FALSE, - filter = "top", - #escape = FALSE, - extensions = list("Scroller"), - options = list(autoWidth = TRUE, pageLength = 10, scrollY = TRUE, - scrollX = TRUE, scrollCollapse = TRUE, fillContainer = TRUE, - order = (list(0, 'asc')), - columnDefs = list(list(width = '600px', targets = c(6)), - list(width = '100px', targets = c(0,4)), - list(width = '400px', targets = c(2)), - list(width = '200px', targets = "_all")), - initComplete = JS( - "function(settings, json) {", - "$('body').css({'font-family': 'Calibri'});", - "$(this.api().table().header()).css({'backgroundColor': '#3f546f'});", - "$(this.api().table().header()).css({'color': '#fff'});", - "}")) - ) -``` - -```{r,echo=FALSE} -ICTR_omics -``` diff --git a/otherTable.Rmd b/otherTable.Rmd deleted file mode 100644 index 30d99fa..0000000 --- a/otherTable.Rmd +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: "**Non-Specified Informatics Table**" -output: html_document ---- - -### **About** - -This website contains a list of non-specified informatics tools funded by ITCR grants. - -```{r,echo=FALSE,results='hide',message=FALSE} -library(DT) -library(dplyr) -library(here) -library(tidyverse) -library(magrittr) -``` - -```{r,echo=FALSE,results='hide',message=FALSE} -# Load file for Other Table and make any additions/edits within this block -generalData <- read_csv(file = here::here("data/itcr_table_other.csv")) - - -``` - - -```{r, echo=FALSE, results='hide',message=FALSE} -# Mutate the tibble to alter three of the columns -generalData %<>% - mutate(`Link (Hyperlinked Over Name)` = paste0(' ',''), - `Documentation Link` = paste0(' ', ''), - Publications = paste0(' ', '')) - -# Mutate the tibble to combine all three columns into a general "Platform" column. -generalData %<>% - mutate(Platform = paste0(Name, ":",'

', `Link (Hyperlinked Over Name)`,'

', `Documentation Link`,'

', Publications)) - -# Shift the location of the "Platform" column. -generalData %<>% - relocate(Platform, .after = `Link (Hyperlinked Over Name)`) - -# Create a trimmed version of the data by removing the non-consolidated columns. -trimmedData <- generalData[ -c(1,2,8,10) ] -trimmedData -``` - - -```{r,echo=FALSE,results='hide',message=FALSE} -# Create the other Table -ITCR_other <- trimmedData %>% - DT::datatable( - style = 'default', - width="100%", - colnames = c('Unique Factor' = 2, 'Types of Data' = 3, - 'Summary' = 7), - rownames = FALSE, - caption = 'Each resource will have up to three links that navigate towards their main site, their documentation, and a list of their publications.', - escape = FALSE, - filter = "top", - #escape = FALSE, - extensions = list("Scroller"), - options = list(autoWidth = TRUE, pageLength = 10, scrollY = TRUE, - scrollX = TRUE, scrollCollapse = TRUE, fillContainer = TRUE, - order = (list(0, 'asc')), - columnDefs = list(list(width = '600px', targets = c(6)), - list(width = '100px', targets = c(0,4)), - list(width = '400px', targets = c(2)), - list(width = '200px', targets = "_all")), - initComplete = JS( - "function(settings, json) {", - "$('body').css({'font-family': 'Calibri'});", - "$(this.api().table().header()).css({'backgroundColor': '#3f546f'});", - "$(this.api().table().header()).css({'color': '#fff'});", - "}")) - ) -``` - -```{r,echo=FALSE} -#Display the other table -ITCR_other -``` From 9127e0a9e7a3b4493b72ab148905863ddc897c02 Mon Sep 17 00:00:00 2001 From: Kate Isaac <41767733+kweav@users.noreply.github.com> Date: Wed, 7 Feb 2024 22:07:46 -0500 Subject: [PATCH 5/8] Update README.md Co-authored-by: Carrie Wright <23014755+carriewright11@users.noreply.github.com> --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a679ae..cf5cca9 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,23 @@ ## General description of repo -This repo uses the [OTTR template](https://github.com/jhudsl/OTTR_Template) to [build the ITCR tools/resources table website](https://jhudatascience.org/ITCR_Tables/index.html). There are 6 tables that are generated (resources, clinical tools, imaging tools, multi-data type tools, omics tools, and all tools) using 5 input files (resources, clinical, imaging, multi-data, and omics). The resources table needs to be generated first so that a file with identifier acronyms is written that can be used in building the rest of the tables. Within each Rmarkdown building the resource, clinical, imaging, multi-data, or omics tables, the input file is read-in and then the table is formatted to add hyperlinks, rearrange columns, etc. Rather than saving these modified tables (clinical, imaging, multi-data, and omics) as output files, `knitr::knit_child` is used to force rendering the clinical, imaging, multi-data, and omics Rmarkdowns within the `allTables.Rmd`. This then allows the `allTables.Rmd` to inherit the modified table variables. Since the resources table has to be generated first, `knitr::knit_child` is used with the `resourcesTable.Rmd` first. The rows of these tables are joined together to form the all tools table (resources are not included in this). Two tools that were listed twice (each were listed once as multi-data type and once as omics) in this combo table were de-duplicated. If you need to add or edit existing resources/tools, see the instructions below. Which file you edit, depends on the type of tool or resource that you are adding/editing. +# Overview + +This repo uses the [OTTR template](https://github.com/jhudsl/OTTR_Template) to [build the ITCR tools/resources table website](https://jhudatascience.org/ITCR_Tables/index.html). + +There are 6 tables that are generated: + +- data resources +- clinical tools +- imaging tools +- multi-data type tools +- omics tools +- and all tools + +These are generated using 5 input files (data resources, clinical, imaging, multi-data, and omics). The data resources table needs to be generated first so that a file with identifier acronyms is written that can be used in building the rest of the tables. Within each R Markdown file building the tables, the input file is read-in and then the table is formatted to add hyperlinks, rearrange columns, etc. + +Rather than saving these modified tables (clinical, imaging, multi-data, and omics) as output files, `knitr::knit_child` is used to force rendering the clinical, imaging, multi-data, and omics R Markdowns within the `allTables.Rmd`. This then allows the `allTables.Rmd` to inherit the modified table variables. Since the resources table has to be generated first, `knitr::knit_child` is used with the `resourcesTable.Rmd` first. The rows of these tables are joined together to form the all tools table (data resources are not included in this). + ## Adding to or editing the Resource Table From 39ef669754ce667a4abc17f5de8a42b84ef709d6 Mon Sep 17 00:00:00 2001 From: Kate Isaac <41767733+kweav@users.noreply.github.com> Date: Wed, 7 Feb 2024 22:08:18 -0500 Subject: [PATCH 6/8] Update README.md Co-authored-by: Carrie Wright <23014755+carriewright11@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cf5cca9..4c85d88 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Rather than saving these modified tables (clinical, imaging, multi-data, and omi ## Adding to or editing the Resource Table -The resource table has different information for each resource compared to the tools in the other tables. +The data resource table has additional information about data that can be accessed by the various computing platform tools in the other tables. ### Adding a new data resource to the tables From 47b8eba4286cd0292517667e428d3b20fa60bfdd Mon Sep 17 00:00:00 2001 From: Kate Isaac <41767733+kweav@users.noreply.github.com> Date: Wed, 7 Feb 2024 22:08:29 -0500 Subject: [PATCH 7/8] Update README.md Co-authored-by: Carrie Wright <23014755+carriewright11@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4c85d88..88a5df8 100644 --- a/README.md +++ b/README.md @@ -214,6 +214,6 @@ generalData <- dplyr::rows_update(generalData, tibbleCGC, by = "Name") ### Other files, not rendered -* [`scripts/format-tables.R`](https://github.com/jhudsl/ITCR_Tables/blob/main/format-tables.R) -- functions that can be used to format the tables for the various `Table.Rmd` files. This script is sourced within the Rmarkdown files after loading libraries so the functions are available. +* [`scripts/format-tables.R`](https://github.com/jhudsl/ITCR_Tables/blob/main/format-tables.R) -- functions that can be used to format the tables for the various `Table.Rmd` files. This script is sourced within the R Markdown files after loading libraries so the functions are available. * [`contributing.md`](https://github.com/jhudsl/ITCR_Tables/blob/main/contributing.md) -- contributing guidelines (e.g., opening an issue or pull request) * [`_site.yml`](https://github.com/jhudsl/ITCR_Tables/blob/main/_site.yml) -- which files are rendered and how the site is structured From e02a6d57fd944681b4b0596e278e469be91d9030 Mon Sep 17 00:00:00 2001 From: Kate Isaac <41767733+kweav@users.noreply.github.com> Date: Thu, 8 Feb 2024 11:39:02 -0500 Subject: [PATCH 8/8] update file names --- README.md | 10 +++++----- _site.yml | 4 ++-- allTables.Rmd => allToolsTables.Rmd | 2 +- resourceTable.Rmd => dataResourceTable.Rmd | 0 4 files changed, 8 insertions(+), 8 deletions(-) rename allTables.Rmd => allToolsTables.Rmd (99%) rename resourceTable.Rmd => dataResourceTable.Rmd (100%) diff --git a/README.md b/README.md index 88a5df8..f7a1862 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ There are 6 tables that are generated: These are generated using 5 input files (data resources, clinical, imaging, multi-data, and omics). The data resources table needs to be generated first so that a file with identifier acronyms is written that can be used in building the rest of the tables. Within each R Markdown file building the tables, the input file is read-in and then the table is formatted to add hyperlinks, rearrange columns, etc. -Rather than saving these modified tables (clinical, imaging, multi-data, and omics) as output files, `knitr::knit_child` is used to force rendering the clinical, imaging, multi-data, and omics R Markdowns within the `allTables.Rmd`. This then allows the `allTables.Rmd` to inherit the modified table variables. Since the resources table has to be generated first, `knitr::knit_child` is used with the `resourcesTable.Rmd` first. The rows of these tables are joined together to form the all tools table (data resources are not included in this). +Rather than saving these modified tables (clinical, imaging, multi-data, and omics) as output files, `knitr::knit_child` is used to force rendering the clinical, imaging, multi-data, and omics R Markdowns within the `allToolTables.Rmd`. This then allows the `allToolTables.Rmd` to inherit the modified table variables. Since the resources table has to be generated first, `knitr::knit_child` is used with the `dataResourceTable.Rmd` first. The rows of these tables are joined together to form the all tools table (data resources are not included in this). ## Adding to or editing the Resource Table @@ -26,7 +26,7 @@ The data resource table has additional information about data that can be access ### Adding a new data resource to the tables -When adding a Data Resources Platform to the resources table, you will edit the first code block (which reads in the original `.csv` file) in [`resourcesTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/resourceTable.Rmd). +When adding a Data Resources Platform to the resources table, you will edit the first code block (which reads in the original `.csv` file) in [`dataResourceTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/dataResourceTable.Rmd). * First, create a tibble for the new resource, including the following information: * "Name" @@ -63,7 +63,7 @@ resource <- dplyr::rows_insert(resource, new_PCDC, conflict="ignore") ### Editing an existing data resource in the tables -When editing an existing entry in the resources table, you will edit the first code block (which reads in the original `itcr_table_resources.csv` file) in [`resourcesTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/resourceTable.Rmd). +When editing an existing entry in the resources table, you will edit the first code block (which reads in the original `itcr_table_resources.csv` file) in [`dataResourceTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/dataResourceTable.Rmd). * First, make a tibble with the name of the entry you want to edit as well as the column/info you want to edit. The column/info you want to edit should be one of the following columns: * "Name" @@ -201,12 +201,12 @@ generalData <- dplyr::rows_update(generalData, tibbleCGC, by = "Name") ## Important files in the repo ### Rendered files -* [`resourcesTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/resourceTable.Rmd) -- renders the ["Data Resources" page](https://jhudatascience.org/ITCR_Tables/allTables.html) +* [`dataResourceTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/dataResourceTable.Rmd) -- renders the ["Data Resources" page](https://jhudatascience.org/ITCR_Tables/dataResourceTable.html) * [`clinicalTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/clinicalTable.Rmd) -- renders the ["Computing Resources --> Clinical Platforms" page](https://jhudatascience.org/ITCR_Tables/clinicalTable.html) * [`imagingTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/imagingTable.Rmd) -- renders the ["Computing Resources --> Imaging Platforms" page](https://jhudatascience.org/ITCR_Tables/imagingTable.html) * [`multiTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/multiTable.Rmd) -- renders the ["Computing Resources --> Multi-data type Platforms" page](https://jhudatascience.org/ITCR_Tables/multiTable.html) * [`omicsTable.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/omicsTable.Rmd) -- renders the ["Computing Resources --> Omics Platforms" page](https://jhudatascience.org/ITCR_Tables/omicsTable.html) -* [`allTables.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/allTables.Rmd) -- renders the ["Computing Resources --> All platforms" page](https://jhudatascience.org/ITCR_Tables/allTables.html) +* [`allToolTables.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/allTables.Rmd) -- renders the ["Computing Resources --> All platforms" page](https://jhudatascience.org/ITCR_Tables/allToolTables.html) * [`contact.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/contact.Rmd) -- renders the ["Contact" page](https://jhudatascience.org/ITCR_Tables/contact.html) * [`feedback.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/feedback.Rmd) -- renders the ["Feedback Form" page](https://jhudatascience.org/ITCR_Tables/feedback.html) * [`index.Rmd`](https://github.com/jhudsl/ITCR_Tables/blob/main/index.Rmd) -- renders the [home page](https://jhudatascience.org/ITCR_Tables/index.html) diff --git a/_site.yml b/_site.yml index 803741e..e19adca 100644 --- a/_site.yml +++ b/_site.yml @@ -32,11 +32,11 @@ navbar: icon: fa-heartbeat - text: All platforms - href: allTables.html + href: allToolsTables.html icon: fa-th - text: Data Resources - href: resourceTable.html + href: dataResourceTable.html icon: fa-database diff --git a/allTables.Rmd b/allToolsTables.Rmd similarity index 99% rename from allTables.Rmd rename to allToolsTables.Rmd index 17c81cd..bcfde84 100644 --- a/allTables.Rmd +++ b/allToolsTables.Rmd @@ -30,7 +30,7 @@ library(magrittr) ```{r echo=FALSE, include=FALSE, message=FALSE, warning=FALSE} ## Solution using child Rmds: https://stackoverflow.com/questions/70785139/accessing-objects-from-another-mardown-file ## general refers to multi-data types -knitr::knit_child("resourceTable.Rmd") +knitr::knit_child("dataResourceTable.Rmd") knitr::knit_child("multiTable.Rmd") #inherit modified_general knitr::knit_child("imagingTable.Rmd") #inherit modified_imaging knitr::knit_child("omicsTable.Rmd") #inherit modified_omics diff --git a/resourceTable.Rmd b/dataResourceTable.Rmd similarity index 100% rename from resourceTable.Rmd rename to dataResourceTable.Rmd