The function fit.gnbp
fits a conditional gaussian bayesian network or a discrete bayesian network at the specified level of significance alpha, to genotype-phenotype (QTL) data by the PC algorithm implemented in the RHugin package. The conditional probability tables are learnt for each node in the domain by the EM algorithm implemented in the RHugin package. Edges between the genotypes at SNP markers are not allowed and the genotypes are constrained to precede the phenotypes. The phenotypes should be either all numeric or all discrete. The function does not currently support mixture of discrete and continuous phenotypes. Additional domain knowledge in terms of edges should be provided as a list of constraints, the structure of which is described in detail in learn.structure
. Briefly, the constraints argument is a list of two elements: directed and undirected. Each of these elements in turn should be a list with two elements: required and forbidden. The elements of required and forbidden must be a character vector of length two specifying the names of the nodes. See learn.cpt
for details.
Note that this function works on Hugin domains. Since Hugin domains are external pointers and cannot be saved in R workspace, the RHugin package provides functions read.rhd
and write.rhd
for loading and saving the Hugin domains. See RHugin documentation for more information.
The function fit.dbn infers a discrete bayesian network structure from genotype-phenotype (QTL) categorical data by implementing score based and constraint based algorithms from the bnlearn package. The conditional probability tables are learnt for each node in the inferred network. The phenotypes should be ALL discrete variables. Additional domain knowledge in terms of edges should be provided as a whitelist
and blacklist
.Edges between the genotypes at SNP markers are not allowed and the genotypes are constrained to precede the phenotypes.
The supported algorithms from bnlearn are
- Score-based: Hill-Climbing (
hc
,default), Tabu Search (tabu
)
- Constraint-based: Grow-Shrink (
gs
), Incremental Association (iamb
), Fast Incremental Association (fast.iamb
), Interleaved Incremental Association (inter.iamb
)
- Hybrid: Max-Min Hill-Climbing (
mmhc
).
The algorithm can be specified by method
. Structure learning functions are implemented with their default parameters. If different parameter values are desired, it is recommended to learn the network structure independently using the bnlearn package.The inferred structure can be input as a graph object to fit.dbn
and then set learn="FALSE".