Skip to content

Commit

Permalink
update links to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
slowkow committed Jul 5, 2023
1 parent 0662516 commit 7f8a0ad
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 29 deletions.
30 changes: 22 additions & 8 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,34 @@ devtools::install_github("slowkow/hlabud")

# Examples

See the [usage examples](vignettes/articles/examples.md) to get some ideas for how to use hlabud in your analyses.
See the [usage examples](https://slowkow.github.io/hlabud/articles/examples.html) to get some ideas for how to use hlabud in your analyses.

- [Get a one-hot encoded matrix for all HLA-DRB1 alleles](https://github.com/slowkow/hlabud/blob/main/vignettes/articles/examples.md#get-a-one-hot-encoded-matrix-for-all-hla-drb1-alleles)
- [Convert genotypes to a dosage matrix](https://github.com/slowkow/hlabud/blob/main/vignettes/articles/examples.md#convert-genotypes-to-a-dosage-matrix)
- [Logistic regression association for amino acid positions](https://github.com/slowkow/hlabud/blob/main/vignettes/articles/examples.md#logistic-regression-association-for-amino-acid-positions)
- [UMAP embedding of 3,516 HLA-DRB1 alleles](https://github.com/slowkow/hlabud/blob/main/vignettes/articles/examples.md#umap-embedding-of-3516-hla-drb1-alleles)
- [Download and unpack all data from the latest IMGTHLA release](https://github.com/slowkow/hlabud/blob/main/vignettes/articles/examples.md#download-and-unpack-all-data-from-the-latest-imgthla-release)
- [Get a one-hot encoded matrix for all HLA-DRB1 alleles](https://slowkow.github.io/hlabud/articles/examples.html#get-a-one-hot-encoded-matrix-for-all-hla-drb1-alleles)

<a href="vignettes/articles/examples.md#logistic-regression-association-for-amino-acid-positions">
- [Convert genotypes to a dosage matrix](https://slowkow.github.io/hlabud/articles/examples.html#convert-genotypes-to-a-dosage-matrix)

- [Logistic regression association for amino acid positions](https://slowkow.github.io/hlabud/articles/examples.html#logistic-regression-association-for-amino-acid-positions)

- [UMAP embedding of 3,516 HLA-DRB1 alleles](https://slowkow.github.io/hlabud/articles/examples.html#umap-embedding-of-3516-hla-drb1-alleles)

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

- [Compute HLA divergence with the Grantham distance matrix](https://slowkow.github.io/hlabud/articles/examples.html#compute-hla-divergence-with-the-grantham-distance-matrix)

- [Download and unpack all data from the latest IMGTHLA release](https://slowkow.github.io/hlabud/articles/examples.html#download-and-unpack-all-data-from-the-latest-imgthla-release)

<a href="https://slowkow.github.io/hlabud/articles/examples.html#logistic-regression-association-for-amino-acid-positions">
<img width="49%" src="vignettes/articles/examples_files/figure-html/glm-volcano-1.png">
</a>
<a href="vignettes/articles/examples.md#umap-embedding-of-3516-hla-drb1-alleles">
<a href="https://slowkow.github.io/hlabud/articles/examples.html#umap-embedding-of-3516-hla-drb1-alleles">
<img width="49%" src="vignettes/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">
<img width="49%" src="vignettes/articles/examples_files/figure-html/afnd_dqb1_02_01-1.png">
</a>
<a href="https://slowkow.github.io/hlabud/articles/visualize-hla-structure.html">
<img width="49%" src="https://github.com/slowkow/ggrepel/assets/209714/4843a850-a4fd-4832-9600-0b8e9c1bb904">
</a>

# Citation

Expand Down
35 changes: 26 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,43 @@ devtools::install_github("slowkow/hlabud")

# Examples

See the [usage examples](vignettes/articles/examples.md) to get some
ideas for how to use hlabud in your analyses.
See the [usage
examples](https://slowkow.github.io/hlabud/articles/examples.html) to
get some ideas for how to use hlabud in your analyses.

- [Get a one-hot encoded matrix for all HLA-DRB1
alleles](https://github.com/slowkow/hlabud/blob/main/vignettes/articles/examples.md#get-a-one-hot-encoded-matrix-for-all-hla-drb1-alleles)
alleles](https://slowkow.github.io/hlabud/articles/examples.html#get-a-one-hot-encoded-matrix-for-all-hla-drb1-alleles)

- [Convert genotypes to a dosage
matrix](https://github.com/slowkow/hlabud/blob/main/vignettes/articles/examples.md#convert-genotypes-to-a-dosage-matrix)
matrix](https://slowkow.github.io/hlabud/articles/examples.html#convert-genotypes-to-a-dosage-matrix)

- [Logistic regression association for amino acid
positions](https://github.com/slowkow/hlabud/blob/main/vignettes/articles/examples.md#logistic-regression-association-for-amino-acid-positions)
positions](https://slowkow.github.io/hlabud/articles/examples.html#logistic-regression-association-for-amino-acid-positions)

- [UMAP embedding of 3,516 HLA-DRB1
alleles](https://github.com/slowkow/hlabud/blob/main/vignettes/articles/examples.md#umap-embedding-of-3516-hla-drb1-alleles)
alleles](https://slowkow.github.io/hlabud/articles/examples.html#umap-embedding-of-3516-hla-drb1-alleles)

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

- [Compute HLA divergence with the Grantham distance
matrix](https://slowkow.github.io/hlabud/articles/examples.html#compute-hla-divergence-with-the-grantham-distance-matrix)

- [Download and unpack all data from the latest IMGTHLA
release](https://github.com/slowkow/hlabud/blob/main/vignettes/articles/examples.md#download-and-unpack-all-data-from-the-latest-imgthla-release)
release](https://slowkow.github.io/hlabud/articles/examples.html#download-and-unpack-all-data-from-the-latest-imgthla-release)

<a href="vignettes/articles/examples.md#logistic-regression-association-for-amino-acid-positions">
<a href="https://slowkow.github.io/hlabud/articles/examples.html#logistic-regression-association-for-amino-acid-positions">
<img width="49%" src="vignettes/articles/examples_files/figure-html/glm-volcano-1.png">
</a>
<a href="vignettes/articles/examples.md#umap-embedding-of-3516-hla-drb1-alleles">
<a href="https://slowkow.github.io/hlabud/articles/examples.html#umap-embedding-of-3516-hla-drb1-alleles">
<img width="49%" src="vignettes/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">
<img width="49%" src="vignettes/articles/examples_files/figure-html/afnd_dqb1_02_01-1.png">
</a>
<a href="https://slowkow.github.io/hlabud/articles/visualize-hla-structure.html">
<img width="49%" src="https://github.com/slowkow/ggrepel/assets/209714/4843a850-a4fd-4832-9600-0b8e9c1bb904">
</a>

# Citation

Expand Down
12 changes: 9 additions & 3 deletions index.Rmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# hlabud: HLA analysis in R <img width="25%" align="right" src="https://github.com/slowkow/hlabud/assets/209714/b39a3f04-c9a8-4867-a3e0-9434f0f9ef20"></img>

hlabud provides methods for retrieving sequence alignment data from the [IMGTHLA] database and converting the data into R matrices ready for downstream analysis. The [vignette](articles/examples.html) shows examples of how to use the data with logistic regression and dimensionality reduction.
hlabud provides methods to retrieve sequence alignment data from [IMGTHLA] and convert the data into convenient R matrices ready for downstream analysis. See the [usage examples](https://slowkow.github.io/hlabud/articles/examples.html) to learn how to use the data with logistic regression and dimensionality reduction. We also share tips on how to [visualize the 3D molecular structure](https://slowkow.github.io/hlabud/articles/visualize-hla-structure.html) of HLA proteins and highlight specific amino acid residues.

[IMGTHLA]: https://github.com/ANHIG/IMGTHLA

Expand Down Expand Up @@ -45,12 +45,18 @@ See the [usage examples](articles/examples.html) to get some ideas for how to us

- [Download and unpack all data from the latest IMGTHLA release](articles/examples.html#download-and-unpack-all-data-from-the-latest-imgthla-release)

<a href="articles/examples.html#logistic-regression-association-for-amino-acid-positions">
<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="articles/examples.html#umap-embedding-of-3516-hla-drb1-alleles">
<a href="https://slowkow.github.io/hlabud/articles/examples.html#umap-embedding-of-3516-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">
<img width="49%" src="articles/examples_files/figure-html/afnd_dqb1_02_01-1.png">
</a>
<a href="https://slowkow.github.io/hlabud/articles/visualize-hla-structure.html">
<img width="49%" src="https://github.com/slowkow/ggrepel/assets/209714/4843a850-a4fd-4832-9600-0b8e9c1bb904">
</a>


Citation
Expand Down
23 changes: 16 additions & 7 deletions index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# hlabud: HLA analysis in R <img width="25%" align="right" src="https://github.com/slowkow/hlabud/assets/209714/b39a3f04-c9a8-4867-a3e0-9434f0f9ef20"></img>

hlabud provides methods for retrieving sequence alignment data from the
[IMGTHLA](https://github.com/ANHIG/IMGTHLA) database and converting the
data into R matrices ready for downstream analysis. The
[vignette](articles/examples.html) shows examples of how to use the data
with logistic regression and dimensionality reduction.
hlabud provides methods to retrieve sequence alignment data from
[IMGTHLA](https://github.com/ANHIG/IMGTHLA) and convert the data into
convenient R matrices ready for downstream analysis. See the [usage
examples](https://slowkow.github.io/hlabud/articles/examples.html) to
learn how to use the data with logistic regression and dimensionality
reduction. We also share tips on how to [visualize the 3D molecular
structure](https://slowkow.github.io/hlabud/articles/visualize-hla-structure.html)
of HLA proteins and highlight specific amino acid residues.

For example, let’s consider a simple question about two HLA genotypes
DRB1\*04:174 and DRB1\*15:152. What amino acid positions are different
Expand Down Expand Up @@ -54,12 +57,18 @@ how to use hlabud in your analyses.
- [Download and unpack all data from the latest IMGTHLA
release](articles/examples.html#download-and-unpack-all-data-from-the-latest-imgthla-release)

<a href="articles/examples.html#logistic-regression-association-for-amino-acid-positions">
<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="articles/examples.html#umap-embedding-of-3516-hla-drb1-alleles">
<a href="https://slowkow.github.io/hlabud/articles/examples.html#umap-embedding-of-3516-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">
<img width="49%" src="articles/examples_files/figure-html/afnd_dqb1_02_01-1.png">
</a>
<a href="https://slowkow.github.io/hlabud/articles/visualize-hla-structure.html">
<img width="49%" src="https://github.com/slowkow/ggrepel/assets/209714/4843a850-a4fd-4832-9600-0b8e9c1bb904">
</a>

# Citation

Expand Down
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-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-pos13-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-pos13_H-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions vignettes/articles/visualize-hla-structure.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ HLA-DR 3pdo

Also try searching the PDB website for, e.g., `"HLA-DR"` and see if there is a more appropriate structure for your analysis.

# NGLVieweR
# Using NGLVieweR

Let's try to visualize position 9 in the HLA-B protein structure.

Expand Down Expand Up @@ -120,7 +120,7 @@ What fraction of reported HLA-B alleles have Tyr9?
sum(a$onehot[,"pos9_Y"] == 1) / nrow(a$onehot)
```

# PyMOL
# Using PyMOL

[PyMOL] is one of my favorite methods for visualizing protein structures, because it allows us to [change a residue][mutagenesis] in an existing protein and visualize the new mutated protein.

Expand Down Expand Up @@ -189,5 +189,6 @@ R:

* https://www.raymolecule.com

[PyMOL]: https://pymol.org
[mutagenesis]: https://pymolwiki.org/index.php/Mutagenesis

0 comments on commit 7f8a0ad

Please sign in to comment.