Title: | Correlated Trait Locus Mapping |
---|---|
Description: | Identification and network inference of genetic loci associated with correlation changes in quantitative traits (called correlated trait loci, CTLs). Arends et al. (2016) <doi:10.21105/joss.00087>. |
Authors: | Danny Arends <[email protected]>, Yang Li, Gudrun A Brockmann, Ritsert C Jansen, Robert W Williams, and Pjotr Prins |
Maintainer: | Danny Arends <[email protected]> |
License: | GPL-3 |
Version: | 1.0.0-10 |
Built: | 2024-11-12 06:28:42 UTC |
Source: | CRAN |
Analysis of experimental crosses to identify genetic markers associated with correlation changes in quantitative traits (CTL). The additional correlation information obtained can be combined with QTL information to perform de novo reconstruction of interaction networks.
For more background information about the method we refer to the methodology article published in XX (201X).
The R package is a basic iomplementation and it includes the following core functionality:
CTLscan
- Main function to scan for CTL.
CTLsignificant
- Significant interactions from a CTLscan
.
CTLnetwork
- Create a CTL network from a CTLscan
.
image.CTLobject
- Heatmap overview of a CTLscan.
plot.CTLscan
- Plot the CTL curve for a single trait.
ctl.circle
- Circle plot CTLs on single and multiple traits.
ctl.lineplot
- Line plot CTLs on single and multiple traits.
CTLprofiles
- Extract CTL interaction profiles.
For all these functions we also provide examples and demonstrations on real genetical genomics data. We thank all contributors for publishing their data online and will accept submissions of intrestion datasets, currently ctl provides:
ath.metabolites
- Metabolite expression data from Arabidopsis Thaliana
ath.churchill
- Metabolite expression data from Arabidopsis Thaliana
yeast.brem
- Gene expression data from Saccharomyces cerevisiae
More detailed information and/or examples are given per function as needed. Some additional functionality:
basic.qc
- Some basic quality checks for phenotype and genotype data
CTLscan.cross
- Use an R/qtl cross object with CTLscan
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
Contributions from: Bruno Tesson, Pjotr Prins and Ritsert C. Jansen
TODO
CTLscan
- Scan for CTL
CTLscan.cross
- Use an R/qtl cross object with CTLscan
Arabidopsis recombinant inbred lines by selfing. There are 403 lines, 9 phenotypes, and 69 markers on 5 chromosomes stored as a list with 3 matrices: genotypes, phenotypes, map
data(ath.churchill)
data(ath.churchill)
Data stored in a list holding 3 matrices genotypes, phenotypes and map
Arabidopsis recombinant inbred lines by selfing. There are 403 lines, 9 metabolic phenotypes, and 69 markers on 5 chromosomes.
Arabidopsis Bay-0 x Sha metabolite data from XX, senior author: Gary Churchill 2012, Published in: Plos
TODO
library(ctl) data(ath.churchill) # Arabidopsis thaliana dataset ath.gary$genotypes[1:5, 1:5] # ath.gary is the short name ath.gary$phenotypes[1:5, 1:5] ath.gary$map[1:5, ]
library(ctl) data(ath.churchill) # Arabidopsis thaliana dataset ath.gary$genotypes[1:5, 1:5] # ath.gary is the short name ath.gary$phenotypes[1:5, 1:5] ath.gary$map[1:5, ]
Arabidopsis recombinant inbred lines by selfing. There are 162 lines, 24 phenotypes, and 117 markers on 5 chromosomes stored as a list with 3 matrices: genotypes, phenotypes, map
data(ath.metabolites)
data(ath.metabolites)
Data stored in a list holding 3 matrices genotypes, phenotypes and map
Arabidopsis recombinant inbred lines by selfing. There are 162 lines, 24 phenotypes, and 117 markers on 5 chromosomes.
Part of the Arabidopsis RIL selfing experiment with Landsberg Erecta (Ler) and Cape Verde Islands (Cvi) with 162 individuals scored (with errors) at 117 markers. Dataset obtained from GBIC - Groningen BioInformatics Centre, University of Groningen.
Keurentjes, J. J. and Fu, J. and de Vos, C. H. and Lommen, A. and Hall, R. D. and Bino, R. J. and van der Plas, L. H. and Jansen, R. C. and Vreugdenhil, D. and Koornneef, M. (2006), The genetics of plant metabolism. Nature Genetics. 38-7, 842–849.
Alonso-Blanco, C. and Peeters, A. J. and Koornneef, M. and Lister, C. and Dean, C. and van den Bosch, N. and Pot, J. and Kuiper, M. T. (1998), Development of an AFLP based linkage map of Ler, Col and Cvi Arabidopsis thaliana ecotypes and construction of a Ler/Cvi recombinant inbred line population. Plant J. 14(2), 259–271.
library(ctl) data(ath.metabolites) # Arabidopsis thaliana dataset ath.metab$genotypes[1:5, 1:5] # ath.metab is the short name ath.metab$phenotypes[1:5, 1:5] ath.metab$map[1:5, ]
library(ctl) data(ath.metabolites) # Arabidopsis thaliana dataset ath.metab$genotypes[1:5, 1:5] # ath.metab is the short name ath.metab$phenotypes[1:5, 1:5] ath.metab$map[1:5, ]
Results from a QCLscan on Arabidopsis recombinant inbred lines by selfing. There are 162 lines, 24 phenotypes, and 117 markers on 5 chromosomes stored as a list with 3 matrices: genotypes, phenotypes, map
data(ath.result)
data(ath.result)
Cross object from R/QTL
Results from a QCLscan on Arabidopsis recombinant inbred lines by selfing. There are 162 lines, 24 phenotypes, and 117 markers on 5 chromosomes. the QCLscan also includes 5000 permutations
Part of the Arabidopsis RIL selfing experiment with Landsberg Erecta (Ler) and Cape Verde Islands (Cvi) with 162 individuals scored (with errors) at 117 markers. Dataset obtained from GBIC - Groningen BioInformatics Centre, University of Groningen.
Keurentjes, J. J. and Fu, J. and de Vos, C. H. and Lommen, A. and Hall, R. D. and Bino, R. J. and van der Plas, L. H. and Jansen, R. C. and Vreugdenhil, D. and Koornneef, M. (2006), The genetics of plant metabolism. Nature Genetics. 38-7, 842–849.
Alonso-Blanco, C. and Peeters, A. J. and Koornneef, M. and Lister, C. and Dean, C. and van den Bosch, N. and Pot, J. and Kuiper, M. T. (1998), Development of an AFLP based linkage map of Ler, Col and Cvi Arabidopsis thaliana ecotypes and construction of a Ler/Cvi recombinant inbred line population. Plant J. 14(2), 259–271.
data(ath.result) # Arabidopsis thaliana dataset ath.result[[1]] # Print the QCLscan summary of the phenotype 1
data(ath.result) # Arabidopsis thaliana dataset ath.result[[1]] # Print the QCLscan summary of the phenotype 1
Create quality control plots, used in the examples of CTL mapping.
basic.qc(genotypes, phenotypes, map_info)
basic.qc(genotypes, phenotypes, map_info)
genotypes |
Matrix of genotypes. (individuals x markers) |
phenotypes |
Matrix of phenotypes. (individuals x phenotypes) |
map_info |
Matrix of genetic map information |
None.
None.
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
TODO
CTLscan
- Scan for CTL
plot.CTLscan
- Plot a CTLscan object
#TODO
#TODO
Plot the CTL for genome-wide CTL on multiple traits (the output of CTLscan
).
ctl.circle(CTLobject, mapinfo, phenocol, significance = 0.05, gap = 50, cex = 1, verbose = FALSE)
ctl.circle(CTLobject, mapinfo, phenocol, significance = 0.05, gap = 50, cex = 1, verbose = FALSE)
CTLobject |
An object of class |
mapinfo |
The mapinfo matrix with 3 columns: "Chr" - the chromosome number, "cM" - the location of the marker in centiMorgans and the 3rd column "Mbp" - The location of the marker in Mega basepairs. If supplied the marker names (rownames) should match those in the CTLobject. |
phenocol |
Which phenotype results to plot. Defaults to plot all phenotypes. |
significance |
Significance threshold to set a genome wide False Discovery Rate (FDR). |
gap |
Gap between chromosomes in cM. |
cex |
Global magnificantion factor for the image elements. |
verbose |
Be verbose. |
None.
None.
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
CTLscan
- Scan for CTL
CTLprofiles
- Extract CTL interaction profiles
print.CTLscan
- Print a summary of a CTLscan
par
- Plot parameters
colors
- Colors used in plotting
library(ctl) data(ath.result) # Arabidopsis Thaliana results data(ath.metabolites) # Arabidopsis Thaliana data set ctl.circle(ath.result, ath.metab$map, sign=0.001) ctl.circle(ath.result, ath.metab$map, phenocol = 1:6, sign = 0.01)
library(ctl) data(ath.result) # Arabidopsis Thaliana results data(ath.metabolites) # Arabidopsis Thaliana data set ctl.circle(ath.result, ath.metab$map, sign=0.001) ctl.circle(ath.result, ath.metab$map, phenocol = 1:6, sign = 0.01)
Plot the CTL for genome-wide CTL on multiple traits (the output of CTLscan
).
ctl.lineplot(CTLobject, mapinfo, phenocol, significance = 0.05, gap = 50, col = "orange", bg.col = "lightgray", cex = 1, verbose = FALSE)
ctl.lineplot(CTLobject, mapinfo, phenocol, significance = 0.05, gap = 50, col = "orange", bg.col = "lightgray", cex = 1, verbose = FALSE)
CTLobject |
An object of class |
mapinfo |
The mapinfo matrix with 3 columns: "Chr" - the chromosome number, "cM" - the location of the marker in centiMorgans and the 3rd column "Mbp" - The location of the marker in Mega basepairs. If supplied the marker names (rownames) should match those in the CTLobject (only significant markers will be annotated). |
phenocol |
Which phenotype results to plot. Defaults to plot all phenotypes. |
significance |
Significance threshold to set a genome wide False Discovery Rate (FDR). |
gap |
The gap between chromosomes in cM. |
col |
Line color used. |
bg.col |
Node background color. |
cex |
Global magnificantion factor for the image elements. |
verbose |
Be verbose. |
None.
None.
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
CTLscan
- Scan for CTL
CTLprofiles
- Extract CTL interaction profiles
print.CTLscan
- Print a summary of a CTLscan
par
- Plot parameters
colors
- Colors used in plotting
require(ctl) data(ath.result) # Arabidopsis Thaliana results data(ath.metabolites) # Arabidopsis Thaliana data set todo <- c(1,3,4,5,6,8,9,10,11,12,14,17,18,19,22,23) op <- par(mfrow = c(4,4)) op <- par(oma = c(0.1,0.1,0.1,0.1)) op <- par(mai = c(0.1,0.1,0.1,0.1)) for(x in todo){ # Overview of the 16 traits with CTLs ctl.lineplot(ath.result, ath.metab$map, phenocol = x, sign=0.1) }
require(ctl) data(ath.result) # Arabidopsis Thaliana results data(ath.metabolites) # Arabidopsis Thaliana data set todo <- c(1,3,4,5,6,8,9,10,11,12,14,17,18,19,22,23) op <- par(mfrow = c(4,4)) op <- par(oma = c(0.1,0.1,0.1,0.1)) op <- par(mai = c(0.1,0.1,0.1,0.1)) for(x in todo){ # Overview of the 16 traits with CTLs ctl.lineplot(ath.result, ath.metab$map, phenocol = x, sign=0.1) }
Load CTLs calculated by the D2.0 version
ctl.load(genotypes = "ngenotypes.txt", phenotypes = "nphenotypes.txt", output = "ctlout", from=1, to, verbose = FALSE)
ctl.load(genotypes = "ngenotypes.txt", phenotypes = "nphenotypes.txt", output = "ctlout", from=1, to, verbose = FALSE)
genotypes |
Original datafile containing the genotypes scanned. |
phenotypes |
Original datafile containing the phenotypes scanned. |
output |
Directory containing the output files. |
from |
Start loading at which phenotype. |
to |
Continue loading untill this phenotype. |
verbose |
Be verbose. |
TODO
CTLobject, a list with at each index a CTLscan object:
$ctls - Matrix of differential correlation scores for each trait at each marker
$qtl - Vector of QTL lodscores for each marker (if a QTL scan was perfomed -qtl)
$p - Vector of maximum scores per marker obtained during permutations
$l - Matrix of LOD scores for CTL likelihood
TODO
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
TODO
library(ctl) # Load CTL library
library(ctl) # Load CTL library
Helper functions for Correlated Trait Locus (CTL) mapping
ctl.names(CTLobject) ctl.qtlmatrix(CTLobject) ctl.name(CTLscan) ctl.ctlmatrix(CTLscan) ctl.dcormatrix(CTLscan) ctl.qtlprofile(CTLscan)
ctl.names(CTLobject) ctl.qtlmatrix(CTLobject) ctl.name(CTLscan) ctl.ctlmatrix(CTLscan) ctl.dcormatrix(CTLscan) ctl.qtlprofile(CTLscan)
CTLobject |
An object of class |
CTLscan |
An object of class |
TODO
TODO
TODO
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
TODO
#TODO
#TODO
Scan for correlated trait loci (CTL)
CTLmapping(genotypes, phenotypes, phenocol = 1, nperm = 100, nthreads = 1, strategy = c("Exact", "Full", "Pairwise"), adjust = TRUE, qtl = TRUE, verbose = FALSE)
CTLmapping(genotypes, phenotypes, phenocol = 1, nperm = 100, nthreads = 1, strategy = c("Exact", "Full", "Pairwise"), adjust = TRUE, qtl = TRUE, verbose = FALSE)
genotypes |
Matrix of genotypes. (individuals x markers) |
phenotypes |
Matrix of phenotypes. (individuals x phenotypes) |
phenocol |
Which phenotype column(s) should we analyse. Default: Analyse a single phenotype. |
nperm |
Number of permutations to perform. This parameter is not used when method="Exact". |
nthreads |
Number of CPU cores to use during the analysis. |
strategy |
The permutation strategy to use, either
Note: Exact is the default and fastest option it uses a normal distribution for estimating p-values and uses bonferoni correction. It has however the least power to detect CTLs, the two other methods (Full and Pairwise) perform permutations to assign significance. |
adjust |
Adjust p-values for multiple testing (only used when strategy = Exact). |
qtl |
Use the internal slow QTL mapping method to map QTLs. |
verbose |
Be verbose. |
TODO
NOTE: Main bottleneck of the algorithm is the RAM available to the system
CTLscan, a list of:
$dcor - Matrix of differential correlation scores for each trait at each marker
$perms - Vector of maximums per marker obtained during permutations
$ctls - Matrix of LOD scores for CTL likelihood
TODO
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
TODO
CTLscan
- Main function to scan for CTL
CTLscan.cross
- Use an R/qtl cross object with CTLscan
CTLsignificant
- Significant interactions from a CTLscan
plot.CTLscan
- Plot the CTL curve for a single trait
library(ctl) data(ath.metabolites) # Arabidopsis Thaliana dataset singlescan <- CTLmapping(ath.metab$genotypes, ath.metab$phenotypes, phenocol = 23) plot(singlescan) # Plot the results of the CTL scan for the phenotype summary <- CTLsignificant(singlescan) summary # Get a list of significant CTLs
library(ctl) data(ath.metabolites) # Arabidopsis Thaliana dataset singlescan <- CTLmapping(ath.metab$genotypes, ath.metab$phenotypes, phenocol = 23) plot(singlescan) # Plot the results of the CTL scan for the phenotype summary <- CTLsignificant(singlescan) summary # Get a list of significant CTLs
Create a file containing the interaction network from a genome-wide CTLscan of multiple traits.
CTLnetwork(CTLobject, mapinfo, significance = 0.05, LODdrop = 2, what = c("names", "ids"), short = FALSE, add.qtls = FALSE, file = "", verbose = TRUE)
CTLnetwork(CTLobject, mapinfo, significance = 0.05, LODdrop = 2, what = c("names", "ids"), short = FALSE, add.qtls = FALSE, file = "", verbose = TRUE)
CTLobject |
An object of class |
mapinfo |
The mapinfo matrix with 3 columns: "Chr" - the chromosome number, "cM" - the location of the marker in centiMorgans and the 3rd column "Mbp" - The location of the marker in Mega basepairs. If supplied the marker names (rownames) should match those in the CTLobject (only significant markers will be annotated). |
significance |
Significance threshold for a genome wide false discovery rate (FDR). |
LODdrop |
Drop in LOD score needed before we assign an edge type. |
what |
Return trait and marker names or column numbers (for indexing). |
short |
Edges are markers when TRUE, otherwise markers are nodes (default). |
add.qtls |
Should marker QTL trait interactions be added to the generated sif network file, QTLs are included when they are above -log10(significance/n.markers). |
file |
A connection, or a character string naming the file to print to. If "" (the default), CTLnetwork prints to the standard output connection, the console unless redirected by sink. |
verbose |
Be verbose. |
Outputs a sif network file, and a node attribute file:
ctlnet<FILE>.sif - Shows CTL connections from Trait to Marker with edge descriptions
ctlnet<FILE>.nodes - Attributes of the nodes (Traits and Genetic markers) nodes to this file can be used to either color chromosomes, or add chromosome locations.
A matrix with significant CTL interactions and information in 5 Columns:
TRAIT1 - Trait ID of the origin trait
MARKER - Marker ID at which the CTL was found
TRAIT2 - Trait ID of the target trait
LOD_C - LOD score of the CTL interaction
CAUSAL - Type of edge determined by QTL LOD-drop:
NA - CTL/QTL for TRAIT1 and/or TRAIT2 not found
-1 - TRAIT1 is DOWNSTREAM of TRAIT2
0 - UNDETERMINED Edge
1 - TRAIT1 is UPSTREAM of TRAIT2
LOD_T1 - QTL LOD-score of TRAIT1 at MARKER
LOD_T2 - QTL LOD-score of TRAIT2 at MARKER
TODO
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
TODO
library(ctl) data(ath.result) # Arabidopsis Thaliana results data(ath.metabolites) # Arabidopsis Thaliana data set ctls <- CTLnetwork(ath.result, significance = 0.1) op <- par(mfrow = c(2,1)) plot(ctls) ctl.lineplot(ath.result, ath.metab$map, significance=0.1)
library(ctl) data(ath.result) # Arabidopsis Thaliana results data(ath.metabolites) # Arabidopsis Thaliana data set ctls <- CTLnetwork(ath.result, significance = 0.1) op <- par(mfrow = c(2,1)) plot(ctls) ctl.lineplot(ath.result, ath.metab$map, significance=0.1)
Extract the CTL interaction profiles: phenotype x marker (p2m matrix)
and phenotype x phenotype (p2p matrix) from a CTLscan
.
CTLprofiles(CTLobject, against = c("markers","phenotypes"), significance = 0.05, verbose=FALSE)
CTLprofiles(CTLobject, against = c("markers","phenotypes"), significance = 0.05, verbose=FALSE)
CTLobject |
An object of class |
against |
Plot the CTL against either: markers or phenotypes. |
significance |
Significance threshold to set a genome wide False Discovery Rate (FDR). |
verbose |
Be verbose. |
These matrices can be combined with QTL information to perform de novo reconstruction of interaction networks.
The 'against' parameter is by default set to "markers" which returns a phenotype x markers matrix (p2m matrix), which should be comparible to the QTL profiles of the traits.
When the 'against' parameter is set to "phenotypes" a phenotype x phenotype matrix (p2p matrix) is returned, showing the interactions between the phenotypes.
Matrix: phenotypes x marker or phenotypes x phenotypes
TODO
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
TODO
library(ctl) # Load CTL library data(ath.result) # Arabidopsis Thaliana results p2m_matrix <- CTLprofiles(ath.result, against="markers") p2p_matrix <- CTLprofiles(ath.result, against="phenotypes")
library(ctl) # Load CTL library data(ath.result) # Arabidopsis Thaliana results p2m_matrix <- CTLprofiles(ath.result, against="markers") p2p_matrix <- CTLprofiles(ath.result, against="phenotypes")
Get all significant interactions from a genome-wide CTLscan.
CTLregions(CTLobject, mapinfo, phenocol = 1, significance = 0.05, verbose = TRUE)
CTLregions(CTLobject, mapinfo, phenocol = 1, significance = 0.05, verbose = TRUE)
CTLobject |
An object of class |
mapinfo |
The mapinfo matrix with 3 columns: "Chr" - the chromosome number, "cM" - the location of the marker in centiMorgans and the 3rd column "Mbp" - The location of the marker in Mega basepairs. If supplied the marker names (rownames) should match those in the CTLobject. |
phenocol |
Which phenotype column should we analyse. |
significance |
Significance threshold to set a genome wide False Discovery Rate (FDR). |
verbose |
Be verbose. |
TODO
A matrix significant CTL interactions with 4 columns: trait, marker, trait, lod
TODO
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
TODO
library(ctl) data(ath.metabolites) # Arabidopsis Thaliana data set data(ath.result) # Arabidopsis Thaliana CTL results regions <- CTLregions(ath.result, ath.metab$map)
library(ctl) data(ath.metabolites) # Arabidopsis Thaliana data set data(ath.result) # Arabidopsis Thaliana CTL results regions <- CTLregions(ath.result, ath.metab$map)
Scan for Correlated Trait Locus (CTL) in populations
CTLscan(genotypes, phenotypes, phenocol, nperm=100, nthreads = 1, strategy = c("Exact", "Full", "Pairwise"), parametric = FALSE, adjust=TRUE, qtl = TRUE, verbose = FALSE)
CTLscan(genotypes, phenotypes, phenocol, nperm=100, nthreads = 1, strategy = c("Exact", "Full", "Pairwise"), parametric = FALSE, adjust=TRUE, qtl = TRUE, verbose = FALSE)
genotypes |
Matrix of genotypes. (individuals x markers) |
phenotypes |
Matrix of phenotypes. (individuals x phenotypes) |
phenocol |
Which phenotype column(s) should we analyse. Default: Analyse all phenotypes. |
nperm |
Number of permutations to perform. This parameter is not used when method="Exact". |
nthreads |
Number of CPU cores to use during the analysis. |
strategy |
The permutation strategy to use, either
Note: Exact is the default and fastest option it uses a normal distribution for estimating p-values and uses bonferoni correction. It has however the least power to detect CTLs, the two other methods (Full and Pairwise) perform permutations to assign significance. |
parametric |
Use non-parametric testing (Spearman) or parametric testing (Pearson). The DEFAULT is to use non-parametric tests which are less sensitive to outliers in the phenotype data. |
adjust |
Adjust p-values for multiple testing (only used when strategy = Exact). |
qtl |
Use the internal slow QTL mapping method to map QTLs. |
verbose |
Be verbose. |
By default the algorithm will not do QTL mapping, the qtl component of the output is an vector of 0 scores for LOD. This is to remove some computational burden, please use the have.qtls parameter to provide QTL data. Some computational bottleneck of the algorithm are:
RAM available to the system with large number of markers (100K+) and/or phenotypes (100K+).
Computational time with large sample sizes (5000+) and/or huge amount of phenotype data (100K+).
Very very huge amounts of genotype markers (1M+)
Some way of avoiding these problems are: CTL mapping using only a single chromosome at a time and / or selecting a smaller subsets of phenotype data for analysis.
CTLobject, a list with at each index (i) an CTLscan object:
$dcor - Matrix of Z scores (method=Exact), or Power/Adjacency Z scores or for each trait at each marker (n.markers x n.phenotypes)
$perms - Vector of maximum scores obtained during permutations (n.perms)
$ctl - Matrix of LOD scores for CTL likelihood of phenotype i (n.markers x n.phenotypes)
$qtl - Vector of LOD scores for QTL likelihood of phenotype i (n.markers)
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
TODO
CTLscan.cross
- Use an R/qtl cross object with CTLscan
CTLregions
- Regions with significant CTLs from a CTLscan
CTLsignificant
- Significant interactions from a CTLscan
CTLnetwork
- Create a CTL network from a CTLscan
image.CTLobject
- Heatmap overview of a CTLscan
plot.CTLscan
- Plot the CTL curve for a single trait
library(ctl) data(ath.metabolites) # Arabidopsis Thaliana data set ctlscan <- CTLscan(ath.metab$genotypes, ath.metab$phenotypes, phenocol=1:4) ctlscan # Genetic regions with significant CTLs found for the first phenotype CTLregions(ctlscan, ath.metab$map, phenocol = 1) summary <- CTLsignificant(ctlscan) # Matrix of Trait, Marker, Trait interactions summary # Get a list of significant CTLs nodes <- ctl.lineplot(ctlscan, ath.metab$map) # Line plot the phenotypes nodes
library(ctl) data(ath.metabolites) # Arabidopsis Thaliana data set ctlscan <- CTLscan(ath.metab$genotypes, ath.metab$phenotypes, phenocol=1:4) ctlscan # Genetic regions with significant CTLs found for the first phenotype CTLregions(ctlscan, ath.metab$map, phenocol = 1) summary <- CTLsignificant(ctlscan) # Matrix of Trait, Marker, Trait interactions summary # Get a list of significant CTLs nodes <- ctl.lineplot(ctlscan, ath.metab$map) # Line plot the phenotypes nodes
Scan for Correlated Trait Locus (CTL) in populations (using an R/qtl cross object)
CTLscan.cross(cross, ...)
CTLscan.cross(cross, ...)
cross |
An object of class |
... |
Passed to
|
TODO
NOTE: Main bottleneck of the algorithm is the RAM available to the system
CTLscan object, a list with at each index a CTL matrix (Rows: Phenotypes, Columns: Genetic markers) for the phenotype.
TODO
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
TODO
CTLscan
- Main function to scan for CTL
CTLsignificant
- Significant interactions from a CTLscan
CTLnetwork
- Create a CTL network from a CTLscan
image.CTLobject
- Heatmap overview of a CTLscan
plot.CTLscan
- Plot the CTL curve for a single trait
library(ctl) data(multitrait) # Arabidopsis Thaliana (R/qtl cross object) mtrait <- calc.genoprob(multitrait) # Calculate genotype probabilities qtls <- scanone(mtrait, pheno.col = 1) # Scan for QTLS using R/qtl ctls <- CTLscan.cross(mtrait, phenocol = 1, qtl = FALSE) ctls[[1]]$qtl <- qtls[,3] ctl.lineplot(ctls, qtls[,1:2], significance = 0.05) # Line plot all the phenotypes summary <- CTLsignificant(ctls) # Get a list of significant CTLs summary
library(ctl) data(multitrait) # Arabidopsis Thaliana (R/qtl cross object) mtrait <- calc.genoprob(multitrait) # Calculate genotype probabilities qtls <- scanone(mtrait, pheno.col = 1) # Scan for QTLS using R/qtl ctls <- CTLscan.cross(mtrait, phenocol = 1, qtl = FALSE) ctls[[1]]$qtl <- qtls[,3] ctl.lineplot(ctls, qtls[,1:2], significance = 0.05) # Line plot all the phenotypes summary <- CTLsignificant(ctls) # Get a list of significant CTLs summary
Get all significant interactions from a genome-wide CTLscan.
CTLsignificant(CTLobject, significance = 0.05, what = c("names","ids"))
CTLsignificant(CTLobject, significance = 0.05, what = c("names","ids"))
CTLobject |
An object of class |
significance |
Significance threshold to set a genome wide False Discovery Rate (FDR). |
what |
Return trait and marker names or column numbers (for indexing). |
TODO
A matrix significant CTL interactions with 4 columns: trait, marker, trait, lod
TODO
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
TODO
library(ctl) data(ath.result) all_interactions <- CTLsignificant(ath.result) all_interactions[1:10, ] trait1_interactions <- CTLsignificant(ath.result[[1]]) trait1_interactions
library(ctl) data(ath.result) all_interactions <- CTLsignificant(ath.result) all_interactions[1:10, ] trait1_interactions <- CTLsignificant(ath.result[[1]]) trait1_interactions
Peak detection algorithm to 'flatten' data above a certain threshold
detect.peaks(data, chrEdges = c(1), threshold = 4, verbose = FALSE)
detect.peaks(data, chrEdges = c(1), threshold = 4, verbose = FALSE)
data |
A vector of scores per marker/locus. |
chrEdges |
Start positions of the chromosomes. |
threshold |
Threshold to determine regions. |
verbose |
Be verbose. |
TODO
TODO
TODO
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
TODO
CTLscan
- Main function to scan for CTL
CTLsignificant
- Significant interactions from a CTLscan
CTLnetwork
- Create a CTL network from a CTLscan
image.CTLobject
- Heatmap overview of a CTLscan
plot.CTLscan
- Plot the CTL curve for a single trait
#TODO
#TODO
Plot histogram of CTL permutations (the output of CTLscan
).
## S3 method for class 'CTLobject' hist(x, phenocol=1, ...)
## S3 method for class 'CTLobject' hist(x, phenocol=1, ...)
x |
An object of class |
phenocol |
Which phenotype column(s) should we analyse. Defaults to analyse all phenotype columns |
... |
Passed to the function |
None.
For a detailed description, see CTLprofiles
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
CTLscan
- Scan for CTL
CTLprofiles
- Extract CTL interaction profiles
print.CTLscan
- Print a summary of a CTLscan
par
- Plot parameters
colors
- Colors used in plotting
library(ctl) # Load CTL library data(ath.result) hist(ath.result, phenocol = 1:3) # Compare the results of the first 3 scans
library(ctl) # Load CTL library data(ath.result) hist(ath.result, phenocol = 1:3) # Compare the results of the first 3 scans
Plot the CTL for genome-wide CTL on multiple traits (the output of CTLscan
).
## S3 method for class 'CTLobject' image(x, marker_info, against = c("markers","phenotypes"), significance = 0.05, col=whiteblack, do.grid=TRUE, grid.col = "white", verbose = FALSE, add=FALSE, breaks = c(0, 1, 2, 3, 10, 10000), ...)
## S3 method for class 'CTLobject' image(x, marker_info, against = c("markers","phenotypes"), significance = 0.05, col=whiteblack, do.grid=TRUE, grid.col = "white", verbose = FALSE, add=FALSE, breaks = c(0, 1, 2, 3, 10, 10000), ...)
x |
An object of class |
marker_info |
Information used to plot chromosome lines. |
against |
Plot which interaction matrice, options are: markers: the phenotype*marker or phenotypes: the phenotype*phenotypes matrix. |
significance |
Significance threshold to set a genome wide False Discovery Rate (FDR). |
col |
Color-range used in plotting. |
do.grid |
When TRUE, grid lines are added to the plot. |
grid.col |
Color used for the grid lines, only used when do.grid = TRUE. |
verbose |
Be verbose. |
add |
Add this plot to a previously opened plot window. |
breaks |
See par. |
... |
Passed to the function |
None.
For a detailed description, see CTLprofiles
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
CTLscan
- Scan for CTL
CTLprofiles
- Extract CTL interaction profiles
print.CTLscan
- Print a summary of a CTLscan
par
- Plot parameters
colors
- Colors used in plotting
library(ctl) data(ath.result) # Arabidopsis Thaliana results #Phenotype to phenotype matrix p2p_matrix <- image(ath.result, against="phenotypes") #Phenotype to marker matrix p2m_matrix <- image(ath.result, against="markers")
library(ctl) data(ath.result) # Arabidopsis Thaliana results #Phenotype to phenotype matrix p2p_matrix <- image(ath.result, against="phenotypes") #Phenotype to marker matrix p2m_matrix <- image(ath.result, against="markers")
Plot the CTL curve or heatmaps for a genome scan (the output of CTLscan
).
## S3 method for class 'CTLobject' plot(x, phenocol = 1:length(x), ...)
## S3 method for class 'CTLobject' plot(x, phenocol = 1:length(x), ...)
x |
An object of class |
phenocol |
Which phenotype column(s) should we plot. Defaults to creating an image of all phenotype columns |
... |
Passed to the function |
None.
None.
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
CTLscan
- Scan for CTL
print.CTLscan
- Print a summary of a CTLscan
par
- Plot parameters
colors
- Colors used in plotting
library(ctl) data(ath.result) # Arabidopsis Thaliana dataset plot(ath.result)
library(ctl) data(ath.result) # Arabidopsis Thaliana dataset plot(ath.result)
Differential correlation versus likelihood plot curves.
## S3 method for class 'CTLpermute' plot(x, type="s", ...)
## S3 method for class 'CTLpermute' plot(x, type="s", ...)
x |
An object of class |
type |
What type of plot should be drawn. for possible options see |
... |
Passed to the function |
None.
None.
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
CTLscan
- Scan for CTL
print.CTLscan
- Print a summary of a CTLscan
par
- Plot parameters
colors
- Colors used in plotting
library(ctl) data(ath.result) # Arabidopsis Thaliana dataset plot(ath.result[[1]]$perms)
library(ctl) data(ath.result) # Arabidopsis Thaliana dataset plot(ath.result[[1]]$perms)
Plot the CTL results for a genome scan (the output of CTLscan
) as a barplot, curved line
or GWAS plot.
## S3 method for class 'CTLscan' plot(x, mapinfo = NULL, type = c("barplot","gwas","line"), onlySignificant = TRUE, significance = 0.05, gap = 25, plot.cutoff = FALSE, do.legend=TRUE, legend.pos = "topleft", cex.legend=1.0, ydim=NULL, ylab="-log10(P-value)", ...)
## S3 method for class 'CTLscan' plot(x, mapinfo = NULL, type = c("barplot","gwas","line"), onlySignificant = TRUE, significance = 0.05, gap = 25, plot.cutoff = FALSE, do.legend=TRUE, legend.pos = "topleft", cex.legend=1.0, ydim=NULL, ylab="-log10(P-value)", ...)
x |
An object of class |
mapinfo |
The mapinfo matrix with 3 columns: "Chr" - the chromosome number, "cM" - the location of the marker in centiMorgans and the 3rd column "Mbp" - The location of the marker in Mega basepairs. If supplied the marker names (rownames) should match those in the CTLobject. |
type |
Type of plot: Summed barplot, GWAS style plot or a basic line plot. |
onlySignificant |
Plot only the significant contributions to the CTL profile. |
significance |
Significance threshold for setting a genomewide FDR. |
gap |
Gap in Cm between chromosomes. |
plot.cutoff |
Adds a line at -log10(significance) and adds a legend showing the significance level. |
do.legend |
Adds a legend showing which phenotypes contribute to the CTL profile. |
legend.pos |
Position of the legend in the plot window. |
cex.legend |
Maginification of the text in the legend. |
ydim |
Dimension of the y-axis, if NULL then it will be calculated. |
ylab |
Label for the y-axis. |
... |
Passed to the function |
None.
None.
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
CTLscan
- Scan for CTL
print.CTLscan
- Print a summary of a CTLscan
par
- Plot parameters
colors
- Colors used in plotting
library(ctl) data(ath.result) # Arabidopsis thaliana results data(ath.metabolites) # Arabidopsis thaliana data (phenotypes, genotypes and mapinfo plot(ath.result[[3]]) plot(ath.result[[2]], mapinfo = ath.metab[[3]]) plot(ath.result[[1]], mapinfo = ath.metab[[3]]) plot(ath.result[[3]], mapinfo = ath.metab[[3]]) plot(ath.result[[3]], mapinfo = ath.metab[[3]], type="gwas") plot(ath.result[[3]], mapinfo = ath.metab[[3]], type="line")
library(ctl) data(ath.result) # Arabidopsis thaliana results data(ath.metabolites) # Arabidopsis thaliana data (phenotypes, genotypes and mapinfo plot(ath.result[[3]]) plot(ath.result[[2]], mapinfo = ath.metab[[3]]) plot(ath.result[[1]], mapinfo = ath.metab[[3]]) plot(ath.result[[3]], mapinfo = ath.metab[[3]]) plot(ath.result[[3]], mapinfo = ath.metab[[3]], type="gwas") plot(ath.result[[3]], mapinfo = ath.metab[[3]], type="line")
Trait vs Trait scatterplot, colored by the selected genetic locus
plotTraits(genotypes, phenotypes, phenocol = c(1, 2), marker = 1, doRank = FALSE)
plotTraits(genotypes, phenotypes, phenocol = c(1, 2), marker = 1, doRank = FALSE)
genotypes |
Matrix of genotypes. (individuals x markers) |
phenotypes |
Matrix of phenotypes. (individuals x phenotypes) |
phenocol |
Which phenotype column(s) should be plotted against each other, Default: phenotype 1 versus 2 |
marker |
Which marker (column in genotypes) should be used to add genotype as a color of the dots. |
doRank |
Transform quantitative data into ranked data before analyzing the slope. |
TODO
TODO
TODO
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
TODO
CTLscan
- Main function to scan for CTL
CTLsignificant
- Significant interactions from a CTLscan
CTLnetwork
- Create a CTL network from a CTLscan
image.CTLobject
- Heatmap overview of a CTLscan
plot.CTLscan
- Plot the CTL curve for a single trait
library(ctl) data(ath.metabolites) # Arabidopsis Thaliana data set plotTraits(ath.metab$genotypes, ath.metab$phenotypes, marker=75, doRank = TRUE)
library(ctl) data(ath.metabolites) # Arabidopsis Thaliana data set plotTraits(ath.metab$genotypes, ath.metab$phenotypes, marker=75, doRank = TRUE)
Print the results of a multiple phenotype CTL genome scan produced by CTLscan
.
## S3 method for class 'CTLobject' print(x, ...)
## S3 method for class 'CTLobject' print(x, ...)
x |
An object of class |
... |
Ignored. |
None.
None.
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
TODO
CTLscan
- Scan for CTL
plot.CTLscan
- Plot a CTLscan object
#TODO
#TODO
Print the results of a single phenotype CTL scan produced by either CTLmapping
(Single phenotype scan) or
CTLscan
(Multi phenotype scan).
## S3 method for class 'CTLscan' print(x, ...)
## S3 method for class 'CTLscan' print(x, ...)
x |
An object of class |
... |
Ignored. |
None.
None.
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
TODO
CTLscan
- Scan for CTL
plot.CTLscan
- Plot a CTLscan object
#TODO
#TODO
Plots the QTL heatmap of a genome wide QTL scan (part of the output of CTLscan
).
qtlimage(x, marker_info, do.grid=TRUE, grid.col="white", verbose=FALSE, ...)
qtlimage(x, marker_info, do.grid=TRUE, grid.col="white", verbose=FALSE, ...)
x |
An object of class |
marker_info |
Information used to plot chromosome lines. |
do.grid |
When TRUE, grid lines are added to the plot. |
grid.col |
Color used for the grid lines, only used when do.grid = TRUE. |
verbose |
Be verbose. |
... |
Passed to the function |
None.
None.
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
CTLscan
- Scan for CTL
print.CTLscan
- Print a summary of a CTLscan
par
- Plot parameters
colors
- Colors used in plotting
library(ctl) # Load CTL library data(ath.metabolites) # Arabidopsis Thaliana data data(ath.result) # Arabidopsis Thaliana results qtlimage(ath.result, ath.metab$map) # Plot only the qtls
library(ctl) # Load CTL library data(ath.metabolites) # Arabidopsis Thaliana data data(ath.result) # Arabidopsis Thaliana results qtlimage(ath.result, ath.metab$map) # Plot only the qtls
Internal QTL mapping method used by the CTL analysis, associates every column in the genotypes with a single phenotype
QTLmapping(genotypes, phenotypes, phenocol = 1, verbose = TRUE)
QTLmapping(genotypes, phenotypes, phenocol = 1, verbose = TRUE)
genotypes |
Matrix of genotypes. (individuals x markers) |
phenotypes |
Matrix of phenotypes. (individuals x phenotypes) |
phenocol |
Which phenotype column(s) should we analyse. Default: Analyse a single phenotype. |
verbose |
Be verbose. |
TODO
NOTE: Slow approach, it is adviced to use your own QTL mapping data
vector of LOD scores for each genotype column, for phenotype column phenocol
TODO
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
TODO
CTLscan
- Main function to scan for CTL
CTLscan.cross
- Use an R/qtl cross object with CTLscan
CTLsignificant
- Significant interactions from a CTLscan
plot.CTLscan
- Plot the CTL curve for a single trait
library(ctl) data(ath.metabolites) # Arabidopsis Thaliana dataset qtldata <- QTLmapping(ath.metab$genotypes, ath.metab$phenotypes, phenocol = 23) plot(qtldata) # Plot the results of the QTL scan for the phenotype
library(ctl) data(ath.metabolites) # Arabidopsis Thaliana dataset qtldata <- QTLmapping(ath.metab$genotypes, ath.metab$phenotypes, phenocol = 23) plot(qtldata) # Plot the results of the QTL scan for the phenotype
Analyze the differences in Standard Deviation between genotypes between two traits
scanSD(genotypes, phenotypes, phenocol=c(1,2), doRank = FALSE)
scanSD(genotypes, phenotypes, phenocol=c(1,2), doRank = FALSE)
genotypes |
Matrix of genotypes. (individuals x markers) |
phenotypes |
Matrix of phenotypes. (individuals x phenotypes) |
phenocol |
Which phenotype column(s) should be plotted against each other, Default: phenotype 1 versus 2 |
doRank |
Transform quantitative data into ranked data before analyzing the slope. |
TODO
TODO
TODO
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
TODO
CTLscan
- Main function to scan for CTL
CTLsignificant
- Significant interactions from a CTLscan
CTLnetwork
- Create a CTL network from a CTLscan
image.CTLobject
- Heatmap overview of a CTLscan
plot.CTLscan
- Plot the CTL curve for a single trait
library(ctl) data(multitrait) # Arabidopsis Thaliana (R/qtl cross object) sds <- scanSD(pull.geno(multitrait),pull.pheno(multitrait))
library(ctl) data(multitrait) # Arabidopsis Thaliana (R/qtl cross object) sds <- scanSD(pull.geno(multitrait),pull.pheno(multitrait))
Analyze the differences in standard deviation between two traits at a certain genetic marker
scanSD.cross(cross, phenocol = c(1,2), doRank = FALSE)
scanSD.cross(cross, phenocol = c(1,2), doRank = FALSE)
cross |
An object of class |
phenocol |
Which phenotype column(s) should be plotted against each other, Default: phenotype 1 versus 2 |
doRank |
Transform quantitative data into ranked data before analyzing the slope. |
TODO
TODO
TODO
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
TODO
CTLscan
- Main function to scan for CTL
CTLsignificant
- Significant interactions from a CTLscan
CTLnetwork
- Create a CTL network from a CTLscan
image.CTLobject
- Heatmap overview of a CTLscan
plot.CTLscan
- Plot the CTL curve for a single trait
library(ctl) data(multitrait) # Arabidopsis Thaliana (R/qtl cross object) sds <- scanSD.cross(multitrait)
library(ctl) data(multitrait) # Arabidopsis Thaliana (R/qtl cross object) sds <- scanSD.cross(multitrait)
Create a slope difference profile between two traits
scanSlopes(genotypes, phenotypes, phenocol = 1, doRank = FALSE, verbose = FALSE)
scanSlopes(genotypes, phenotypes, phenocol = 1, doRank = FALSE, verbose = FALSE)
genotypes |
Matrix of genotypes. (individuals x markers) |
phenotypes |
Matrix of phenotypes. (individuals x phenotypes) |
phenocol |
Which phenotype column(s) should we analyse. Default: Analyse phenotype 1. |
doRank |
Transform quantitative data into ranked data before analyzing the slope. |
verbose |
Be verbose. |
TODO
TODO
TODO
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
TODO
CTLscan
- Main function to scan for CTL
CTLsignificant
- Significant interactions from a CTLscan
CTLnetwork
- Create a CTL network from a CTLscan
image.CTLobject
- Heatmap overview of a CTLscan
plot.CTLscan
- Plot the CTL curve for a single trait
library(ctl) data(ath.metabolites) # Arabidopsis Thaliana data set slopes <- scanSlopes(ath.metab$genotypes, ath.metab$phenotypes[,1:4], phenocol = 2) image(1:nrow(slopes), 1:ncol(slopes), -log10(slopes))
library(ctl) data(ath.metabolites) # Arabidopsis Thaliana data set slopes <- scanSlopes(ath.metab$genotypes, ath.metab$phenotypes[,1:4], phenocol = 2) image(1:nrow(slopes), 1:ncol(slopes), -log10(slopes))
Create a slope difference profile between two traits (using an R/qtl cross object)
scanSlopes.cross(cross, phenocol = 1, doRank = FALSE, verbose = FALSE)
scanSlopes.cross(cross, phenocol = 1, doRank = FALSE, verbose = FALSE)
cross |
An object of class |
phenocol |
Which phenotype column(s) should we analyse. Default: Analyse phenotype 1 |
doRank |
Transform quantitative data into ranked data before analyzing the slope. |
verbose |
Be verbose. |
TODO
TODO
TODO
Danny Arends [email protected]
Maintainer: Danny Arends [email protected]
TODO
CTLscan
- Main function to scan for CTL
CTLsignificant
- Significant interactions from a CTLscan
CTLnetwork
- Create a CTL network from a CTLscan
image.CTLobject
- Heatmap overview of a CTLscan
plot.CTLscan
- Plot the CTL curve for a single trait
library(ctl) data(multitrait) # Arabidopsis Thaliana (R/qtl cross object) multitrait$pheno <- multitrait$pheno[,1:4] slopes <- scanSlopes.cross(multitrait) image(1:nrow(slopes), 1:ncol(slopes), -log10(slopes))
library(ctl) data(multitrait) # Arabidopsis Thaliana (R/qtl cross object) multitrait$pheno <- multitrait$pheno[,1:4] slopes <- scanSlopes.cross(multitrait) image(1:nrow(slopes), 1:ncol(slopes), -log10(slopes))
Saccharomyces recombinant inbred lines. There are 109 lines, 301 phenotypes, genotyped at 282 markers on 16 chromosomes stored as a list with 3 matrices: genotypes, phenotypes and map
data(yeast.brem)
data(yeast.brem)
Data stored in a list holding 3 matrices genotypes, phenotypes and map
Saccharomyces recombinant inbred lines. There are 109 lines, 301 RNA expression phenotypes. The individuals are genotyped at 282 markers on 16 chromosomes.
Saccharomyces cerevisiae RNA expression data from XX, senior author: Rachel Brem 20XX, Published in: Plos
TODO
library(ctl) data(yeast.brem) # Yeast data set yeast.brem$genotypes[1:5, 1:5] yeast.brem$phenotypes[1:5, 1:5] yeast.brem$map[1:5, ]
library(ctl) data(yeast.brem) # Yeast data set yeast.brem$genotypes[1:5, 1:5] yeast.brem$phenotypes[1:5, 1:5] yeast.brem$map[1:5, ]