Learn R Programming

geneNetBP (version 1.0.0)

absorb.gnbp: Absorb evidence and infer a genotype-phenotype network

Description

Absorb a single piece or a spectrum of evidence for one or more continuous nodes in a compiled RHugin domain, obtain the updated beliefs and the Jeffrey's signed information.

Usage

absorb.gnbp(gpfit, node, evidence)

Arguments

gpfit
an object of class "gpfit". Output from fit.gnbp.
node
a character vector specifying the names of the nodes for which the evidence is to be absorbed.
evidence
a matrix or a numeric vector of evidence. number of rows of the matrix or the length of the vector should be equal to the length of node.

Value

  • absorb.gnbp returns an object of class "gnbp". The functions summary and print can be used for objects of class "gnbp". An object of class "gnbp" is a list containing the following components
  • gpan RHugin domain that is triangulated, compiled and with the latest absorbed evidence propagated
  • gp_flagtype of network
  • nodea character vector specifying the nodes for which evidence has been absorbed
  • marginala list of marginal probabilities for phenotypes (pheno) and genotypes (geno)
  • beliefa list of updated beliefs for phenotypes (pheno) and genotypes (geno)
  • JSIa matrix of Jeffrey's signed information if network is Conditional Gaussian, otherwise NULL if network is Discrete Bayesian
  • FCa list of two. a matrix FC of fold changes and a matrix pheno_state of phenotype node beliefs - state with maxium probability. If network is Conditional Gaussian, a NULL value is returned.
  • The marginals, beliefs and JSI or FC are calculated for only d-connected nodes. If a sequence of evidence is absorbed for a single node in a Conditional Gaussian network, a plot of JSI vs evidence is drawn.

See Also

gen.evidence

Examples

Run this code
data(mouse)

## Simple example : Fit a bayesian network to genotype-phenotype data 
network<-fit.gnbp(mousegeno,mousepheno,alpha=0.1)

## Absorb a single evidence for a single node
absorb.gnbp(network,node="Tlr12",evidence=matrix(2.5))

## Absorb a sequence of evidence for a single node generated using \code{\link{gen.evidence}
network<-fit.gnbp(mousegeno,mousepheno,alpha=0.1)
evidence<-gen.evidence(network,node="Tlr12")
absorb.gnbp(network,node="Tlr12",evidence=evidence)

##Absorb sequence of evidence for multiple nodes}
network<-fit.gnbp(mousegeno,mousepheno,alpha=0.1)
evidence<-gen.evidence(network,node=c("Ak2","Ptp4a2","Hmgcl"),std=2,std.equal=TRUE)
absorb.gnbp(network,node=rownames(evidence),evidence=evidence)

Run the code above in your browser using DataLab