qtl2pleio
qtl2pleio: Testing pleiotropy vs. separate QTL in multiparental populations - Published in JOSS (2019)
Science Score: 93.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
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org, zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
multiparental-populations
quantitative-genetics
quantitative-trait
Scientific Fields
Engineering
Computer Science -
60% confidence
Last synced: 6 months ago
·
JSON representation
Repository
Testing pleiotropy vs. separate QTL in multiparental populations
Basic Info
Statistics
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 11
- Releases: 9
Topics
multiparental-populations
quantitative-genetics
quantitative-trait
Created over 8 years ago
· Last pushed over 4 years ago
Metadata Files
Readme
Changelog
License
Codemeta
Zenodo
README.Rmd
---
output: github_document
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%",
message = FALSE,
warning = FALSE
)
```
# qtl2pleio
[](https://github.com/fboehm/qtl2pleio/actions)
[](https://cran.r-project.org/package=qtl2pleio)
[](https://codecov.io/github/fboehm/qtl2pleio?branch=master)
[](https://www.repostatus.org/#active)
[](https://joss.theoj.org/papers/10.21105/joss.01435)
[](https://zenodo.org/badge/latestdoi/104493705)
## Overview
`qtl2pleio` is a software package for use with the [R statistical computing environment](https://cran.r-project.org/). `qtl2pleio` is freely available for download and use. I share it under the [MIT license](https://opensource.org/licenses/mit-license.php). The user will also want to download and install the [`qtl2` R package](https://kbroman.org/qtl2/).
Click [here](https://mybinder.org/v2/gh/fboehm/qtl2pleio/master?urlpath=rstudio) to explore `qtl2pleio` within a live [Rstudio](https://rstudio.com/) session in "the cloud".
## Contributor guidelines
We eagerly welcome contributions to `qtl2pleio`. All pull requests will be considered. Features requests and bug reports may be filed as Github issues. All contributors must abide by the [code of conduct](https://github.com/fboehm/qtl2pleio/blob/master/CONDUCT.md).
## Technical support
For technical support, please open a Github issue. If you're just getting started with `qtl2pleio`, please examine the [vignettes](https://fboehm.us/software/qtl2pleio) on the [package's web site](https://fboehm.us/software/qtl2pleio). You can also email for assistance.
## Goals
The goal of `qtl2pleio` is, for a pair of traits that show evidence for
a QTL in a common region, to distinguish between pleiotropy (the null
hypothesis, that they are affected by a common QTL) and the
alternative that they are affected by separate QTL. It extends the
likelihood ratio test of [Jiang and Zeng
(1995)](https://www.genetics.org/content/140/3/1111.long) for
multiparental populations, such as Diversity Outbred mice, including
the use of multivariate polygenic random effects to account for population structure.
`qtl2pleio` data structures are those used in the
[`rqtl/qtl2`](https://kbroman.org/qtl2/) package.
## Installation
To install qtl2pleio, use `install_github()` from the
[devtools](https://devtools.r-lib.org) package.
```{r install-qtl2pleio, eval = FALSE}
install.packages("qtl2pleio")
```
You may also wish to install the [R/qtl2](https://kbroman.org/qtl2/). We
will use it below.
```{r install-qtl2, eval = FALSE}
install.packages("qtl2")
```
## Example
Below, we walk through an example analysis with Diversity Outbred
mouse data. We need a number of preliminary steps before we can
perform our test of pleiotropy vs. separate QTL. Many procedures rely
on the R package `qtl2`. We first load the `qtl2`
and `qtl2pleio` packages.
```{r pkgs}
library(qtl2)
library(qtl2pleio)
library(ggplot2)
```
### Reading data from `qtl2data` repository on github
We'll consider the
[`DOex`](https://github.com/rqtl/qtl2data/tree/master/DOex/) data in
the [`qtl2data`](https://github.com/rqtl/qtl2data/) repository.
We'll download the DOex.zip file before calculating founder allele dosages.
```{r download-DOex}
file <- paste0("https://raw.githubusercontent.com/rqtl/",
"qtl2data/master/DOex/DOex.zip")
DOex <- read_cross2(file)
```
```{r calc-genoprobs}
probs <- calc_genoprob(DOex)
```
Let's calculate the founder allele dosages from the 36-state genotype probabilities.
```{r calc-allele-probs}
pr <- genoprob_to_alleleprob(probs)
```
We now have an allele probabilities object stored in `pr`.
```{r check-pr}
names(pr)
dim(pr$`2`)
```
We see that `pr` is a list of 3 three-dimensional arrays - one array for each of 3 chromosomes.
### Kinship calculations
For our statistical model, we need a kinship matrix. We get one with the `calc_kinship` function in the `rqtl/qtl2` package.
```{r calc-kinship}
kinship <- calc_kinship(probs = pr, type = "loco")
```
### Statistical model specification
We use the multivariate linear mixed effects model:
$$
\text{vec}(Y) = X \text{vec}(B) + \text{vec}(G) + \text{vec}(E)
$$
where $Y$ contains phenotypes, X contains founder allele probabilities and covariates, and B contains founder allele effects. G is the polygenic random effects, while E is the random errors. We provide more details in the vignette.
### Simulating phenotypes with `qtl2pleio::sim1`
The function to simulate phenotypes in `qtl2pleio` is `sim1`.
```{r pp-def}
# set up the design matrix, X
pp <- pr[[2]] #we'll work with Chr 3's genotype data
```
```{r X-def}
#Next, we prepare a design matrix X
X <- gemma2::stagger_mats(pp[ , , 50], pp[ , , 50])
```
```{r B-def}
# assemble B matrix of allele effects
B <- matrix(data = c(-1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1), nrow = 8, ncol = 2, byrow = FALSE)
# set.seed to ensure reproducibility
set.seed(2018-01-30)
Sig <- calc_Sigma(Vg = diag(2), Ve = diag(2), kinship = kinship[[2]])
# call to sim1
Ypre <- sim1(X = X, B = B, Sigma = Sig)
Y <- matrix(Ypre, nrow = 261, ncol = 2, byrow = FALSE)
rownames(Y) <- rownames(pp)
colnames(Y) <- c("tr1", "tr2")
```
Let's perform univariate QTL mapping for each of the two traits in the Y matrix.
```{r 1d-scans}
s1 <- scan1(genoprobs = pr, pheno = Y, kinship = kinship)
```
Here is a plot of the results.
```{r 1d-lod-plots, include=FALSE}
plot(s1, DOex$pmap)
plot(s1, DOex$pmap, lod=2, col="violetred", add=TRUE)
legend("topleft", colnames(s1), lwd=2, col=c("darkslateblue", "violetred"), bg="gray92")
```
```{r, echo = FALSE}
knitr::include_graphics("https://raw.githubusercontent.com/fboehm/qtl2pleio/master/man/figures/README-1d-lod-plots-1.png")
```
And here are the observed QTL peaks with LOD > 8.
```{r find-peaks}
find_peaks(s1, map = DOex$pmap, threshold=8)
```
### Perform two-dimensional scan as first step in pleiotropy vs. separate QTL hypothesis test
We now have the inputs that we need to do a pleiotropy vs. separate QTL test. We have the founder allele dosages for one chromosome, *i.e.*, Chr 3, in the R object `pp`, the matrix of two trait measurements in `Y`, and a LOCO-derived kinship matrix, `kinship[[2]]`.
```{r 2d-scan}
out <- suppressMessages(scan_pvl(probs = pp,
pheno = Y,
kinship = kinship[[2]], # 2nd entry in kinship list is Chr 3
start_snp = 38,
n_snp = 25
))
```
### Create a profile LOD plot to visualize results of two-dimensional scan
To visualize results from our two-dimensional scan, we calculate profile LOD for each trait. The code below makes use of the R package `ggplot2` to plot profile LODs over the scan region.
```{r profile-plot, include = TRUE}
library(dplyr)
out %>%
calc_profile_lods() %>%
add_pmap(pmap = DOex$pmap$`3`) %>%
ggplot() + geom_line(aes(x = marker_position, y = profile_lod, colour = trait))
```
### Calculate the likelihood ratio test statistic for pleiotropy v separate QTL
We use the function `calc_lrt_tib` to calculate the likelihood ratio test statistic value for the specified traits and specified genomic region.
```{r lrt-calc}
(lrt <- calc_lrt_tib(out))
```
### Bootstrap analysis to get p-values
Before we call `boot_pvl`, we need to identify the index (on the chromosome under study) of the marker that maximizes the likelihood under the pleiotropy constraint. To do this, we use the `qtl2pleio` function `find_pleio_peak_tib`.
```{r get-pleio-index}
(pleio_index <- find_pleio_peak_tib(out, start_snp = 38))
```
```{r boot}
set.seed(2018-11-25) # set for reproducibility purposes.
b_out <- suppressMessages(boot_pvl(probs = pp,
pheno = Y,
pleio_peak_index = pleio_index,
kinship = kinship[[2]], # 2nd element in kinship list is Chr 3
nboot = 10,
start_snp = 38,
n_snp = 25
))
```
```{r pval}
(pvalue <- mean(b_out >= lrt))
```
## Citation information
```{r cite}
citation("qtl2pleio")
```
Owner
- Name: Frederick Boehm
- Login: fboehm
- Kind: user
- Location: Ann Arbor, Michigan, USA
- Company: University of Michigan
- Website: https://fboehm.us/
- Repositories: 55
- Profile: https://github.com/fboehm
I study biostatistics, with a focus in statistical genetics. I strive to understand how our genes influence our health and biology.
JOSS Publication
qtl2pleio: Testing pleiotropy vs. separate QTL in multiparental populations
Published
June 30, 2019
Volume 4, Issue 38, Page 1435
Authors
Tags
qtl2 genetics systems genetics multiparental populationsCodeMeta (codemeta.json)
{
"@context": [
"https://doi.org/10.5063/schema/codemeta-2.0",
"http://schema.org"
],
"@type": "SoftwareSourceCode",
"identifier": "qtl2pleio",
"description": "We implement an\n adaptation of Jiang & Zeng's (1995) <https://www.genetics.org/content/140/3/1111> likelihood ratio test for testing\n the null hypothesis of pleiotropy against the alternative hypothesis,\n two separate quantitative trait loci. The test differs from that in Jiang & Zeng (1995) <https://www.genetics.org/content/140/3/1111> \n and that in Tian et al. (2016) <doi:10.1534/genetics.115.183624> in\n that our test accommodates multiparental populations.",
"name": "qtl2pleio: Testing Pleiotropy in Multiparental Populations",
"codeRepository": "https://github.com/fboehm/qtl2pleio",
"issueTracker": "https://github.com/fboehm/qtl2pleio/issues",
"license": "https://spdx.org/licenses/MIT",
"version": "1.4.3",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.0.3 (2020-10-10)",
"author": [
{
"@type": "Person",
"givenName": "Frederick J",
"familyName": "Boehm",
"email": "frederick.boehm@gmail.com",
"@id": "https://orcid.org/0000-0002-1644-5931"
}
],
"maintainer": [
{
"@type": "Person",
"givenName": "Frederick J",
"familyName": "Boehm",
"email": "frederick.boehm@gmail.com",
"@id": "https://orcid.org/0000-0002-1644-5931"
}
],
"softwareSuggestions": [
{
"@type": "SoftwareApplication",
"identifier": "covr",
"name": "covr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=covr"
},
{
"@type": "SoftwareApplication",
"identifier": "mvtnorm",
"name": "mvtnorm",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=mvtnorm"
},
{
"@type": "SoftwareApplication",
"identifier": "knitr",
"name": "knitr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=knitr"
},
{
"@type": "SoftwareApplication",
"identifier": "rmarkdown",
"name": "rmarkdown",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rmarkdown"
},
{
"@type": "SoftwareApplication",
"identifier": "testthat",
"name": "testthat",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=testthat"
},
{
"@type": "SoftwareApplication",
"identifier": "broman",
"name": "broman",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=broman"
},
{
"@type": "SoftwareApplication",
"identifier": "devtools",
"name": "devtools",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=devtools"
},
{
"@type": "SoftwareApplication",
"identifier": "qtl2",
"name": "qtl2",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=qtl2"
},
{
"@type": "SoftwareApplication",
"identifier": "parallelly",
"name": "parallelly",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=parallelly"
}
],
"softwareRequirements": [
{
"@type": "SoftwareApplication",
"identifier": "R",
"name": "R",
"version": ">= 3.2"
},
{
"@type": "SoftwareApplication",
"identifier": "dplyr",
"name": "dplyr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=dplyr"
},
{
"@type": "SoftwareApplication",
"identifier": "gemma2",
"name": "gemma2",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=gemma2"
},
{
"@type": "SoftwareApplication",
"identifier": "ggplot2",
"name": "ggplot2",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=ggplot2"
},
{
"@type": "SoftwareApplication",
"identifier": "magrittr",
"name": "magrittr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=magrittr"
},
{
"@type": "SoftwareApplication",
"identifier": "MASS",
"name": "MASS",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=MASS"
},
{
"@type": "SoftwareApplication",
"identifier": "Rcpp",
"name": "Rcpp",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=Rcpp"
},
{
"@type": "SoftwareApplication",
"identifier": "rlang",
"name": "rlang",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rlang"
},
{
"@type": "SoftwareApplication",
"identifier": "tibble",
"name": "tibble",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=tibble"
},
{
"@type": "SoftwareApplication",
"identifier": "parallel",
"name": "parallel"
}
],
"releaseNotes": "https://github.com/fboehm/qtl2pleio/blob/master/NEWS.md",
"readme": "https://github.com/fboehm/qtl2pleio/blob/master/README.md",
"contIntegration": [
"https://travis-ci.org/fboehm/qtl2pleio",
"https://codecov.io/github/fboehm/qtl2pleio?branch=master"
],
"keywords": [
"quantitative-trait",
"quantitative-genetics",
"multiparental-populations"
],
"contributor": {},
"copyrightHolder": {},
"funder": {},
"developmentStatus": "https://www.repostatus.org/#active",
"citation": [
{
"@type": "ScholarlyArticle",
"datePublished": "2019",
"author": [
{
"@type": "Person",
"givenName": [
"Frederick",
"J."
],
"familyName": "Boehm"
},
{
"@type": "Person",
"givenName": [
"Elissa",
"J."
],
"familyName": "Chesler"
},
{
"@type": "Person",
"givenName": [
"Brian",
"S."
],
"familyName": "Yandell"
},
{
"@type": "Person",
"givenName": [
"Karl",
"W."
],
"familyName": "Broman"
}
],
"name": "Testing pleiotropy vs. separate QTL in multiparental populations",
"url": "https://www.g3journal.org/content/9/7/2317",
"isPartOf": {
"@type": "PublicationIssue",
"datePublished": "2019",
"isPartOf": {
"@type": [
"PublicationVolume",
"Periodical"
],
"volumeNumber": "9",
"name": "G3"
}
}
}
],
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"fileSize": "66291.722KB",
"relatedLink": "https://CRAN.R-project.org/package=qtl2pleio"
}
Papers & Mentions
Total mentions: 2
Testing Pleiotropy <i>vs.</i> Separate QTL in Multiparental Populations
- DOI: 10.1534/g3.119.400098
- OpenAlex ID: https://openalex.org/W2952477575
- Published: July 2019
Last synced: 4 months ago
qtl2pleio: Testing pleiotropy vs. separate QTL in multiparental populations
- DOI: 10.21105/joss.01435
- OpenAlex ID: https://openalex.org/W2953715979
- Published: June 2019
Last synced: 4 months ago
GitHub Events
Total
Last Year
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Frederick Boehm | f****m@g****m | 627 |
| Karl Broman | k****n@g****m | 7 |
| Kyle Niemeyer | k****r@g****m | 1 |
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 43
- Total pull requests: 3
- Average time to close issues: about 1 month
- Average time to close pull requests: 26 minutes
- Total issue authors: 2
- Total pull request authors: 2
- Average comments per issue: 1.28
- Average comments per pull request: 1.0
- Merged pull requests: 3
- 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
- fboehm (39)
- HongHe0123 (4)
Pull Request Authors
- kbroman (2)
- kyleniemeyer (1)
Top Labels
Issue Labels
enhancement (10)
bug (5)
good first issue (4)
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 244 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 4
- Total maintainers: 1
cran.r-project.org: qtl2pleio
Testing Pleiotropy in Multiparental Populations
- Homepage: https://github.com/fboehm/qtl2pleio
- Documentation: http://cran.r-project.org/web/packages/qtl2pleio/qtl2pleio.pdf
- License: MIT + file LICENSE
-
Latest release: 1.4.3
published about 5 years ago
Rankings
Forks count: 21.9%
Stargazers count: 24.2%
Dependent packages count: 29.8%
Average: 34.2%
Dependent repos count: 35.5%
Downloads: 59.7%
Maintainers (1)
Last synced:
6 months ago
Dependencies
DESCRIPTION
cran
- R >= 3.2 depends
- MASS * imports
- Rcpp * imports
- dplyr * imports
- gemma2 * imports
- ggplot2 * imports
- magrittr * imports
- parallel * imports
- rlang * imports
- tibble * imports
- broman * suggests
- covr * suggests
- devtools * suggests
- knitr * suggests
- mvtnorm * suggests
- parallelly * suggests
- qtl2 * suggests
- rmarkdown * suggests
- testthat * suggests
