-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
83 lines (60 loc) · 3.25 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
75
76
77
78
79
80
81
82
83
---
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-",
fig.align='center',
dpi = 300
)
```
# segregatr
<!-- badges: start -->
[![CRAN status](https://www.r-pkg.org/badges/version/segregatr)](https://CRAN.R-project.org/package=segregatr)
[![](https://cranlogs.r-pkg.org/badges/grand-total/segregatr?color=yellow)](https://cran.r-project.org/package=segregatr)
[![](https://cranlogs.r-pkg.org/badges/last-month/segregatr?color=yellow)](https://cran.r-project.org/package=segregatr)
<!-- badges: end -->
The goal of **segregatr** is to provide segregation analysis for clinical variant classification. Specifically it facilitates the calculation of full-likelihood Bayes factors (FLBs) in any medical pedigree.
#### Citation
If you use **segregatr** in a publication, please cite this paper: Ratajska et al. (2023). [The use of segregation analysis in interpretation of sequence variants in SMAD3](https://doi.org/10.1002/mgg3.2107).
The paper includes applications of the package in real-life diagnostic cases.
#### Shiny app
A Shiny app **shinyseg** for clinical segregation analysis is now available! Check it out here: [https://chrcarrizosa.shinyapps.io/shinyseg/](https://chrcarrizosa.shinyapps.io/shinyseg/).
The app is based on **segregatr**, but offers a wealth of additional features:
* interactive visualisations
* complex disease modelling
* sensitivity analysis
* clinical interpretation for use in the ACMG-AMP framework
For details, see Carrizosa et al. (2024): [shinyseg: a web application for flexible cosegregation and sensitivity analysis](https://doi.org/10.1093/bioinformatics/btae201).
## Installation
You can install **segregatr** from CRAN as follows:
```{r, eval = FALSE}
install.packages("segregatr")
```
Alternatively, obtain the latest development version from GitHub:
```{r, eval = FALSE}
devtools::install_github("magnusdv/segregatr")
```
## Example
```{r, message=F}
library(segregatr)
```
The family below shows four brothers, all affected with a rare dominant disease with 90% penetrance and phenocopy rate 1%. The parents have unknown affection status. All four brothers are shown to carry a candidate variant.
```{r sibex, echo = F, results = F, fig.height = 2.4, fig.width = 3.5, out.width = "45%"}
x = nuclearPed(4)
plotSegregation(x, affected = 3:6, unknown = 1:2, proband = 3, carriers = 3:6)
```
We will use **segregatr** to analyse the co-segregation of the variant and the disease in this pedigree. Specifically we want to compute the *full-likelihood Bayes factor* (FLB), quantifying the evidence that the variant is pathogenic.
To create the pedigree we use the `nuclearPed()` function from the **pedtools** package, which is automatically loaded together with **segregatr**.
```{r}
x = nuclearPed(4)
```
Then we run the `FLB()` function, filling in the necessary data:
```{r}
FLB(x, carriers = 3:6, affected = 3:6, unknown = 1:2,
freq = 0.0001, penetrances = c(0.01, 0.9, 0.9), proband = 3)
```
The resulting FLB score amounts to *suggestive evidence* for pathogenicity, according to the thresholds suggested by [Jarvik and Browning (2016)](https://doi.org/10.1016/j.ajhg.2016.04.003).