BNMPy.build_bn_from_kg

BNMPy.build_bn_from_kg.all_boolean_combos(n)[source]

Generates all boolean strings of length n, as tuples of 1s and 0s.

BNMPy.build_bn_from_kg.load_signor_network(gene_list, input_format='symbol', joiner='&', kg_filename='SIGNOR_2025_08_14.tsv', only_proteins=True, score_cutoff=None)[source]

Creates a boolean network from SigNOR using all of the provided genes. Tries to build a connected Steiner subgraph…

Args:

gene_list - list of gene symbols, gene ids, or uniprot ids. input_format - “symbol”, “id”, or “uniprot” joiner - “&”, “|”, “inhibitor_wins”, or “majority”, or “plurality” (difference between the last two: in plurality, a tie indicates 1, in majority, a tie indicates 0) kg_filename - “SIGNOR_2025_08_14.tsv” by default. “SIGNOR_formatted.tsv” can also be used (this is an older version of SigNOR). only_proteins - whether to only use protein nodes in SIGNOR for getting the subgraph (default: True) score_cutoff - minimum score threshold for edges to be included (default: None, includes all edges)

BNMPy.build_bn_from_kg.merge_PBN_string(original_string, KG_string, prob=0.5)[source]

Merge the original model and the KG model to a PBN prob: probability of the equations from the original model