Skip to content

Commit e5a20ad

Browse files
bschilderclaude
andcommitted
Add _pkgdown.yml with echoverse dark theme; improve vignette
- Create _pkgdown.yml with Bootstrap 5 dark theme matching echoverse suite - Organise exports into reference groups (IMPACT annotations, IMPACT enrichment, IMPACT visualisation, SpliceAI, deep learning annotations) - Add has_internet() guard to echoAI vignette - Expand vignette with SpliceAI and deep learning sections - Add /doc/ and /Meta/ to .gitignore Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2c770b7 commit e5a20ad

3 files changed

Lines changed: 205 additions & 23 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,5 @@ vignettes/*.R
4343
.Renviron
4444
*.tbi
4545
Rplots.pdf
46+
/doc/
47+
/Meta/

_pkgdown.yml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
url: https://rajlabmssm.github.io/echoAI/
2+
3+
template:
4+
bootstrap: 5
5+
bslib:
6+
bg: "#1a2744"
7+
fg: "#e8f4f4"
8+
primary: "#4ecdc4"
9+
secondary: "#3a8d8c"
10+
success: "#2ee8d6"
11+
info: "#5bc0be"
12+
code-bg: "#d6e4ee"
13+
code-color: "#1a2744"
14+
border-color: "#2a4060"
15+
link-color: "#4ecdc4"
16+
link-hover-color: "#2ee8d6"
17+
font-size-base: "1rem"
18+
includes:
19+
in_header: |
20+
<style>
21+
.navbar {
22+
background-color: #162038 !important;
23+
border-bottom: 2px solid #4ecdc4;
24+
}
25+
.navbar-brand, .nav-link { color: #e8f4f4 !important; }
26+
.nav-link:hover { color: #2ee8d6 !important; }
27+
.nav-link.active { color: #2ee8d6 !important; border-bottom: 2px solid #2ee8d6; }
28+
pre {
29+
background-color: #d6e4ee !important;
30+
color: #1a2744 !important;
31+
border: none !important;
32+
border-radius: 12px;
33+
margin: 0;
34+
padding: 0.8em 1em;
35+
}
36+
code { color: #1a6b68 !important; border: none !important; }
37+
pre code { color: #1a2744 !important; border: none !important; background: transparent !important; }
38+
pre code span { border: none !important; background: transparent !important; }
39+
.table { color: #e8f4f4 !important; }
40+
.table-striped > tbody > tr:nth-of-type(odd) > * {
41+
background-color: rgba(78, 205, 196, 0.05) !important;
42+
color: #e8f4f4 !important;
43+
}
44+
.table-striped > tbody > tr:nth-of-type(even) > * {
45+
background-color: transparent !important;
46+
color: #e8f4f4 !important;
47+
}
48+
.table > thead { border-bottom: 2px solid #4ecdc4; }
49+
h1, h2, h3, h4, h5, h6 { color: #4ecdc4 !important; }
50+
a { color: #5bc0be; }
51+
a:hover { color: #2ee8d6; }
52+
.card { background-color: #1e3050; border-color: #2a4060; }
53+
.footer { background-color: #162038 !important; border-top: 1px solid #2a4060; }
54+
.page-header { border-bottom: 2px solid #3a8d8c; }
55+
.sourceCode {
56+
background-color: #d6e4ee !important;
57+
border: 1px solid #3a8d8c;
58+
border-radius: 12px !important;
59+
overflow: hidden;
60+
}
61+
.sourceCode code span,
62+
.sourceCode code a {
63+
border: none !important;
64+
outline: none !important;
65+
box-shadow: none !important;
66+
background: transparent !important;
67+
}
68+
</style>
69+
70+
navbar:
71+
structure:
72+
left: [intro, reference, articles, news]
73+
right: [search, github]
74+
components:
75+
github:
76+
icon: fa-github
77+
href: https://github.com/RajLabMSSM/echoAI
78+
79+
articles:
80+
- title: Getting started
81+
contents:
82+
- echoAI
83+
- title: Setup
84+
contents:
85+
- docker
86+
87+
reference:
88+
- title: IMPACT annotations
89+
desc: Query and process IMPACT transcription factor binding predictions
90+
contents:
91+
- IMPACT_query
92+
- IMPACT_get_annotations
93+
- IMPACT_iterate_get_annotations
94+
- IMPACT_get_annotation_key
95+
- IMPACT_get_ldscores
96+
- IMPACT_get_top_annotations
97+
- IMPACT_postprocess_annotations
98+
- title: IMPACT enrichment
99+
desc: Compute and visualise enrichment of IMPACT scores across SNP groups
100+
contents:
101+
- IMPACT_compute_enrichment
102+
- IMPACT_iterate_enrichment
103+
- title: IMPACT visualisation
104+
desc: Plots for IMPACT scores and enrichment results
105+
contents:
106+
- IMPACT_plot_enrichment
107+
- IMPACT_plot_impact_score
108+
- IMPACT_snp_group_boxplot
109+
- IMPACT_heatmap
110+
- title: SpliceAI
111+
desc: Query and visualise SpliceAI splice-site predictions
112+
contents:
113+
- SPLICEAI_run
114+
- SPLICEAI_query_api
115+
- SPLICEAI_query_tsv
116+
- SPLICEAI_query_tsv_iterate
117+
- SPLICEAI_query_vcf
118+
- SPLICEAI_snp_probs
119+
- SPLICEAI_plot
120+
- title: Deep learning annotations
121+
desc: Query and visualise Basenji/DeepSEA predictions
122+
contents:
123+
- DEEPLEARNING_query
124+
- DEEPLEARNING_query_multi_chr
125+
- DEEPLEARNING_query_one_chr
126+
- DEEPLEARNING_melt
127+
- DEEPLEARNING_plot

vignettes/echoAI.Rmd

Lines changed: 76 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,43 @@ vignette: >
1616
library(echoAI)
1717
```
1818

19+
```{r, echo=FALSE}
20+
## Several examples query remote Zenodo/GitHub resources.
21+
## Gate on internet access so R CMD check works offline.
22+
has_internet <- function() {
23+
z <- try(suppressWarnings(
24+
readLines("https://github.com", n = 1L, warn = FALSE)
25+
), silent = TRUE)
26+
!inherits(z, "try-error")
27+
}
28+
run_online <- has_internet()
29+
```
30+
1931
# Introduction
2032

2133
`echoAI` provides API access to variant-level AI/ML predictions,
22-
currently centred on
23-
[IMPACT](https://github.com/immunogenomics/IMPACT)
24-
(Inference and Modeling of Phenotype-related ACtive Transcription).
34+
currently centred on three tools:
35+
36+
- **IMPACT** (Inference and Modeling of Phenotype-related ACtive Transcription)
37+
-- predicts transcription factor (TF) binding at motif sites by learning
38+
epigenomic profiles, primarily from [ENCODE](https://www.encodeproject.org/).
39+
The 707 annotations cover a wide range of immune and non-immune cell types,
40+
making IMPACT scores especially useful for prioritising causal variants in
41+
immune-mediated diseases. All IMPACT data are aligned to **hg19**.
42+
Tabix-indexed versions are hosted on Zenodo
43+
([doi:10.5281/zenodo.7062238](https://doi.org/10.5281/zenodo.7062238))
44+
for rapid remote querying.
2545

26-
IMPACT predicts transcription factor (TF) binding at a motif site by
27-
learning the epigenomic profiles at those sites
28-
(primarily [ENCODE](https://www.encodeproject.org/)).
29-
The 707 annotations cover a wide range of immune and non-immune cell types,
30-
making IMPACT scores especially useful for prioritising causal variants
31-
in immune-mediated diseases.
46+
- **SpliceAI** -- predicts the probability that a variant alters mRNA splicing.
47+
Results can be obtained via a local VCF/TSV or the Broad Institute API.
3248

33-
All IMPACT data are aligned to the **hg19** genome build.
34-
Tabix-indexed versions are hosted on Zenodo
35-
([doi:10.5281/zenodo.7062238](https://doi.org/10.5281/zenodo.7062238))
36-
for rapid remote querying.
49+
- **Deep learning annotations** (Basenji, DeepSEA) -- query precomputed
50+
variant-level scores from deep learning models of chromatin accessibility
51+
and gene expression.
3752

38-
# Query IMPACT annotations
53+
# IMPACT
54+
55+
## Query IMPACT annotations
3956

4057
The primary entry point is `IMPACT_query()`, which queries tabix-indexed
4158
IMPACT annotation and LD-score files hosted on Zenodo.
@@ -70,7 +87,7 @@ annot_long <- IMPACT_query(
7087
head(annot_long)
7188
```
7289

73-
# Annotation key
90+
## Annotation key
7491

7592
The annotation key maps each of the 707 IMPACT annotation IDs to its
7693
source study, tissue, cell type/line, and transcription factor.
@@ -80,7 +97,7 @@ annot_key <- IMPACT_get_annotation_key(save_key = FALSE)
8097
head(annot_key)
8198
```
8299

83-
# Download full annotation matrices
100+
## Download full annotation matrices
84101

85102
For larger analyses (e.g. genome-wide or multi-locus), you can download
86103
the full per-chromosome annotation matrices directly from the IMPACT
@@ -103,7 +120,7 @@ merged_DT <- echodata::get_Nalls2019_merged()
103120
ANNOT_MELT <- IMPACT_iterate_get_annotations(merged_DT = merged_DT)
104121
```
105122

106-
# Post-processing
123+
## Post-processing
107124

108125
`IMPACT_postprocess_annotations()` converts the annotation table to
109126
long format, identifies the top consensus SNP per locus, and adds a
@@ -113,7 +130,7 @@ combined cell-type label.
113130
ANNOT_MELT <- IMPACT_postprocess_annotations(ANNOT_MELT)
114131
```
115132

116-
# Enrichment analysis
133+
## Enrichment analysis
117134

118135
Enrichment is computed as the ratio of IMPACT signal in a given SNP group
119136
(e.g. consensus, credible set, lead GWAS) to the proportion of SNPs in
@@ -132,9 +149,9 @@ head(enrich)
132149
ENRICH <- IMPACT_iterate_enrichment(ANNOT_MELT = ANNOT_MELT)
133150
```
134151

135-
# Visualisation
152+
## Visualisation
136153

137-
## SNP group box plot
154+
### SNP group box plot
138155

139156
Compare IMPACT score distributions across SNP groups with
140157
`IMPACT_snp_group_boxplot()`:
@@ -147,15 +164,15 @@ bp <- IMPACT_snp_group_boxplot(
147164
)
148165
```
149166

150-
## Enrichment plots
167+
### Enrichment plots
151168

152169
Visualise enrichment results with bar and violin plots:
153170

154171
```{r enrichment-plot, eval=FALSE}
155172
plots <- IMPACT_plot_enrichment(ENRICH = ENRICH)
156173
```
157174

158-
## Locus plot
175+
### Locus plot
159176

160177
Create a multi-panel locus plot showing GWAS results, fine-mapping
161178
posterior probabilities, and per-tissue IMPACT scores:
@@ -164,14 +181,50 @@ posterior probabilities, and per-tissue IMPACT scores:
164181
impact_plot <- IMPACT_plot_impact_score(annot_melt = annot_melt)
165182
```
166183

167-
## Heatmap
184+
### Heatmap
168185

169186
Generate a ComplexHeatmap of mean IMPACT scores across loci and SNP groups:
170187

171188
```{r heatmap, eval=FALSE}
172189
mat_meta <- IMPACT_heatmap(ANNOT_MELT = ANNOT_MELT)
173190
```
174191

192+
# SpliceAI
193+
194+
## Run SpliceAI
195+
196+
`SPLICEAI_run()` is the main entry point. It dispatches to the
197+
appropriate backend (API, local TSV, or VCF) depending on your input.
198+
199+
```{r spliceai-run, eval=FALSE}
200+
query_dat <- echodata::BST1[1:50,]
201+
res <- SPLICEAI_run(query_dat = query_dat)
202+
```
203+
204+
## Visualise splice probabilities
205+
206+
```{r spliceai-plot, eval=FALSE}
207+
plt <- SPLICEAI_plot(query_dat = res)
208+
```
209+
210+
# Deep learning annotations
211+
212+
## Query deep learning scores
213+
214+
`DEEPLEARNING_query()` retrieves precomputed variant-level scores from
215+
deep learning models (e.g. Basenji, DeepSEA) via tabix-indexed files.
216+
217+
```{r dl-query, eval=FALSE}
218+
query_dat <- echodata::BST1[1:50,]
219+
dl_res <- DEEPLEARNING_query(query_dat = query_dat)
220+
```
221+
222+
## Visualise scores
223+
224+
```{r dl-plot, eval=FALSE}
225+
plt <- DEEPLEARNING_plot(dl_res)
226+
```
227+
175228

176229
# Session Info
177230

0 commit comments

Comments
 (0)