Skip to content

Commit

Permalink
Merge pull request #10 from mccoy-lab/stephaniemyan-patch-1
Browse files Browse the repository at this point in the history
Update render-all.yml to use Node.js 20. Also updates to admixr module to fix data download issue
  • Loading branch information
stephaniemyan authored Feb 21, 2024
2 parents 9be86a2 + 8ad1f7b commit b1c2f30
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/render-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
node-version: 20.x

# Use the yaml-env-action action.
- name: Load environment from YAML
uses: doughepi/[email protected]
with:
files: config_automation.yml # Pass a space-separated list of configuration files. Rightmost files take precedence.
node-version: 20.x
outputs:
toggle_bookdown: "${{ env.RENDER_BOOKDOWN }}"
toggle_coursera: "${{ env.RENDER_COURSERA }}"
Expand Down
15 changes: 11 additions & 4 deletions 09-archaic_admixture/09-archaic_admixture.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ library(admixr)

The `admixr` package provides real example data from 10 human individuals, which can be acquired by running its `download_data()` function:

```{r}
```{r, eval = FALSE}
# download data into current directory
prefix <- download_data(dirname = ".")
```
Expand All @@ -138,12 +138,19 @@ Together, the three `.geno`, `.ind`, and `.snp` files constitute **EIGENSTRAT fo

We can provide the location of the downloaded files to the `eigenstrat()` function, which then constructs an EIGENSTRAT object to be used for downstream analysis.

```{r}
```{r, eval = FALSE}
# read in eigenstrat files
snps <- eigenstrat(prefix)
snps <- eigenstrat("./snps/snps")
snps
```

```
## EIGENSTRAT object
## =================
## components:
## ind file: ./snps/snps.ind
## snp file: ./snps/snps.snp
## geno file: ./snps/snps.geno
```

## The `d()` function

Expand Down
2 changes: 1 addition & 1 deletion 09-archaic_admixture/09-archaic_admixture_starter.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ prefix <- download_data(dirname = ".")

```{r}
# read in eigenstrat files
snps <- eigenstrat(prefix)
snps <- eigenstrat("./snps/snps")
snps
```

Expand Down
2 changes: 1 addition & 1 deletion config_automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ url-checker: yes
# Render preview of content with changes (Rmd's and md's are checked)
render-preview: yes
# Spell check Rmds and quizzes
spell-check: yes
spell-check: no
# Style any R code
style-code: yes
# Test build the docker image if any docker-relevant files have been changed
Expand Down

0 comments on commit b1c2f30

Please sign in to comment.