Package 'BayesKnockdown'

Title: BayesKnockdown: Posterior Probabilities for Edges from Knockdown Data
Description: A simple, fast Bayesian method for computing posterior probabilities for relationships between a single predictor variable and multiple potential outcome variables, incorporating prior probabilities of relationships. In the context of knockdown experiments, the predictor variable is the knocked-down gene, while the other genes are potential targets. Can also be used for differential expression/2-class data.
Authors: William Chad Young
Maintainer: William Chad Young <[email protected]>
License: GPL-3
Version: 1.31.0
Built: 2024-07-13 05:18:02 UTC
Source: https://github.com/bioc/BayesKnockdown

Help Index


Posterior Probabilities for Knockdown Data

Description

Calculates posterior probabilities for edges from a knocked-down gene to each of a set of potential target genes. More generally, it calculates posterior probabilities between a single predictor variable and each of a set of response variables, incorporating prior probabilities potentially unique to each response variable.

Usage

BayesKnockdown(x, y, prior = 0.5, g = sqrt(length(x)))

Arguments

x

n-vector of predictor data. In knockdown experiments, this is a vector of the expression levels of the knocked-down gene across n experiments.

y

Outcome matrix: p (number of outcomes measured) by n (number of samples). In knockdown experiments, this is a matrix of all the gene measurements for genes that were not knocked down.

prior

Prior probabilities for the outcome variables. Defaults to 0.5 for all variables.

g

The value to use for Zellner's g-prior. Defaults to the square root of the number of observations.

Value

A vector of p posterior probabilities indicating the probability of a relationship between the predictor variable and each outcome variable.

Examples

n <- 100;
p <- 10;
x <- rnorm(n);
y <- matrix(nrow=p, data=rnorm(n*p));
y[3,] <- y[3,] + 0.5*x;

BayesKnockdown(x, y);

Posterior Probabilities for 2-class Data

Description

Calculates posterior probabilities for each gene in a set of experiments is differentially expressed between two sets of experimental conditions. More generally, it calculates posterior probabilities that each measured variable is different between two classes, incorporating prior probabilities potentially unique to each variable.

Usage

BayesKnockdown.diffExp(y1, y2, prior = 0.5, g = sqrt(ncol(y1) + ncol(y2)))

Arguments

y1

Condition 1 outcome matrix: p (number of outcomes measured) by n1 (number of samples for condition 1).

y2

Condition 2 outcome matrix: p (number of outcomes measured) by n2 (number of samples for condition 2).

prior

Prior probabilities for the outcome variables. Defaults to 0.5 for all variables.

g

The value to use for Zellner's g-prior. Defaults to the square root of the number of observations (combined across both conditions).

Value

A vector of p posterior probabilities indicating the probability that each outcome variable is different between the two classes.

Examples

n1 <- 15;
n2 <- 20;
p <- 10;
y1 <- matrix(nrow=p, data=rnorm(n1*p));
y2 <- matrix(nrow=p, data=rnorm(n2*p));
y2[3,] <- y2[3,] + 0.5;

BayesKnockdown.diffExp(y1, y2);

Posterior Probabilities for ExpressionSet Data

Description

Calculates posterior probabilities for an ExpressionSet object by defining one feature as the predictor. Each other feature in the ExpressionSet is is then used as a response variable and posterior probabilities are calculated, incorporating prior probabilities potentially unique to each response variable.

Usage

BayesKnockdown.es(es, predFeature, prior = 0.5, g = sqrt(dims(es)[2,1]))

Arguments

es

An ExpressionSet object with p features and n samples.

predFeature

The name of the feature to use as the predictor.

prior

Prior probabilities for the outcome variables. Defaults to 0.5 for all variables.

g

The value to use for Zellner's g-prior. Defaults to the square root of the number of observations.

Value

A vector of p-1 posterior probabilities indicating the probability of a relationship between the predictor variable and each outcome variable.

Examples

library(Biobase);
data(sample.ExpressionSet);
subset <- sample.ExpressionSet[1:10,];

BayesKnockdown.es(subset, "AFFX-MurIL10_at");

LINCS L1000 Knockdown Example Dataset

Description

Example knockdown dataset from the National Institute of Health (NIH) Library of Integrated Network-based Cellular Signatures (LINCS) program (http://lincsproject.org).

Usage

data("lincs.kd")

Format

The data is a 21x27 matrix. Each row is the expression level of a different gene across 27 knockdown experiments.

Details

This data is from the National Institute of Health (NIH) Library of Integrated Network-based Cellular Signatures (LINCS) program (htpp://lincsproject.org). The aim of this program is to generate genetic and molecular signatures of cells in response to various perturbations. To support this endeavor, many large datasets have been made available, including proteomic and imaging data.

The data is from knockdown experiments targeting gene PPARG in cell line A375. The first row is the expression levels of PPARG in 27 different experiments, while the other rows are a subset of the measured genes in the same experiments. The data has been normalized to account for differences in the experimental settings, as described in Young, et al. (2016).

Value

matrix

Source

http://lincscloud.org

References

Duan, Q., et al. (2014), LINCS Canvas Browser: interactive web app to query, browse and interrogate LINCS L1000 gene expression signatures. Nucleic Acids Research, gku476

Examples

data(lincs.kd)