Package 'trigger'

Title: Transcriptional Regulatory Inference from Genetics of Gene ExpRession
Description: This R package provides tools for the statistical analysis of integrative genomic data that involve some combination of: genotypes, high-dimensional intermediate traits (e.g., gene expression, protein abundance), and higher-order traits (phenotypes). The package includes functions to: (1) construct global linkage maps between genetic markers and gene expression; (2) analyze multiple-locus linkage (epistasis) for gene expression; (3) quantify the proportion of genome-wide variation explained by each locus and identify eQTL hotspots; (4) estimate pair-wise causal gene regulatory probabilities and construct gene regulatory networks; and (5) identify causal genes for a quantitative trait of interest.
Authors: Lin S. Chen <[email protected]>, Dipen P. Sangurdekar <[email protected]> and John D. Storey <[email protected]>
Maintainer: John D. Storey <[email protected]>
License: GPL-3
Version: 1.53.0
Built: 2024-11-19 04:42:49 UTC
Source: https://github.com/bioc/trigger

Help Index


Graphical Display of Trigger Analysis

Description

Graphical display of genomewide linkage map, multi-locus linkage or eQTL variation

Usage

## S4 method for signature 'trigger,missing'
plot(x,y,type = c("link", "mlink", "eqtl"),
				cutoff  = 3.3e-4, qcut = 0.1, bin.size = NULL)

Arguments

x

An object of class trigger.

y

Ignore option, not used.

type

An argument describing the type of plot. Select from link (default) for genome-wide linkage map, eqtl.R2 for graphical display of eQTL-R^2 contribution or mlink for display of genome-wide epistasis effect.

cutoff

Threshold value for link. The measures below the threshold are called significant and are plotted.

qcut

Q-value threshold for mlink. The joint multi-locus linkage probabilities with q-values below the threshold are called significant and are plotted.

bin.size

Optional for mlink. If not NULL, each chromosome will be divided into several bins, each with size bin.size. Markers within a bin will be considered as at a same position.

Author(s)

Lin S. Chen [email protected], Dipen P. Sangurdekar [email protected] and John D. Storey [email protected]

See Also

trigger.link, trigger.mlink and trigger.eigenR2

Examples

## Not run: 
  
  data(yeast)
  attach(yeast)
  triggerobj <- trigger.build(marker=marker, exp=exp, 
				marker.pos=marker.pos, exp.pos=exp.pos)
  triggerobj <- trigger.link(triggerobj, gender=NULL, norm=TRUE)
  plot(triggerobj,type = "link", cutoff=1e-5)
  triggerobj <- trigger.eigenR2(triggerobj, adjust=FALSE)
  plot(triggerobj, type = "eigenR2")
  triggerobj<- trigger.mlink(triggerobj, B=5, seed=123)
  plot(triggerobj, qcut=0.1, bin.size=NULL)
  
  detach(yeast)


## End(Not run)

A class to store and analyze data for Transcriptional Regulation Inference from Genetics of Gene ExpRession

Description

trigger is a class of objects to store and analyze data for Integrative Genomic Analysis. Use trigger.build to generate new objects of the class from input data.

Details

The positions in marker.pos and exp.pos matrix should be in the same units (e.g., base pair, kb, or cM).

Value

An object of S4 class trigger containing the marker genotype matrix (a matrix of 1,2 for haploid genotypes, or 1,2,3 for diploid genotypes), expression matrix, marker position matrix and gene/trait position matrix with ordered coordinates in respective slots. Use slot(objectname, varname) to retrieve individual variables from the object . Use print to see the first 10 rows and columns of the expression and marker matrix.

Slots

exp:

A numeric matrix with m rows and n columns, containing the gene expression (or intermediate trait) data.

exp.pos:

A matrix with m rows and 3 columns containing the chromosome number, gene start and gene end for all the genes in the gene expression matrix. The rows of exp.pos should match those of exp.

marker:

A matrix with p rows and n columns, containing genotyping information.

marker.pos:

A matrix with p rows and 2 columns containing the chromosome number and SNP position for all the genes in the gene expression matrix. The rows of exp.pos should match those of exp.

stat:

A matrix of pair-wise likelihood ratio statistics for linkage analysis, with genes in rows and markers in columns.

pvalue:

A matrix of parametric pvalues corresponding to statistics in the stat matrix.

mlink:

A list containing the results of Multi-locus linkage analysis. See trigger.mlink for details.

eqtl.R2:

A vector containing the proportion of genome-wide variation explained by each observed locus (eQTL).See trigger.eigenR2 for details.

loc.obj:

A list containing the results of local-linkage probability estimation. See trigger.loclink for details.

Author(s)

Lin S. Chen [email protected], Dipen P. Sangurdekar [email protected] and John D. Storey [email protected]

See Also

trigger.build, trigger.link, trigger.mlink, trigger.eigenR2, trigger.net and trigger.trait


Format the input data and create an Trigger object

Description

This function takes high-dimensional expression data and genotype data with each of their position data in the genome and creates a trigger object for subsequent analysis.

Usage

trigger.build(exp = exp,exp.pos = exp.pos, marker = marker, marker.pos = marker.pos)

Arguments

exp

A gene (or intermediate trait) by individual matrix of expression data.

exp.pos

A matrix containing the position information for genes (intermediate traits). The first column is the chromosome name of the gene. The second column is the starting coordinate of the gene, and the third column is the ending coordinate. Each row corresponds to one gene/trait in the exp matrix.

marker

A marker genotype by individual matrix.

marker.pos

A matrix containing the position information for markers. The first column is the chromosome name of the marker. We recommend to use integers for autosomal chromosomes and "X" for sex chromosome. The second column is the position of the marker on the chromosome. Each row corresponds to one marker in the marker matrix.

Details

The positions in marker.pos and exp.pos matrix should be in the same units (e.g., base pair, kb, or cM).

Value

An object of S4 class trigger containing the marker genotype matrix (a matrix of 1,2 for haploid genotypes, or 1,2,3 for diploid genotypes), expression matrix, marker position matrix and gene/trait position matrix with ordered coordinates in respective slots. Use slot(objectname, varname) to retrieve individual variables from the object. Use print to see the first 10 rows and columns of the expression and marker matrix.

Author(s)

Lin S. Chen [email protected], Dipen P. Sangurdekar [email protected] and John D. Storey [email protected]

See Also

trigger.link, trigger.mlink, trigger.eigenR2, trigger.net and trigger.trait

Examples

## Not run: 
  data(yeast)
  attach(yeast)
  triggerobj <- trigger.build(marker = marker, exp = exp, 
                    marker.pos = marker.pos, exp.pos = exp.pos)
  print(triggerobj)
  
## End(Not run)

Estimate the proportion of genome-wide variation explained by each eQTL

Description

Estimate eqtl-R2, the proportion of genome-wide variation explained by each eQTL and identify linkage hotspots.

Usage

## S4 method for signature 'trigger'
trigger.eigenR2(triggerobj, adjust = FALSE, meanR2 = FALSE)

Arguments

triggerobj

An object of class trigger.

adjust

Logical. If TRUE, the estimated R-square for each locus will be adjusted for small sample size effect. Recommend to use when sample size is less than 100.

meanR2

Logical. If TRUE, the function computes the mean of R-squares of genome-wide gene expression for each locus.

Value

An updated object of class trigger with a slot loc.obj containing the proportion of genome-wide variation explained by each observed locus (eQTL). Use slot(triggerobj, "eigenR2") to retrieve the eqtl-R2 values as a vector.

Author(s)

Lin S. Chen [email protected], Dipen P. Sangurdekar [email protected] and John D. Storey [email protected]

References

Chen L.S. and Storey J.D. (2008) Eigen-R2 for dissecting variation in high-dimensional studies. Bioinformatics 24(19): 2260–2262.

See Also

plot

Examples

## Not run: 
  data(yeast)
  attach(yeast)
  triggerobj <- trigger.build(marker = marker, exp = exp, 
			marker.pos = marker.pos, exp.pos = exp.pos)
  triggerobj <- trigger.eigenR2(triggerobj, adjust = FALSE)
  plot(triggerobj, type = "eigenR2")
  eqtlR2 <- slot(triggerobj, "eigenR2")
  detach(yeast)


## End(Not run)

Export Trigger data to R/qtl's cross class object

Description

trigger.export2cross exports trigger data from triggerobj to a cross format for Trait-Trigger analysis. See trigger.trait for details.

Usage

## S4 method for signature 'trigger'
trigger.export2cross(triggerobj, plotarg = TRUE, verbose = TRUE, warning = FALSE)

Arguments

triggerobj

An object of class trigger.

plotarg

Logical. If TRUE, the function plots the default plot from the R/qtl package while reading in the genotype data.

verbose

Logical. If TRUE, the function lists the default output from the R/qtl package while reading in the genotype data.

warning

Logical. If FALSE, the function suppresses warnings output from the R/qtl package while reading in the genotype data.

Details

The trigger.export2cross command writes a csv format file “geno_trait_data.csv” to the working directory and reads it using the read.cross command.

Value

An object of class cross from the R/qtl package.

Author(s)

Lin S. Chen [email protected], Dipen P. Sangurdekar [email protected] and John D. Storey [email protected]

References

Broman KW, Wu H, Sen S, Churchill GA (2003) R/qtl: QTL mapping in experimental crosses. Bioinformatics 19: 889–890.

See Also

trigger.trait

Examples

data(yeast)
  attach(yeast)
  triggerobj <- trigger.build(marker = marker, exp = exp, 
					marker.pos = marker.pos, exp.pos = exp.pos)
  crossfile <- trigger.export2cross(triggerobj, plotarg = TRUE, verbose = TRUE, warning = FALSE)
  tt.pval <- trigger.trait(triggerobj, trait  =  "DSE1", cross  =  crossfile)
  causal.reg <- names(which(p.adjust(tt.pval, method = "fdr")<.05))
  detach(yeast)

Network-Trigger analysis

Description

Network-Trigger analysis estimates the joint posterior probability of causal regulation for each pair of genes in the genome. These probabilities can further be used to construct a gene regulatory network.

Usage

## S4 method for signature 'trigger'
trigger.net(triggerobj, gender = NULL, idx = NULL, 
	Bsec = 100, prob.cut = 0.7, include.loc = TRUE, seed = 123, inputfile = NULL)

Arguments

triggerobj

An object of class trigger containing slot loc.obj with local-linkage probabilities and marker indices of the best local-linkage markers for genes in the genome. See trigger and trigger.loclink for details.

gender

Optional. When computing statistics involving markers on sex chromosome, gender of each sample should be specified.

idx

Optional. One can specify the indices of selected genes as putative regulators. By default, all the genes will be selected as putative regulators.

Bsec

Number of iterations to perform when estimating null statistics for secondary-linkage and conditional independence.

prob.cut

Probability threshold. The joint regulatory probabilities of a regulator to all the other genes will be set to zero if the local-linkage probability of the regulator is below the threshold; default prob.cut = 0.7.

include.loc

Logical. If TRUE, the estimated posterior probability of regulation is more conservative.

seed

Optional. A numeric seed for reproducible results.

inputfile

Optional. If provided, reads in the probability matrix from working directory.

Details

The option idx contains the indices of putative regulator genes. When the data set is large, one can use this option by selecting a subset of genes as putative regulators in one computation and parallel-computes the genome-wide regulatory probability. If idx=NULL, all the genes will be computed for probability of regulation to other genes in the data.

If include.loc = TRUE, the joint posterior probability of regulation is the product of local-linkage, secondary-linkage and conditional independence. Otherwise, it is the product of secondary-linkage and conditional independence. The local-linkage is not a necessary condition for calculating regulation probability. If the probability of local-linkage is considered, the joint probability of regulation is more conservative. See references for details.

Value

A matrix of genome-wide regulatory probabilities with putative regulators in rows and regulated genes in columns. Note that the matrix is not symmetric. If gene i is estimated to be causal for gene j with high probability, the reverse is not true.

Author(s)

Lin S. Chen [email protected], Dipen P. Sangurdekar [email protected] and John D. Storey [email protected]

References

Chen L.S., Emmert-Streib F., and Storey J.D. (2007) Harnessing naturally randomized transcription to infer regulatory relationships among genes. Genome Biology, 8: R219.

See Also

trigger.loclink, trigger.netPlot2ps and trigger.trait

Examples

## Not run: 
  data(yeast)
  attach(yeast)
  triggerobj <- trigger.build(marker = marker, exp = exp, 
            marker.pos = marker.pos, exp.pos = exp.pos)
  triggerobj <- nettrig.loc(triggerobj, window.size = 30000)
  trig.prob <- trigger.net(triggerobj, Bsec = 100)
  netPlot2ps(trig.prob)
  detach(yeast)

## End(Not run)

Write the network from a trigger probability matrix to a postscript file

Description

Write the network from a trigger probability matrix to a postscript file.

Usage

## S4 method for signature 'trigger'
trigger.netPlot2ps(triggerobj, trig.prob, filenam = NULL, pcut = 0.95, 
	layout = c("radial", "energy-minimized", "circular","hierarchical"),
	 node.color = NULL, edge.color = NULL, node.shape = NULL, nreg = 20)

Arguments

triggerobj

An object of class trigger.

trig.prob

A network-Trigger regulatory probability matrix with putative regulator genes in rows and putative regulated genes in columns. See trigger.net for details.

filenam

The output file name, without extension. If the name is not specified, the network will be write to the files temp.ps and temp.dot at the current directory.

pcut

Threshold value for regulatory probabilities. The probabilities above the threshold are called significant and the corresponding regulatory relationships are plotted.

layout

The layout of the output network. One can choose from "radial" (default), "energy-minimized", "circular" or "hierarchical" layouts. You can specify just the initial letter.

node.color

The color of the nodes (genes). The default color is green.

edge.color

The color of the edges. The default color is blue.

node.shape

The shape of nodes (genes) if the number of regulatory relationships is below 1000. If that number is above 1000, the shape of nodes will be dot.

nreg

The number of top regulators to be selected. These selected top regulators will be plotted in red ellipses with their gene names labeled inside.

Details

To use this function, please install the software Graphviz, which is available at http://www.graphviz.org/. For large networks, layout "radial" or "energy-minimized" is recommended. If the total number of significant regulatory relationships (directed edges) of the network is below 1000, we plot each node (gene) as a "box" with its name labeled inside. Otherwise, we plot each gene as a "dot" without name labeled to facilitate visualization. The top nreg (by default nreg = 20) regulators will be plotted in red ellipses labeled with their names.

See manual of Graphviz for other available colors and shapes of nodes.

Author(s)

Lin S. Chen [email protected], Dipen P. Sangurdekar [email protected] and John D. Storey [email protected]

See Also

trigger.link and trigger.mlink

Examples

## Not run: 
 data(yeast)
  attach(yeast)
  triggerobj <- trigger.build(marker = marker, exp = exp, 
				marker.pos = marker.pos, exp.pos = exp.pos)
  triggerobj <- trigger.loclink(triggerobj, window.size = 30000)
  trig.prob <- trigger.net(triggerobj, Bsec = 100)

  trigger.netPlot2ps(trig.prob, pcut = 0.95, layout = "e", filenam = "net95", nreg = 20)
  
  detach(yeast)

## End(Not run)

Trait-trigger analysis

Description

Trait-Trigger identifies, for a given trait of interest, causal gene regulator(s) that makes the trait conditionally independent of the QTL and their estimated p-values of causal regulation. These probabilities can further be used to construct a gene regulatory network.

Usage

## S4 method for signature 'trigger'
trigger.trait(triggerobj, trait, cross, thr, n.sv = NULL, addplot = TRUE)

Arguments

triggerobj

An object of class trigger. See trigger for details.

trait

Trait for which causal regulator is to be found. It can either be a gene-name for a gene expression trait present in triggerobj or a vector of values for the individuals present in triggerobj.

cross

An object of class cross obtained from trigger.export2cross. See R/qtl for more details.

thr

LOD threshold to search for locally linked putative causal genes (default 3).

n.sv

Number of surrogate variables used to model the local heterogeneity. If not set, it is computed from the expression data.

addplot

If TRUE, a plot of the LOD scores from a genome-scan for a single-QTL model from package R/qtl.

Value

A vector of p-values associated with each tested causal regulator.

Author(s)

Lin S. Chen [email protected], Dipen P. Sangurdekar [email protected] and John D. Storey [email protected]

References

Chen L.S., Emmert-Streib F., and Storey J.D. (2007) Harnessing naturally randomized transcription to infer regulatory relationships among genes. Genome Biology, 8: R219.

Broman KW, Wu H, Sen S, Churchill GA (2003) R/qtl: QTL mapping in experimental crosses. Bioinformatics 19: 889–890.

See Also

trigger.loclink and trigger.export2cross

Examples

## Not run: 
  data(yeast)
  attach(yeast)
  triggerobj <- trigger.build(marker = marker, exp = exp, 
				   marker.pos = marker.pos, exp.pos = exp.pos)
  crossfile <- trigger.export2cross(triggerobj)
  tt.pval <- trigger.trait(triggerobj, trait = "DSE1", cross = crossfile)
  causal.reg <- names(which(p.adjust(tt.pval, method = "fdr")<.05))
  detach(yeast)

## End(Not run)

A yeast data set for Transcriptional Regulation Inference from Genetics of Gene ExpRession

Description

A yeast data set for integrative genomic analysis.

Details

The data set contains information on 112 F1 segregants from a yeast genetic cross of BY and RM strains. The list consists of: marker: A 3244 x 112 genotype matrix with marker genotypes in rows and arrays in columns. exp: A 6216 x 112 gene expression matrix with genes in rows and arrays in columns. marker.pos: A matrix of marker position information. exp.pos: A matrix of gene position information.

References

Brem R.B., Storey J.D., Whittle J., and Kruglyak L. (2005) Genetic interactions between polymorphisms that affect gene expression in yeast. Nature, 436(7051): 701–703.

Storey J.D., Akey J.M., and Kruglyak L. (2005) Multiple locus linkage analysis of genomewide expression in yeast. PLoS Biology, 3(8): 1380–1390.