mantlebio.core.analysis.mantle_analysis module#

class mantlebio.core.analysis.mantle_analysis.MantleAnalysis(analysis, session, storage_client, dataset_client)[source]#

Bases: object

Wrapper for Analysis proto object with functions that extend the functionality of the proto object

_wrap_method(method)[source]#
add_file_input(input_key, local_path)[source]#

Add a file input to the MantleAnalysis object.

Parameters:
  • input_key (str) – The key of the input.

  • local_path (str) – The local path of the file.

add_file_output(output_key, local_path)[source]#

Add a file output to the MantleAnalysis object.

Parameters:
  • output_key (str) – The key of the output.

  • local_path (str) – The local path of the file.

add_input(input_key, val, force=False)[source]#

Add an input to the MantleAnalysis object.

Parameters:
  • input_key (str) – The key of the input.

  • val (Any) – The value of the input.

add_output(output_key, val, force=False)[source]#

Add an output to the MantleAnalysis object.

Parameters:
  • output_key (str) – The key of the output.

  • val (Any) – The value of the output.

get_input(key)[source]#

Get the value of an input.

Parameters:

key (str) – The key of the input.

Returns:

The value of the input.

Return type:

Any

get_output(key)[source]#

Get the value of an output.

Parameters:

key (str) – The key of the output.

Returns:

The value of the output.

Return type:

Any

pull_entity(key, entity_id)[source]#

Pull a dataset from the analysis input.

Parameters:
  • key (str) – The key of the input.

  • entity_id (str) – The ID of the dataset.

Returns:

The pulled dataset.

Return type:

_IDataset

push_input(key)[source]#

Push a value to the analysis input.

Parameters:

key (str) – The key of the input.

push_output(key)[source]#

Push a value to the analysis output.

Parameters:

key (str) – The key of the output.

set_inputs(inputs)[source]#

Set the inputs of the MantleAnalysis object.

Parameters:

inputs (analysis_pb2.AnalysisInput) – The inputs of the MantleAnalysis object.

set_name(name)[source]#

Set the name of the MantleAnalysis object.

Parameters:

name (str) – The name of the MantleAnalysis object.

set_outputs(outputs)[source]#

Set the outputs of the MantleAnalysis object.

Parameters:

outputs (analysis_pb2.AnalysisOutput) – The outputs of the MantleAnalysis object.