lhhunghimself / fastBMA

Fast, scalable, parallel and distributed inference of very large networks by Bayesian Model Averaging
MIT License
4 stars 3 forks source link

Possibility to provide list of regulators #3

Open simonvh opened 6 years ago

simonvh commented 6 years ago

Is it possible to treat only a subset of the genes as potential regulators?

lhhunghimself commented 6 years ago

In Bayesian terms, choosing a subset of regulators is the same as setting a higher prior probability that they are regulators which fastBMA allows you to do using the --priorsList option

The default prior is 2.76/6000 so if you set the prior for a regulator gene pair to something less than the oddsRatio of this for unwanted regulators, they will almost certainly be ignored after the first round of model generation (eg. oddsRatio of 1000 use a prior 1/1000 of the default or less). In this case you are saying "I don't know whether my subset of genes are real regulators but I know that any real regulators are from this subset".

Alternatively, if you feel strongly that some of these genes are real regulators, have a feel for which ones are more likely to be regulators, then set the priors for potential regulators in your subset to something higher than the default prior, close to your level of belief. Either method or combination of methods will work - the scale of the edge weights will be higher in the second approach and you can designate which genes in the subset of regulators you more strongly believe in and the predictions will naturally be more skewed towards your pre-conceptions which may be good or bad depending on what you want. However, fastBMA is fast enough that you can play with different methods and priors.

Note that since fastBMA uses ratios/log odds a prior of 0 will give an error. A prior of 1 would cause an error too but the code checks for that since and substitutes something close to 1. The code currently doesn't substitute a low value for 0 because differences between very small priors can/should have an effect.

simonvh commented 6 years ago

That makes sense. Thanks for a clear and detailed explanation!