Skip to content

Commit

Permalink
fix typos in docs, update makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
slowkow committed Jun 5, 2024
1 parent ae1ca3a commit 94fb912
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 16 deletions.
28 changes: 18 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

# ROOT_DIR:=$(shell dirname "$(realpath $(firstword $(MAKEFILE_LIST)))")

all: README.md vignettes/articles/examples.html docs/index.html vignettes/articles/visualize-hla-structure.html
rmds := $(wildcard vignettes/articles/*.Rmd)
articles = $(rmds:.Rmd=.html)
css = vignettes/articles/custom.css
mans := $(wildcard man/*.Rd)

all: README.md docs/index.html

clean:
rm -rf docs/ README_{files,cache} README.{md,html} index.{md,html} vignettes/articles/examples_{files,cache} vignettes/articles/*.html
Expand All @@ -19,23 +24,26 @@ cran:
test:
R -e 'devtools::test()'

README.md: README.Rmd
README.md: README.Rmd $(articles)
# R -e 'devtools::install_deps(".", TRUE)'
R -e 'rmarkdown::render("README.Rmd", "all")'

index.md: index.Rmd
index.md: index.Rmd $(articles)
R -e 'rmarkdown::render("index.Rmd", "md_document")'

vignettes/articles/examples.html: vignettes/articles/examples.Rmd vignettes/articles/custom.css
R -e 'devtools::build_rmd("vignettes/articles/examples.Rmd")'
vignettes/articles/%.html: vignettes/articles/%.Rmd $(css)
R -e 'devtools::build_rmd("$<")'

# vignettes/articles/examples.html: vignettes/articles/examples.Rmd vignettes/articles/custom.css
# R -e 'devtools::build_rmd("vignettes/articles/examples.Rmd")'

vignettes/articles/visualize-hla-structure.html: vignettes/articles/visualize-hla-structure.Rmd
R -e 'devtools::build_rmd("vignettes/articles/visualize-hla-structure.Rmd")'
# vignettes/articles/visualize-hla-structure.html: vignettes/articles/visualize-hla-structure.Rmd
# R -e 'devtools::build_rmd("vignettes/articles/visualize-hla-structure.Rmd")'

vignettes/articles/numbering.html: vignettes/articles/numbering.Rmd
R -e 'devtools::build_rmd("vignettes/articles/numbering.Rmd")'
# vignettes/articles/numbering.html: vignettes/articles/numbering.Rmd
# R -e 'devtools::build_rmd("vignettes/articles/numbering.Rmd")'

docs/index.html: vignettes/articles/examples.html index.md man/*.Rd
docs/index.html: index.md $(mans)
rm -rf docs/
R -e 'pkgdown::init_site(); pkgdown::build_articles(); pkgdown::build_site()'
rm -f docs/paper.*
Expand Down
4 changes: 2 additions & 2 deletions index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ See the [usage examples](articles/examples.html) to get some ideas for how to us

- [Logistic regression association for amino acid positions](articles/examples.html#logistic-regression-association-for-amino-acid-positions)

- [UMAP embedding of 3,516 HLA-DRB1 alleles](articles/examples.html#umap-embedding-of-3516-hla-drb1-alleles)
- [UMAP embedding of 3,671 HLA-DRB1 alleles](articles/examples.html#umap-embedding-of-hla-drb1-alleles)

- [Get HLA allele frequencies from Allele Frequency Net Database (AFND)](articles/examples.html#get-hla-allele-frequencies-from-allele-frequency-net-database-afnd)

Expand All @@ -54,7 +54,7 @@ See the [usage examples](articles/examples.html) to get some ideas for how to us
<a href="https://slowkow.github.io/hlabud/articles/examples.html#logistic-regression-association-for-amino-acid-positions">
<img width="49%" src="articles/examples_files/figure-html/glm-volcano-1.png">
</a>
<a href="https://slowkow.github.io/hlabud/articles/examples.html#umap-embedding-of-3516-hla-drb1-alleles">
<a href="https://slowkow.github.io/hlabud/articles/examples.html#umap-embedding-of-hla-drb1-alleles">
<img width="49%" src="articles/examples_files/figure-html/umap-2digit-1.png">
</a>
<a href="https://slowkow.github.io/hlabud/articles/examples.html#get-hla-allele-frequencies-from-allele-frequency-net-database-afnd">
Expand Down
6 changes: 3 additions & 3 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ how to use hlabud in your analyses.
- [Logistic regression association for amino acid
positions](articles/examples.html#logistic-regression-association-for-amino-acid-positions)

- [UMAP embedding of 3,516 HLA-DRB1
alleles](articles/examples.html#umap-embedding-of-3516-hla-drb1-alleles)
- [UMAP embedding of 3,671 HLA-DRB1
alleles](articles/examples.html#umap-embedding-of-hla-drb1-alleles)

- [Get HLA allele frequencies from Allele Frequency Net Database
(AFND)](articles/examples.html#get-hla-allele-frequencies-from-allele-frequency-net-database-afnd)
Expand All @@ -62,7 +62,7 @@ how to use hlabud in your analyses.
<a href="https://slowkow.github.io/hlabud/articles/examples.html#logistic-regression-association-for-amino-acid-positions">
<img width="49%" src="articles/examples_files/figure-html/glm-volcano-1.png">
</a>
<a href="https://slowkow.github.io/hlabud/articles/examples.html#umap-embedding-of-3516-hla-drb1-alleles">
<a href="https://slowkow.github.io/hlabud/articles/examples.html#umap-embedding-of-hla-drb1-alleles">
<img width="49%" src="articles/examples_files/figure-html/umap-2digit-1.png">
</a>
<a href="https://slowkow.github.io/hlabud/articles/examples.html#get-hla-allele-frequencies-from-allele-frequency-net-database-afnd">
Expand Down
Binary file modified vignettes/articles/examples_files/figure-html/umap-2digit-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/articles/examples_files/figure-html/umap-57-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/articles/examples_files/figure-html/umap-D57-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion vignettes/articles/numbering.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Then, as we move on to `TERVR.LLER`, we add 10 to 11 to get 21 for the `T` amino
However, as we move on to `CIYNQEE.SV` the rule of "add 10" does not work.
Instead of labeling `C` as position 31, we label it position 30. Why?

The reason why `C` is 31, and not 30, is because there is an indel (or gap) in the reference sequence at position 25_26 (notice the `.` in `R.L`).
The reason why `C` is 30, and not 31, is because there is an indel (or gap) in the reference sequence at position 25_26 (notice the `.` in `R.L`).
The convention is that deletions in the reference sequence are not numbered.

Let's take a closer look at this data with hlabud.
Expand All @@ -193,6 +193,7 @@ colnames(a$alleles)[50:70]
```

If hlabud is using the correct numbering, then we should see:

- `T` at position 21
- `C` at position 30

Expand Down

0 comments on commit 94fb912

Please sign in to comment.