Skip to content

Commit 8e61f5e

Browse files
committed
adds html versions to targets
and creates an index, and makes html look good
1 parent 4977f12 commit 8e61f5e

14 files changed

+3796
-66
lines changed

R/replace_yaml.R

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
replace_yaml = function(alt_dep, rmd_doc, yaml_doc,
2+
out_file = "docs/ici_kt_manuscript_html.Rmd")
3+
{
4+
# alt_dep = tar_read(manuscript)
5+
# rmd_doc = "docs/ici_kt_manuscript.Rmd"
6+
# yaml_doc = "docs/html_document_opts.yaml"
7+
# out_file = "docs/ici_kt_manuscript_html.Rmd"
8+
rmd_contents = readLines(rmd_doc)
9+
yaml_locs = grep("---", rmd_contents)
10+
yaml_range = seq(yaml_locs[1], yaml_locs[2], 1)
11+
rmd_noyaml = rmd_contents[-yaml_range]
12+
13+
new_yaml = readLines(yaml_doc)
14+
new_yaml_delim = c("---", new_yaml, "---")
15+
rmd_newyaml = c(new_yaml_delim, rmd_noyaml)
16+
cat(rmd_newyaml, file = out_file, sep = "\n", append = FALSE)
17+
return(out_file)
18+
}
19+
20+
copy_figure = function(manuscript_dep, from_loc, to_loc)
21+
{
22+
fs::file_copy(from_loc, to_loc)
23+
to_loc
24+
}

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ If you use any content, you must give attribution to this original work.
2121

2222
## R Packages Needed
2323

24-
The repository used R 4.1.0, and {renv} 1.0.0
24+
The repository used R 4.3.0, and {renv} 1.0.0
2525
For all of the other packages needed, see the file `renv.lock`.
2626

2727
To setup to be able to rerun everything here, you can clone the repo from [github](https://github.com/MoseleyBioinformaticsLab/manuscript.ICIKendallTau) or download it from [Zenodo](https://zenodo.org/doi/10.5281/zenodo.6309187), and then from within that folder:
@@ -81,12 +81,14 @@ Having this cache, you have the state of the computations when we submitted the
8181
```
8282
# make sure you are wherever you want the targets cache, like wherever
8383
# you cloned the github repo to, at the top level of the directory.
84-
wget https://zenodo.org/records/10570286/files/manuscript.ICIKendallTau.targets_cache.parts0.tar?download=1 --output-document=manuscript.ICIKendallTau.targets_cache.parts0.tar
85-
wget https://zenodo.org/records/10570286/files/manuscript.ICIKendallTau.targets_cache.parts1.tar?download=1 --output-document=manuscript.ICIKendallTau.targets_cache.parts1.tar
86-
wget https://zenodo.org/records/10570256/files/manuscript.ICIKendallTau.targets_cache.parts2.tar?download=1 --output-document=manuscript.ICIKendallTau.targets_cache.parts2.tar
84+
wget 'https://zenodo.org/records/13873347/files/manuscript.ICIKendallTau.targets_cache.parts0.tar?download=1' --output-document=manuscript.ICIKendallTau.targets_cache.parts0.tar
85+
wget 'https://zenodo.org/records/13873347/files/manuscript.ICIKendallTau.targets_cache.parts1.tar?download=1' --output-document=manuscript.ICIKendallTau.targets_cache.parts1.tar
86+
wget 'https://zenodo.org/records/13874988/files/manuscript.ICIKendallTau.targets_cache.parts2.tar?download=1' --output-document=manuscript.ICIKendallTau.targets_cache.parts2.tar
87+
wget 'https://zenodo.org/records/13874988/files/manuscript.ICIKendallTau.targets_cache.parts3.tar?download=1' --output-document=manuscript.ICIKendallTau.targets_cache.parts3.tar
8788
8889
# now untar them. Note the "k", this keeps the directory from getting overwritten by subsequent un-tar
8990
tar -xkvf manuscript.ICIKendallTau.targets_cache.parts0.tar
9091
tar -xkvf manuscript.ICIKendallTau.targets_cache.parts1.tar
9192
tar -xkvf manuscript.ICIKendallTau.targets_cache.parts2.tar
93+
tar -xkvf manuscript.ICIKendallTau.targets_cache.parts3.tar
9294
```

_targets.R

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,22 @@ documents_plan = tar_plan(
372372
tar_render(manuscript,
373373
"docs/ici_kt_manuscript.Rmd"),
374374
tar_render(lod_stuff,
375-
"docs/check_variable_lod.Rmd")
375+
"docs/check_variable_lod.Rmd"),
376+
tar_render(supp_html,
377+
"docs/supplemental_materials.Rmd",
378+
output_format = "rmarkdown::html_document"),
379+
tar_target(manuscript_alt,
380+
replace_yaml(manuscript, "docs/ici_kt_manuscript.Rmd",
381+
"docs/html_document_opts.yaml",
382+
"docs/ici_kt_manuscript_html.Rmd"),
383+
format = "file"),
384+
tar_render(manuscript_html,
385+
"docs/ici_kt_manuscript_html.Rmd",
386+
output_file = "ici_kt_manuscript.html"),
387+
tar_render(readme_index,
388+
"README.md",
389+
output_file = "docs/index.html"),
390+
copy_fig1 = copy_figure(manuscript, "docs/the_problem.png", "docs/ici_kt_manuscript_files/figure-docx/Figure_1-the-problem.png")
376391

377392
)
378393

docs/html_document_opts.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
title: 'Information-Content-Informed Kendall-tau Correlation: Utilizing Missing Values'
2+
author: "Robert M Flight, Praneeth S Bhatt, Hunter NB Moseley"
3+
output:
4+
rmarkdown::html_document:
5+
self_contained: yes
6+
toc: true
7+
toc_float:
8+
collapsed: false
9+
smooth_scroll: false
10+
date: '`r Sys.time()`'
11+
bibliography: '`r here::here("docs/icikt_references.json")`'
12+
csl: plos-computational-biology.csl
13+
editor_options:
14+
chunk_output_type: console

docs/ici_kt_manuscript.Rmd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ output:
2222
pandoc_args:
2323
- '--lua-filter=scholarly-metadata.lua'
2424
- '--lua-filter=author-info-blocks.lua'
25-
rmarkdown::html_document:default:
26-
self_contained: yes
2725
date: '`r Sys.time()`'
2826
bibliography: '`r here::here("docs/icikt_references.json")`'
2927
csl: plos-computational-biology.csl

docs/ici_kt_manuscript.docx

-7 Bytes
Binary file not shown.

docs/ici_kt_manuscript.html

Lines changed: 1187 additions & 15 deletions
Large diffs are not rendered by default.

docs/ici_kt_manuscript.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ output:
2222
pandoc_args:
2323
- '--lua-filter=scholarly-metadata.lua'
2424
- '--lua-filter=author-info-blocks.lua'
25-
rmarkdown::html_document:default:
26-
self_contained: yes
27-
date: '2024-09-30 17:38:15.03703'
25+
date: '2024-10-02 09:18:59.613449'
2826
bibliography: '/home/rmflight/Documents/manuscripts/in_progress/rmflight_ici-kendallt/docs/icikt_references.json'
2927
csl: plos-computational-biology.csl
3028
editor_options:

0 commit comments

Comments
 (0)