Skip to content
Snippets Groups Projects
Commit 7322a3c1 authored by Willy Kuo's avatar Willy Kuo
Browse files

Added instructions to the Publication Page

parent 5b621e61
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,23 @@ author:
code-fold: true
---
<!-- Delete the instructions section after copying this template !! -->
# Instructions for editing
This Publication Page is meant to only contain information specific to the publication it's describing. Supplemental Methods that may be reused for another publication are supposed to go to the respective Experiment Page.
Possible examples for non-reuseable information that could go on this page:
- Supplemental results
- Supplemental figures
- Download links to supplemental videos, e.g. on Zenodo
- Data processing methods that are specific to the publication's research question
Programming code for pulling the information on samples or individual scans is at the bottom of the page. Editing the samples required happens not here, but in the Input_mice.csv file. Do not edit the code below the demarcated line, to avoid breaking the functionality.
# Supplemental Results
Here you can enter information about your results in text (with markdown format)
......@@ -54,7 +70,7 @@ DT::datatable(paths, options = list(dom = 't'), escape = FALSE, rownames = FALSE
```
## Mice information
## Sample information
```{r}
# | warning: false
......
---
title: 'Publication Title'
date: '0000-01-30'
First author: 'First Author Fullname'
Last author: 'Last Author Fullname'
author:
- name: 'First Author Fullname'
orcid: 1234-1234-1234-1234
affiliations:
- name: Group name, Institute name, University name
- name: 'Second Author Fullname'
orcid: 1234-1234-1234-1234
affiliations:
- name: Group name, Institute name, University name
code-fold: true
---
<!-- Delete the instructions section after copying this template !! -->
# Instructions for editing
This Publication Page is meant to only contain information specific to the publication it's describing. Supplemental Methods that may be reused for another publication are supposed to go to the respective Experiment Page.
Possible examples for non-reuseable information that could go on this page:
- Supplemental results
- Supplemental figures
- Download links to supplemental videos, e.g. on Zenodo
- Data processing methods that are specific to the publication's research question
Programming code for pulling the information on samples or individual scans is at the bottom of the page. Editing the samples required happens not here, but in the Input_mice.csv file. Do not edit the code
# Supplemental Results
Here you can enter information about your results in text (with markdown format)
<!-- Do not edit below this line !! -->
## Links to protocol pages
```{r}
# | warning: false
library(dplyr)
# This code chunk gathers the rows from tables specified in the inputs
inputs <- read.csv(file = 'input_mice.csv')
# Use data type and facility information to find the path to the relevant protocols
folders <- unique(cbind(inputs$Data_type,inputs$Facility_name_mon_YYYY)) # find table's unique variations of experiment type and facility
paths <- as.data.frame(file.path(apply(folders, 1, paste, collapse = .Platform$file.sep), 'protocols')) #put together the paths
colnames(paths) <- 'Protocols'
# Add HTML code so that it becomes a clickable link
paths$Protocols <- paste0('<a href=\'',paths$Protocols,'\' target=\'_blank\'>', paths$Protocols,'</a>')
file.path(here::here(), apply(folders, 1, paste, collapse = .Platform$file.sep), 'protocols')
# Render table
DT::datatable(paths, options = list(dom = 't'), escape = FALSE, rownames = FALSE, )
```
## Sample information
```{r}
# | warning: false
library(dplyr)
# Take the relevant rows from the tables specified in inputs
data_used <- list()
for (i in 1:nrow(inputs)){
row_filepath <- file.path(here::here(), 'experiments',inputs$Data_type[i], inputs$Facility_name_mon_YYYY[i], inputs$Metadata_file[i])
data_used[[i]] <- read.csv(row_filepath) %>% filter(SubjectID == inputs$SubjectID[i]) # read table and filter subject
}
# Gather list elements in a table
data_used <- do.call(rbind,data_used)
data_used$Subject_pubID <- inputs$Subject_pubID # Add additional input column
# add the subject index for publication as first variable
data_used <- relocate(data_used, Subject_pubID, .before = 1)
#Display table
DT::datatable(data_used, filter = 'top')
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment