Skip to content

Posteriors

MatthewThe edited this page Jul 29, 2019 · 1 revision

Printing posteriors to file

Triqler can output the raw posterior distributions using the flags --write_protein_posteriors <output_file>, --write_group_posteriors <output_file> and --write_fold_change_posteriors <output_file>. These are simple text files with on each line:

protein_id <tab> run/group/comparison <tab> prob_1 <tab> prob_2 <tab> ... <tab> prob_N

The log10 relative abundance values (the x-axis) are listed in the header. Note that the probabilities are normalized such that they add up to 1. To obtain a proper probability density function, one would have to multiply these values by 1/step_size, where by default step_size = 100

Plotting posteriors

The posteriors for a particular protein can be plotted as follows:

python -m triqler.distribution.plot_posteriors --protein_id <protein_id> <posterior_file>

Where <posterior_file> can be one of the posterior distribution output files obtained with the method above or, in fact, a Triqler input file. In the latter case, the posterior is calculated from scratch using hyperparameters estimated from the Triqler input file.

Clone this wiki locally