Composite interval mapping (CIM) is the dominating algorithm used in QTL analysis of various phenotypes in experimental populations. With the development of next-generation sequening, genotyping of SNPs became much easier, which leads to the development of binmap. In binmap, the distance between adjacent markers were zero. As a result, the concept of "interval mapping" doesn't make sense in binmap. The binQTL package is designed to perform QTL analysis with binmap. In this vignette, we will rely on three simple, illustrative example datasets to explain the usage of binQTL.
To use the binQTL package, we need to load it into R first.
library(binQTL)
The phenotype in the first example dataset is the 1000-grain weight of 210 recombinant inbred lines (RIL) in the year of 1999. The genetic map of the 210 RILs is a binmap composed of 1619 bins.
The phenotype file for the binQTL package should be a text file containing two columns. The first column is the identifier of all accessions while the second column contains the phenotypic value of specific trait for each accession. The column names of this file can be any characters specified by the User.
ril.phe <- read.csv(system.file("examples/ril.phe.csv", package="binQTL"), as.is=T) dim(ril.phe) head(ril.phe) par(mar = c(5, 4, 1, 1)) hist(ril.phe[, 2], breaks=40, xlab="KGW (1999)", main="")
The genotype file for the binQTL package should be a text file containing multiple columns and rows. Each row of this file is a bin. The first four columns contain the information of each bin including the identifier, the chromosome, the start coordinate and the end coordinate. The names of the first four columns should be "Bin", "Chr", "Start" and "Stop". Each of the rest columns gives the genotype of each accession at different bins. The names of the rest columns can be any characters specified by the User.
ril.geno <- read.csv(system.file("examples/ril.geno.csv", package="binQTL"), as.is=T) dim(ril.geno) ril.geno[1:2, 1:9] ## Not run # par(mar = c(3, 4, 1, 1)) # plotBinmap(ril.geno, xlab="Genomic position", ylab="RILs", cex.axis=0.6) ## Not run
qtl.res.1 <- aovQTL(phenotype = ril.phe, genotype = ril.geno) head(qtl.res.1)
qtl.res.2 <- binQTLScan(phenotype = ril.phe, genotype = ril.geno, population="RIL") head(qtl.res.2)
Let's get a glimpse of the QTL mapping results of different algorithms.
par(mar = c(3, 4, 2, 1)) par(mfrow=c(2, 1)) plotQTL(qtl.res.1[, c(1:4, 6)], main="ANOVA", cex.axis=0.6, ylab=expression(-log[10](p))) plotQTL(qtl.res.2[, c(1:4, 6)], main="binQTL", cex.axis=0.6, ylab=expression(-log[10](p)))
The phenotype in the second example dataset is the 1000-grain weight of 278 immortalized F2 (IMF2) in the year of 1999. The genetic map of the 278 IMF2s is a binmap composed of 1619 bins.
imf2.phe <- read.csv(system.file("examples/imf2.phe.csv", package="binQTL"), as.is=T) dim(imf2.phe) head(imf2.phe) par(mar = c(5, 4, 1, 1)) hist(imf2.phe[, 2], breaks=40, xlab="KGW (1999)", main="")
imf2.geno <- read.csv(system.file("examples/imf2.geno.csv", package="binQTL"), as.is=T) dim(imf2.geno) imf2.geno[1:2, 1:9] ## Not run # par(mar = c(3, 4, 1, 1)) # plotBinmap(imf2.geno, xlab="Genomic position", ylab="IMF2s", cex.axis=0.6) ## Not run
qtl.res.3 <- aovQTL(phenotype = imf2.phe, genotype = imf2.geno) head(qtl.res.3)
qtl.res.4 <- binQTLScan(phenotype = imf2.phe, genotype = imf2.geno, population="F2") head(qtl.res.4)
Let's get a glimpse of the QTL mapping results of different algorithms.
par(mar = c(3, 4, 2, 1)) par(mfrow=c(2, 1)) plotQTL(qtl.res.3[, c(1:4, 6)], main="ANOVA", cex.axis=0.6, ylab=expression(-log[10](p))) plotQTL(qtl.res.4[, c(1:4, 6)], main="binQTL", cex.axis=0.6, ylab=expression(-log[10](p)))
The phenotype in the third example dataset is a simulated data value of 458 mice constituting a MAGIC population with 8 parents. The genetic map of the 458 mice is a binmap composed of 6683 bins. Each bin is represented by 8 sequential lines in the genetic map. The genotype code for a heterozygote individual carrying the genome material from the 3rd and the 4th parents should be [0 0 1 1 0 0 0 0]. The genotype code for a homozygote individual carrying both copies of the genome from the first parent should be [2 0 0 0 0 0 0 0].
magic.phe <- read.csv(system.file("examples/magic.phe.csv", package="binQTL"), as.is=T) dim(magic.phe) head(magic.phe) par(mar = c(5, 4, 1, 1)) hist(magic.phe[, 2], breaks=40, xlab="458 mice", main="")
load(system.file("examples/magic.geno.RData", package="binQTL")) dim(magic.geno) magic.geno[1:9, 1:9]
qtl.res.4 <- binQTLScan(phenotype = magic.phe, genotype = magic.geno, population="MAGIC") head(qtl.res.4) plotQTL(qtl.res.4[, -5], main="binQTL result for a mouse MAGIC population", cex.axis=0.9, ylab=expression(-log[10](p)))
The version number of R and packages loaded for generating the vignette were:
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.