Last data update: 2014.03.03

R: Calculating probabilities of differential expression in...
differential.probsR Documentation

Calculating probabilities of differential expression in perturbation experiments

Description

Returns probabilities of differential expression for genes under perturbation of a set of regulators. Takes as input perturbation data and beliefs about known genes.

Usage

differential.probs(data, beliefs, verbose, plot.it)

Arguments

data

A matrix of log expression ratios perrturbation vs control, for the genes (rows), in the perturbations of the regulators (columns). The data has to have row and colnames specified by the user.

beliefs

A list with names being a subset of the regulators (i.e., the names of beliefs have to be a subset of the columns of the data). Each list entry for a given regulator is a matrix with rows corresponding to the genes that are known to respond in some way to the perturbation of this regulator. The rownames of the matrix must be a subset of the rows in the data. The matrix can have either two or three columns. Each row is a distribution over the differential and unchanged cluster (2 columns) or over down, up-regulated and unchanged cluster of genes (3 columns). This distribution reflects the certainties with which a gene that corresponds to this row belongs to each of those clusters.

verbose

When TRUE, for each regulator and its perturbation data, the execution prints out the parameters of the fitted model(s), indicating which components are differential and which are unchanged.

plot.it

When TRUE, for each regulator and its perturbation data, the execution plots the Gaussian components of the fitted model(s), indicating which components are differential and which are unchanged.

Details

For each regulator, a belief-based mixture model is fitted to the observations in the data. The fitted models have the number of model components equal to the number of columns in the corresponding beliefs. If no beliefs are given, unsupervised two-component mixture modeling is applied.

Value

A matrix with columns for the regulators, rows for the genes, and entries giving the signed probabilities of differential expression.

Author(s)

Ewa Szczurek

References

http://joda.molgen.mpg.de

See Also

regulation.scores, deregulation.scores

Examples

	
data(damage)
	
# Get the probabilities of differential expression
# for the knockout of p53 in healthy cells
probs.healthy.p53= differential.probs(data.healthy[,"p53",FALSE],
					beliefs.healthy["p53"], TRUE,TRUE)
	
# Get the probabilities of differential expression
# for the knockout of Ste12 under pheromone treatment 	
library(bgmm)
data(Ste12)
data=as.matrix(Ste12Data)
colnames(data)="Ste12"
beliefs=list(Ste12=Ste12Beliefs)
diff.p=differential.probs(data,beliefs,TRUE,TRUE)
	
## Not run: 
probs.healthy= differential.probs(data.healthy, beliefs.healthy, TRUE,TRUE)

## End(Not run)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(joda)
Loading required package: bgmm
Loading required package: mvtnorm
Loading required package: car
Loading required package: lattice
Loading required package: combinat

Attaching package: 'combinat'

The following object is masked from 'package:utils':

    combn

Loading required package: RBGL
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/joda/differential.probs.Rd_%03d_medium.png", width=480, height=480)
> ### Name: differential.probs
> ### Title: Calculating probabilities of differential expression in
> ###   perturbation experiments
> ### Aliases: differential.probs
> 
> ### ** Examples
> 
> 	
> data(damage)
> 	
> # Get the probabilities of differential expression
> # for the knockout of p53 in healthy cells
> probs.healthy.p53= differential.probs(data.healthy[,"p53",FALSE],
+ 					beliefs.healthy["p53"], TRUE,TRUE)
joda: Input correctly defined 

Inferring probabilities of differential expression under the knockdown of  p53 ... 
Applying belief-based mixture modeling
The parameters of the model for p53: 
                    differential    unchanged
Mixing proportions:   0.50634787  0.493652126
Means:                0.05503342 -0.072353721
Variances:            0.04807592  0.007986199
> 	
> # Get the probabilities of differential expression
> # for the knockout of Ste12 under pheromone treatment 	
> library(bgmm)
> data(Ste12)
> data=as.matrix(Ste12Data)
> colnames(data)="Ste12"
> beliefs=list(Ste12=Ste12Beliefs)
> diff.p=differential.probs(data,beliefs,TRUE,TRUE)
joda: Input correctly defined 

Inferring probabilities of differential expression under the knockdown of  Ste12 ... 
Applying belief-based mixture modeling
The parameters of the model for Ste12: 
                    differential unchanged
Mixing proportions:    0.1136888 0.8863112
Means:                -2.2403543 0.1241325
Variances:             9.0071697 1.1022662
> 	
> ## Not run: 
> ##D probs.healthy= differential.probs(data.healthy, beliefs.healthy, TRUE,TRUE)
> ## End(Not run)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>