Skip to content

Commit

Permalink
Don't run data download step of admixr because of wget error, and upd…
Browse files Browse the repository at this point in the history
…ate path for reading in eigenstrat data
  • Loading branch information
stephaniemyan committed Feb 21, 2024
1 parent 5281a44 commit 027db40
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
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

0 comments on commit 027db40

Please sign in to comment.