Skip to content

Commit

Permalink
Minor README update
Browse files Browse the repository at this point in the history
  • Loading branch information
magnusdv committed Jun 26, 2023
1 parent 79cd277 commit b092c83
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 24 deletions.
24 changes: 12 additions & 12 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
fig.align='center',
dpi = 300
)
```

Expand All @@ -26,41 +27,40 @@ The goal of **segregatr** is to provide segregation analysis for clinical varian
## Installation

You can install **segregatr** from CRAN as follows:

```{r, eval = FALSE}
install.packages("segregatr")
```

Alternatively, you can obtain the latest development version from GitHub:
Alternatively, obtain the latest development version from GitHub:
```{r, eval = FALSE}
devtools::install_github("magnusdv/segregatr")
```

## Example

We start by loading **segregatr**:
```{r}
```{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, warranting a segregation analysis. pathogenic variant.
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.5, fig.width = 3, fig.align='center', out.width = "35%"}
```{r sibex, echo = F, results = F, fig.height = 2.4, fig.width = 3, out.width = "40%"}
x = nuclearPed(4)
plotSegregation(x, affected = 3:6, unknown = 1:2L, proband = 3,
carriers = 3:6, margins = c(1,3,1,1))
plotSegregation(x, affected = 3:6, unknown = 1:2, proband = 3, carriers = 3:6, margins = 1.5)
```

In order to compute the full-likelihood Bayes factor, we first create the pedigree.
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, aff = 3:6, unknown = 1:2,
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 answer indicates only suggestive evidence for pathogenicity.
The resulting FLB score is less than 8, which unfortunately only indicates suggestive evidence for pathogenicity.
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,33 @@ You can install **segregatr** from CRAN as follows:
install.packages("segregatr")
```

Alternatively, you can obtain the latest development version from
GitHub:
Alternatively, obtain the latest development version from GitHub:

``` r
devtools::install_github("magnusdv/segregatr")
```

## Example

We start by loading **segregatr**:

``` r
library(segregatr)
#> Loading required package: pedtools
```

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, warranting a segregation analysis. pathogenic
variant.
candidate variant.

<img src="man/figures/README-sibex-1.png" width="40%" style="display: block; margin: auto;" />

<img src="man/figures/README-sibex-1.png" width="35%" style="display: block; margin: auto;" />
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.

In order to compute the full-likelihood Bayes factor, we first create
the pedigree.
To create the pedigree we use the `nuclearPed()` function from the
**pedtools** package, which is automatically loaded together with
**segregatr**.

``` r
x = nuclearPed(4)
Expand All @@ -56,9 +57,10 @@ x = nuclearPed(4)
Then we run the `FLB()` function, filling in the necessary data:

``` r
FLB(x, carriers = 3:6, aff = 3:6, unknown = 1:2,
FLB(x, carriers = 3:6, affected = 3:6, unknown = 1:2,
freq = 0.0001, penetrances = c(0.01, 0.9, 0.9), proband = 3)
#> [1] 7.732161
```

The answer indicates only suggestive evidence for pathogenicity.
The resulting FLB score is less than 8, which unfortunately only
indicates suggestive evidence for pathogenicity.
Binary file modified man/figures/README-sibex-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b092c83

Please sign in to comment.