Skip to content

Commit

Permalink
removed text about downloading pre-calculated probs file
Browse files Browse the repository at this point in the history
  • Loading branch information
fboehm committed Apr 28, 2019
1 parent b5303ed commit f0b55c9
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions vignettes/recla-analysis.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,22 @@ gm <- pseudomap$`8`
```


Typically, we would use the hidden Markov model from Broman (2012) to calculate 36-state genotype probabilities for autosomal markers. We would use the following line of code to do that.
We use the hidden Markov model from Broman (2012) to calculate 36-state genotype probabilities for autosomal markers. We use the following line of code to do that.

```{r calc-genoprobs-code, eval = FALSE}
probs <- calc_genoprob(recla, map = pseudomap, cores = 1)
```

We would then convert the genotype probabilities to haplotype dosages.
We then convert the genotype probabilities to haplotype dosages.

```{r calc-aprobs, eval = FALSE}
aprobs <- genoprob_to_alleleprob(probs)
```

However, to save computing time when creating vignettes, we instead read pre-calculated 8-state founder allele dosages from Zenodo.

```{r}
```{r, echo = FALSE}
url <- "https://zenodo.org/record/2652931/files/recla-aprobs.rds?download=1"
dir.create("tmp") #create a directory that we'll delete later
download.file(url, destfile = "tmp/recla-aprobs.rds")
```

After downloading the rds file, we read it into our R session.

```{r}
aprobs <- readRDS("tmp/recla-aprobs.rds")
unlink("tmp", recursive = TRUE) # delete the tmp directory
```
Expand Down

0 comments on commit f0b55c9

Please sign in to comment.