IMP Reference Guide
develop.714915d50b,2024/12/07
The Integrative Modeling Platform
|
Simplified function for creating a spatiotemporal model. More...
Simplified function for creating a spatiotemporal model.
Functions | |
def | create_DAG |
This functions streamlines the process of creating a graph by performing all the necessary steps and saving relevant input to files. More... | |
def IMP.spatiotemporal.create_DAG.create_DAG | ( | state_dict, | |
input_dir = '' , |
|||
scorestr = '_scores.log' , |
|||
output_dir = '' , |
|||
spatio_temporal_rule = False , |
|||
subcomplexstr = '.config' , |
|||
expected_subcomplexes = [] , |
|||
score_comp = False , |
|||
exp_comp_map = {} , |
|||
out_cdf = True , |
|||
out_labeled_pdf = True , |
|||
out_pdf = False , |
|||
npaths = 0 , |
|||
draw_dag = True |
|||
) |
This functions streamlines the process of creating a graph by performing all the necessary steps and saving relevant input to files.
Features of this function are walked through in example/toy/Simple_spatiotemporal_example.py
state_dict | dictionary that defines the spatiotemporal model. The keys are strings that correspond to each time point in the stepwise temporal process. Keys should be ordered according to the steps in the spatiotemporal process. The values are integers that correspond to the number of possible states at that timepoint. Scores for each model are expected to be stored as $state_$timescorestr, where state are integers 1->value of the dictionary, time is the key in the dictionary, and scorestr is trailing characters, which are assumed to be constant for all states. |
input_dir | string, directory where the data is stored. Empty string assumes current working directory. |
scorestr | string, trailing characters at the end of the file with scores for each stage of the spatiotemporal model (default: '_scores.log'). |
output_dir | string, directory where the output will be written. Empty string assumes the same directory as the input_dir. |
spatio_temporal_rule | Boolean. If true, enforces that all components earlier in the assembly process are present later in the process. (default: False) |
subcomplexstr | string, trailing characters after the subcomplex file, which is a list of subcomplexes included in the given label/time (default: '.config') |
expected_subcomplexes | list of all possible subcomplex strings in the model (default: []) Should be a list without duplicates of all components in the subcomplex files. |
score_comp | Boolean to determine whether or not to score models based on the protein composition. |
exp_comp_map | dictionary for determining protein composition score. The keys are the proteins. The code checks if the name of these proteins are within the subcomplex_components for each node. As such, the naming scheme should be such that the keys of exp_comp_map are substrings of expected_subcomplexes the values of exp_comp_map should correspond to a csv file for each subcomplex with protein copy numbers. Each csv file should have 3 columns: 1) 'Time' - should correspond to the keys of state_dict, 2) 'mean' - mean copy number from experimental data, and 3) std - standard deviation from experimental data |
out_cdf | Boolean to determine whether or not to write out the cumulative distribution function (cdf) for the graph (default: True). filename: "cdf.txt" |
out_labeled_pdf | Boolean to determine whether to output the labeled pdf file, which includes both the pdf and the ordered states visited along each path (default: True). filename: "labeled_pdf.txt" |
out_pdf | Boolean to determine whether or not to write out the probability distribution function (pdf) for the graph (default: False) filename: "pdf.txt" |
npaths | int, write out the states along the n most likely paths, based on the pdf (default: 0) filename: "pathXX.txt", where XX is the number of the path |
draw_dag | Boolean to determine whether or not to write out a directed acyclic graph (dag) to a file (default: True) filename: "dag_heatmap" |
Definition at line 76 of file create_DAG.py.