-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
74 lines (50 loc) · 2.74 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# hidecan <img src="man/figures/logo.png" align="right" alt="" width="120" />
<!-- badges: start -->
<!-- badges: end -->
`hidecan` is an R package for generating HIDECAN plots, which are visualisations summarising the results of one or more Genome-wide association study (GWAS) and transcriptomics differential expression (DE) analysis, alongside candidate genes of interest.
## Installation
`hidecan` is available on the CRAN and can be installed via:
```{r, eval = FALSE}
install.packages("hidecan")
```
Alternatively, you can install the development version of `hidecan` from [GitHub](https://github.com/) with:
```{r, eval = FALSE}
# install.packages("devtools")
devtools::install_github("PlantandFoodResearch/hidecan")
```
## Usage
The hidecan package works as follows:
* it takes as an input one of more data-frames containing GWAS results, differential expression results and list of candidate genes of interest;
* it computes the length of each chromosome based on the genomic position of the markers and genes provided in the input data;
* it filters the datasets to retain significant markers or differentially expressed genes, according to a threshold on their score and/or log2-fold change. The fold-change is set by the user, and can be different for GWAS and differential expression results.
* it displays the position of the significant markers and genes alongside candidate genes (HIDECAN plot). The plot can be customised by the user via a number of parameters (e.g. legend position or label size).
The wrapper function `hidecan_plot()` performs all of these steps. Its use is demonstrated below with an example dataset:
```{r brief-example-hidecan-plot, fig.width = 10, fig.height = 10}
library(hidecan)
## Getting an example dataset
x <- get_example_data()
hidecan_plot(
gwas_list = x[["GWAS"]], ## data-frame of GWAS results
de_list = x[["DE"]], ## data-frame of DE results
can_list = x[["CAN"]], ## data-frame of candidate genes
score_thr_gwas = -log10(0.0001), ## sign. threshold for GWAS
score_thr_de = -log10(0.05), ## sign. threshold for DE
log2fc_thr = 0, ## log2FC threshold for DE
label_size = 2 ## label size for candidate genes
)
```
## Citation
If using HIDECAN, please cite:
Angelin-Bonnet, O., Vignes, M., Biggs, P. J., Baldwin, S., & Thomson, S. (2023). Visual integration of GWAS and differential expression results with the hidecan R package. bioRxiv, 2023-03. <https://doi.org/10.1101/2023.03.30.535015>