pedprobr

Pedigree probabilities in R

https://github.com/magnusdv/pedprobr

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 1 committers (100.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.0%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Pedigree probabilities in R

Basic Info
  • Host: GitHub
  • Owner: magnusdv
  • License: gpl-2.0
  • Language: R
  • Default Branch: master
  • Size: 448 KB
Statistics
  • Stars: 4
  • Watchers: 3
  • Forks: 0
  • Open Issues: 1
  • Releases: 12
Created almost 8 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog License

README.Rmd

---
output: github_document
---



```{r, echo = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  fig.align = "center"
)
```

# pedprobr 


[![CRAN status](https://www.r-pkg.org/badges/version/pedprobr)](https://CRAN.R-project.org/package=pedprobr)
[![](https://cranlogs.r-pkg.org/badges/grand-total/pedprobr?color=yellow)](https://cran.r-project.org/package=pedprobr)
[![](https://cranlogs.r-pkg.org/badges/last-month/pedprobr?color=yellow)](https://cran.r-project.org/package=pedprobr)



## Introduction

The main content of **pedprobr** is an implementation of the Elston-Stewart algorithm for pedigree likelihoods given marker genotypes. It is part of the [pedsuite](https://magnusdv.github.io/pedsuite/), a collection of packages for pedigree analysis in R.

The **pedprobr** package does much of the hard work in several other pedsuite packages:

* [**forrel**](https://github.com/magnusdv/forrel): relatedness analysis and forensic pedigree analysis
* [**dvir**](https://github.com/magnusdv/dvir): disaster victim identification
* [**KLINK**](https://github.com/magnusdv/KLINK): kinship testing with linked markers
* [**paramlink2**](https://github.com/magnusdv/paramlink2): parametric linkage analysis
* [**pedbuildr**](https://github.com/magnusdv/pedbuildr): pedigree reconstruction
* [**segregatr**](https://github.com/magnusdv/segregatr): medical segregation analysis


The workhorse of **pedprobr** is the `likelihood()` function, which supports a variety of situations:

* autosomal and X-linked markers
* a single marker or two linked markers
* complex inbred pedigrees
* pedigrees with inbred founders
* mutation models


## Installation
To get the current official version of **pedprobr**, install from CRAN as follows:
```{r, eval = FALSE}
install.packages("pedprobr")
```

Alternatively, get the latest development version from GitHub:
```{r, eval = FALSE}
# install.packages("devtools") # install devtools if needed
devtools::install_github("magnusdv/pedprobr")
```

## Getting started
```{r}
library(pedprobr)
```

To set up a simple example, we first use **pedtools** utilities to create a pedigree where two brothers are genotyped with a single SNP marker. The marker has alleles `a` and `b`, with frequencies 0.2 and 0.8 respectively, and both brothers are heterozygous `a/b`.
```{r pedplot, fig.height=2.7, fig.width=2.5}
# Pedigree with SNP marker
x = nuclearPed(nch = 2) |> 
  addMarker(geno = c(NA, NA, "a/b", "a/b"), afreq = c(a = 0.2, b = 0.8), name = "M1")

# Plot with genotypes
plot(x, marker = "M1")
```

The pedigree likelihood, i.e., the probability of the genotypes given the pedigree, is obtained as follows:
```{r}
likelihood(x)
```

## Genotype probability distributions
Besides `likelihood()`, other important functions in **pedprobr** are:

* `oneMarkerDistribution()`: the joint genotype distribution at a single marker, for any subset of pedigree members
* `twoMarkerDistribution()`: the joint genotype distribution at two linked markers, for a single person

In both cases, the distributions are computed conditionally on any known genotypes at the markers in question.

To illustrate `oneMarkerDistribution()` we continue our example from above, and consider the following question: **What is the joint genotype distribution of the parents, conditional on the genotypes of the children?** 

The answer is found as follows:
```{r}
oneMarkerDistribution(x, ids = 1:2, verbose = F)
```

The output confirms the intuitive result that the parents cannot both be homozygous for the same allele. The most likely combination is that one parent is heterozygous `a/b`, while the other is homozygous `b/b`.

The argument `output` controls how the output of `oneMarkerDistribution()` is formatted. Instead of the default matrix (or multidimensional array, if more than 2 individuals), we can also get the distribution in table format:
```{r}
oneMarkerDistribution(x, ids = 1:2, verbose = F, output = "table")
```
A third possibility is `output = "sparse"`, which gives a table similar to the above, but with only the rows with non-zero probability.

Owner

  • Name: Magnus Dehli Vigeland
  • Login: magnusdv
  • Kind: user
  • Location: Oslo, Norway
  • Company: Department of Medical Genetics, University of Oslo

Statistical geneticist

GitHub Events

Total
  • Create event: 3
  • Release event: 3
  • Issues event: 1
  • Push event: 28
Last Year
  • Create event: 3
  • Release event: 3
  • Issues event: 1
  • Push event: 28

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 187
  • Total Committers: 1
  • Avg Commits per committer: 187.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 16
  • Committers: 1
  • Avg Commits per committer: 16.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Magnus Dehli Vigeland m****v@m****o 187
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 15
  • Total pull requests: 3
  • Average time to close issues: about 1 year
  • Average time to close pull requests: 20 days
  • Total issue authors: 3
  • Total pull request authors: 1
  • Average comments per issue: 2.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • thoree (10)
  • magnusdv (3)
  • mkruijver (2)
Pull Request Authors
  • magnusdv (4)
Top Labels
Issue Labels
bug (5) feature (2)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 667 last-month
  • Total dependent packages: 7
  • Total dependent repositories: 6
  • Total versions: 16
  • Total maintainers: 1
cran.r-project.org: pedprobr

Probability Computations on Pedigrees

  • Versions: 16
  • Dependent Packages: 7
  • Dependent Repositories: 6
  • Downloads: 667 Last month
Rankings
Dependent packages count: 6.6%
Dependent repos count: 11.9%
Average: 19.4%
Stargazers count: 23.6%
Downloads: 27.2%
Forks count: 27.8%
Maintainers (1)
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • R >= 4.1.0 depends
  • pedtools >= 1.1.0 depends
  • pedmut * imports
  • testthat * suggests