MyNixOS website logo
Description

Joint Mapping for Quantitative Trait Loci.

A comprehensive computational framework for joint mapping, developed by Li (2016) <doi:10.11841/j.issn.1007-4333.2016.06.002>, supports quantitative trait locus detection in structured genetic populations. It integrates robust phenotype summarization, computes genotype probabilities, and imputes missing markers for association and linkage mapping. Empirical significance thresholds are estimated via permutation testing coupled with stepwise regression. The framework enables genome-wide scans under both univariate and multivariate trait models, streamlining the discovery of complex genetic architectures.

JM4QTN: Joint Mapping for Quantitative Trait Loci

R-CMD-check License: GPL v2

Overview

JM4QTN supports joint mapping and related analyses for quantitative trait loci (QTL). The package provides phenotype summaries, genotype probability and imputation (association vs linkage mapping), permutation-based thresholds with stepwise regression (via StepReg), and scan statistics comparing full vs reduced linear models (joint_map).

Key Features

Core analysis

  • Permutation testing (permutation_test) for empirical p-value and LOD cutoffs under stepwise selection
  • Skeleton model (skeleton_build / skeletion_build) fitting the selected model using those cutoffs
  • Joint mapping scan (joint_map) over candidate terms vs the skeleton model

Genotypes and map

  • Genotype probabilities / imputation (genotype_prob) for AM or LM, optional virtual markers
  • Expected genotype distribution (expected_genotype_dist) and genotype frequencies (genotype_freq)
  • Haldane map (haldane_map) for recombination

Phenotypes

  • Phenotype statistics (pheno_stats): normality, ANOVA, least squares means (via lsmeans)

Installation

# Install from GitHub
if (!require("devtools")) install.packages("devtools")
devtools::install_github("JunhuiLi1017/JM4QTN")

## or install from CRAN
install.pakcages("JM4QTN")

# Load the package
library(JM4QTN)

Quick start

1. Phenotype analysis (pheno_stats)

Designed for multi-environment trials: columns E, B, R, G, then traits.

pheno_data <- data.frame(
  E = rep(c("Env1", "Env2"), each = 60),
  B = rep(c("B1", "B2"), each = 30, times = 2),
  R = rep(1:5, 24),
  G = factor(rep(1:12, 10)),
  Height = rnorm(120, 175, 8),
  Weight = rnorm(120, 75, 12)
)

results <- pheno_stats(pheno_data)
results$Height$normality_test
results$Height$ANOVA
results$Height$lsmeans

2. Genotype probabilities (genotype_prob)

genetic_map <- data.frame(
  marker = c("M1", "M2", "M3"),
  chr = c(1, 1, 1),
  pos = c(0, 10, 20)
)
geno_data <- matrix(sample(0:2, 15, TRUE), nrow = 5, ncol = 3,
                    dimnames = list(paste0("Ind", 1:5), c("M1", "M2", "M3")))

result_am <- genotype_prob(genetic_map, geno_data, method = "AM")
result_lm <- genotype_prob(genetic_map, geno_data, method = "LM",
                           croType = "F2", steps = 0)

3. Permutation thresholds, skeleton model, and joint mapping

Formula-based workflow with genotype columns bound into data (see package examples for joint_map).

pheno_data <- data.frame(
  Trait1 = rnorm(100, 100, 15),
  Trait2 = rnorm(100, 50, 8),
  Popu = rep(c("Pop1", "Pop2"), each = 50)
)
geno_data <- matrix(sample(0:2, 100 * 50, TRUE), nrow = 100, ncol = 50)
colnames(geno_data) <- paste0("M", 1:50)
data1 <- cbind(pheno_data, geno_data)

terms <- c("Popu", paste0(colnames(geno_data), ":Popu"))
formula1 <- reformulate(terms, response = "Trait1")

cut_off_list <- permutation_test(formula1, data1, n = 100, alpha = 0.1)

skeleton <- skeleton_build(
  formula1, data1,
  strategy = "bidirection", metric = "SL",
  cut_off_list = cut_off_list
)

results <- joint_map(
  formula1, data1, skeleton,
  include = "Popu", cut_off_list = cut_off_list
)
results$p_value
results$lod

4. Supporting utilities

haldane_map(0.1)   # genetic distance (Morgan) -> recombination fraction
genotype_freq("Fn", generation = 3, genotype_index = 1, recomb_aq = 0.1, recomb_qb = 0.2)
expected_genotype_dist("22", "F2", Gn = 2, x = 0.1, y = 0.2)

Function reference (exported)

FunctionDescription
joint_map()Compare candidate model terms to a fitted skeleton; returns p-values and LOD-like statistics
permutation_test()Permutation distribution and empirical cutoffs for stepwise linear models
skeleton_build()Alias for skeletion_build() (preferred spelling)
skeletion_build()Fit stepwise skeleton using permutation p-value as StepReg entry/stay levels
genotype_prob()Genotype probabilities / imputation (AM or LM)
genotype_freq()Genotype class frequencies by cross type and generation
expected_genotype_dist()Expected genotype distribution by marker pattern and cross
haldane_map()Haldane mapping function
pheno_stats()Normality tests, ANOVA, lsmeans for structured phenotype tables

Backward-compatible names (same package, alternate spelling): calculate_genotype_frequencies, calculate_expected_genotype_distribution, haldane_mapping_function — see individual help pages.

Data notes

  • pheno_stats: expects E, B, R, G as the first four columns, then traits.
  • genotype_prob: rows = individuals, columns = markers; column order must align with GeneticMap rows.
  • joint_map / permutation_test: supply a single data frame containing phenotypes, population, and numeric genotype columns used in the formula.

Citation

@Manual{JM4QTN,
  title = {JM4QTN: Joint Mapping for Quantitative Trait Loci},
  author = {Junhui Li and Wenxin Liu},
  year = {2026},
  note = {R package version 1.0.0},
  url = {https://github.com/JunhuiLi1017/JM4QTN}
}

References

  • Jiang, C. and Zeng, Z.B. (1995). Multiple trait analysis of genetic mapping for quantitative trait loci. Genetics, 140(3), 1111-1127.
  • Churchill, G.A. and Doerge, R.W. (1994). Empirical threshold values for quantitative trait mapping. Genetics, 138(3), 963-971.
  • Haldane, J.B.S. (1919). The combination of linkage values and the calculation of distances between the loci of linked factors. Journal of Genetics, 8(3), 299-309.

Contributing

Issues and pull requests are welcome on GitHub.

License

This project is licensed under the GNU General Public License v2.0 - see the GNU GPLv2 license text for details.

Contact

Metadata

Version

1.0.0

License

Unknown

Platforms (80)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows