test_essentiality

Perform tests on an instance of cobra.Model using gene data.

Gene data currently only includes knockout screens. However, other types of experiments that make changes to individual genes such as expression modulation experiments, etc may be possible extensions in the future.

Module Contents

test_essentiality.test_gene_essentiality_from_data_qualitative(model, experiment, threshold=0.95)[source]

Expect a perfect accuracy when predicting gene essentiality.

The in-silico gene essentiality is compared with experimental data and the accuracy is expected to be better than 0.95. In principal, Matthews’ correlation coefficient is a more comprehensive metric but is a little fragile to not having any false negatives or false positives in the output.

Implementation: Read and validate experimental config file and data tables. Constrain the model with the parameters provided by a user’s definition of the medium, then compute a confusion matrix based on the predicted essential, expected essential, predicted nonessential and expected nonessential genes. The individual values of the confusion matrix are calculated as described in https://en.wikipedia.org/wiki/Confusion_matrix