analysis

Classes

Analysis(simulation_key, experiment, ...)

Workflow for statistical testing on features of simulated tumor sample data.

class Analysis(simulation_key: str, experiment: metrics.analysis.experiment.Experiment, timepoint: float, observation_timepoint: float, features: List[Union[metrics.feature.continuous_feature.ContinuousFeature, metrics.feature.discrete_feature.DiscreteFeature]])[source]

Workflow for statistical testing on features of simulated tumor sample data.

key

Simulation key.

Type

str

experiment

Experiment object.

Type

Experiment

timepoint

Time point to execute statistical test.

Type

float

observation_timepoint

Time point of observation to execute statistical test.

Type

float

features

Feature object.

Type

List[Union[ContinuousFeature, DiscreteFeature][

calculate_feature(data: pandas.core.frame.DataFrame, feature: Union[metrics.feature.continuous_feature.ContinuousFeature, metrics.feature.discrete_feature.DiscreteFeature]) pandas.core.frame.DataFrame[source]

Calculate statistical comparison of a feature between a sample and the simulation population.

Parameters
  • data – Simulation data.

  • feature – Feature object.

calculate_features(data: pandas.core.frame.DataFrame) pandas.core.frame.DataFrame[source]

Calculate statistical comparison of features between a sample and the simulation population.

Parameters

data – Simulation data.

Returns

Stats data calculated with the given features.

static extract_sample_data(sample: Union[metrics.sample.sample_needle.SampleNeedle, metrics.sample.sample_punch.SamplePunch], simulation_data: pandas.core.frame.DataFrame) pandas.core.frame.DataFrame[source]

Extract sample from simulation data.

Parameters
Returns

sample_data – Extracted sample data.

Return type

pd.DataFrame

static get_feature_list() List[metrics.feature.feature.Feature][source]

Return a list of valid Feature objects.

Returns

List of Feature objects.