cosifer.pipelines package

Submodules

cosifer.pipelines.pipeline_cli module

COSIFER client pipeline.

cosifer.pipelines.pipeline_cli.get_interaction_tables(output_directory)

Transform graphs from the output directory into interaction tables.

Parameters

output_directory (str) – path to the output directory

Returns

interaction tables from each method in a dictionary.

Return type

dict

cosifer.pipelines.pipeline_cli.method_selection(methods=None)

Select inference methods.

Parameters

methods (list) – list of inferencers to run. Defaults to None, a.k.a., use defaults.

Returns

a dictionary keyed by method name and inferencers as values.

Return type

dict

cosifer.pipelines.pipeline_cli.run(filepath, output_directory, standardize=True, samples_on_rows=True, sep='\t', fillna=0.0, header=0, index_col=0, methods=None, combiner=None, gmt_filepath=None, **kwargs)

Run COSIFER client pipeline.

Parameters
  • filepath (str) – path to the file.

  • output_directory (str) – path where to store the results.

  • standardize (bool, optional) – toggle data standardization. Defaults to True.

  • samples_on_rows (bool, optional) – flag to indicate whether data are following the format where each row represents a sample. Defaults to True.

  • sep (str, optional) – field separator. Defaults to ‘ ‘.

  • fillna (float, optional) – value used to fill NAs. Defaults to 0.

  • header (int, optional) – line for the header in the input file. Defaults to 0.

  • index_col (int, optional) – column index for the input index. Defaults to 0.

  • methods (list, optional) – inference methods. Defaults to None, a.k.a., only recommended methods.

  • combiner (str, optional) – combiner type. Defaults to None, a.k.a., no combination.

  • gmt_filepath (str, optional) – GMT file containing feature sets. Defaults to None, a.k.a., no GMT file provided.

cosifer.pipelines.pipeline_cli.run_combiner(combiner_name, interaction_tables_dict, output_directory)

Combine interaction tables received from every methods and save the interaction table in the output directory.

Parameters
  • combiner_name (str) – combiner type.

  • interaction_tables_dict (dict) – dictionary containing interaction tables from each method.

  • output_directory (str) – path to the output directory.

cosifer.pipelines.pipeline_cli.run_inference(data, selected_methods, output_directory)

Perform network inference of the data given a set of methods and save the predicted graphs in an output directory.

Parameters
  • data (pd.DataFrame) – input dataframe.

  • selected_methods (dict) – selected inference methods.

  • output_directory (str) – output directory.

cosifer.pipelines.pipeline_gui module

COSIFER GUI pipeline.

cosifer.pipelines.pipeline_gui.method_selection(methods=None)

Select inference methods.

Parameters

methods (list) – list of inferencers to run. Defaults to None, a.k.a., use defaults.

Returns

a dictionary keyed by method name and inferencers as values.

Return type

dict

cosifer.pipelines.pipeline_gui.run(data, results_filepath, methods=None, combiner='summa')

Run COSIFER GUI pipeline.

Parameters
  • data (pd.DataFrame) – data used for inference.

  • results_filepath (str) – path where to store the results.

  • methods (list, optional) – inference methods. Defaults to None, a.k.a., only recommended methods.

  • combiner (str, optional) – combiner type. Defaults to summa.

cosifer.pipelines.pipeline_gui.run_combiner(combiner_name, interaction_tables_dict, results_filepath)

Combine interaction tables received from every methods and save the interaction table to a output file.

Parameters
  • combiner_name (str) – combiner type.

  • interaction_tables_dict (dict) – dictionary containing interaction tables from each method.

  • results_filepath (str) – path to the results.

cosifer.pipelines.pipeline_gui.run_inference(data, selected_methods)

Perform network inference of the data given a set of methods and save the predicted graphs in an output directory.

Parameters
  • data (pd.DataFrame) – input dataframe.

  • selected_methods (dict) – selected inference methods.

Returns

interaction tables inferred with the selected methods.

Return type

dict

Module contents