API reference for Output() class¶
-
class
autoclasswrapper.
Output
(root_in_name='autoclass', root_out_name='autoclass_out', tolerate_error=False)¶ AutoClass output files and results.
- Parameters
root_in_name (string, optional (default: "autoclass")) – Root name to read input files generated by autoclass. Example: “autoclass” will lead to “autoclass.db2”, “autoclass.model”, “autoclass.s-params”…
root_out_name (string, optional (default: "autoclass_out")) – Root name to write output files Ex.: “autoclass_out” will lead to “autoclass_out.cdt”, “autoclass_out_stats.tsv”
tolerate_error (bool, optional (default: False)) – If True, countinue generation of autoclass input files even if an error is encounter. If False, stop at first error.
-
had_error
¶ Set to True if an error has been found in the generation of autoclass input files.
- Type
bool (defaut False)
-
case_number
¶ Number of cases (i.e. of genes/proteins).
- Type
int (default 0)
-
class_number
¶ Number of classes (i.e. clusters).
- Type
int (default 0)
-
stats
¶ Dataframe that contains, for all cases, main class and probability for all classes.
- Type
Pandas dataframe (default None)
-
df
¶ Dataframe that contains initial input data and associated clusters.
- Type
Pandas dataframe (default None)
-
experiment_names
¶ List of experiment (conditions) names. Corresponds to columns in the input data.
- Type
list of string (defaut [])
-
aggregate_input_data
(*args, **kwargs)¶ Aggregate autoclass classes with input data.
-
extract_results
(*args, **kwargs)¶ Extract results from autoclass.
Results extracted are: - Number of cases (i.e. genes/proteins) - Number of classes (i.e. clusters) - For each case X, most probable class - For each case X, probability to belong to class Y
-
handle_error
()¶ Handle error during data parsing and formating.
Function decorator.
- Parameters
f (function) –
- Returns
try_function
- Return type
function wrapped into error handler
-
write_cdt
(*args, **kwargs)¶ Write .cdt file for visualisation.
- Parameters
with_proba (bool (default False), optional) – If True, also writes probability of case to belong to each class.
-
write_class_stats
(*args, **kwargs)¶ Write class stat file.
Number of elements per class. Mean and standard deviation values per experiment. Missing values are skipped.
-
write_dendrogram
(*args, **kwargs)¶ Write dendrogram of hierarchical clustering of classes to file.