Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Commit 4e9cb90

Browse files
committed
Set output.dir to root.dir
1 parent 9ee53a1 commit 4e9cb90

File tree

2 files changed

+27
-14
lines changed

2 files changed

+27
-14
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CuratedAtlasQueryR
44
``` r
55
find_figure <- function(names){
66
rprojroot::find_package_root_file() |>
7-
file.path("man", "figures", names)
7+
file.path("man", "figures", names)
88
}
99
```
1010

@@ -18,9 +18,9 @@ exploration and retrieval of the harmonised, curated and reannotated
1818
CELLxGENE single-cell human cell atlas. Data can be retrieved at cell,
1919
sample, or dataset levels based on filtering criteria.
2020

21-
<img src="../man/figures/logo.png" width="120x" height="139px" />
21+
<img src="man/figures/logo.png" width="120x" height="139px" />
2222

23-
<img src="../man/figures/svcf_logo.jpeg" width="155x" height="58px" /><img src="../man/figures/czi_logo.png" width="129px" height="58px" /><img src="../man/figures/bioconductor_logo.jpg" width="202px" height="58px" /><img src="../man/figures/vca_logo.png" width="219px" height="58px" /><img src="../man/figures/nectar_logo.png" width="180px" height="58px" />
23+
<img src="man/figures/svcf_logo.jpeg" width="155x" height="58px" /><img src="man/figures/czi_logo.png" width="129px" height="58px" /><img src="man/figures/bioconductor_logo.jpg" width="202px" height="58px" /><img src="man/figures/vca_logo.png" width="219px" height="58px" /><img src="man/figures/nectar_logo.png" width="180px" height="58px" />
2424

2525
# Query interface
2626

@@ -263,7 +263,7 @@ metadata |>
263263
geom_jitter(shape=".")
264264
```
265265

266-
<img src="../man/figures/HLA_A_disease_plot.png" width="525" />
266+
![](man/figures/HLA_A_disease_plot.png)<!-- -->
267267

268268
``` r
269269

@@ -281,7 +281,7 @@ metadata |>
281281
geom_jitter(shape=".")
282282
```
283283

284-
<img src="../man/figures/HLA_A_tissue_plot.png" width="525" />
284+
![](man/figures/HLA_A_tissue_plot.png)<!-- -->
285285

286286
## Obtain Unharmonised Metadata
287287

vignettes/Introduction.Rmd

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,45 @@
11
---
22
title: "CuratedAtlasQueryR"
33
output: rmarkdown::html_vignette
4+
params:
5+
proj_root:
46
vignette: >
57
%\VignetteIndexEntry{CuratedAtlasQueryR}
68
%\VignetteEngine{knitr::rmarkdown}
79
%\VignetteEncoding{UTF-8}
810
---
911

10-
```{r, eval=FALSE, echo=FALSE}
12+
```{r, include = FALSE}
13+
knitr::opts_chunk$set(
14+
collapse = TRUE,
15+
comment = "#>"
16+
)
17+
root_dir <- knitr::opts_knit$get("root.dir")
18+
if (!is.null(root_dir)){
19+
knitr::opts_knit$set(
20+
output.dir = root_dir
21+
)
22+
}
23+
proj_root <- rprojroot::find_package_root_file() |> normalizePath()
24+
```
25+
26+
```{r, eval=FALSE, echo=FALSE, include=FALSE}
1127
# Note: knit this to the repo readme file using:
1228
rmarkdown::render(
1329
"Introduction.Rmd",
1430
output_file = "README.md",
1531
output_format = "github_document",
16-
output_dir = getwd() |> dirname()
32+
output_dir = proj_root,
33+
# We need to knit in the destination directory, or the relative paths
34+
# won't work
35+
knit_root_dir = proj_root
1736
)
1837
```
1938

2039
```{r}
2140
find_figure <- function(names){
2241
rprojroot::find_package_root_file() |>
23-
file.path("man", "figures", names)
42+
file.path("man", "figures", names)
2443
}
2544
```
2645

@@ -32,12 +51,6 @@ find_figure <- function(names){
3251

3352
`CuratedAtlasQuery` is a query interface that allow the programmatic exploration and retrieval of the harmonised, curated and reannotated CELLxGENE single-cell human cell atlas. Data can be retrieved at cell, sample, or dataset levels based on filtering criteria.
3453

35-
```{r, include = FALSE}
36-
knitr::opts_chunk$set(
37-
collapse = TRUE,
38-
comment = "#>"
39-
)
40-
```
4154

4255
```{r, echo=FALSE, out.height = c("139px"), out.width = "120x" }
4356
find_figure("logo.png") |> knitr::include_graphics()

0 commit comments

Comments
 (0)