metric_arrays
Extract specified metrics from an AbstractRecordsAndFilesAPI instance’s read(retrieve_files=True) results object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
res_dict |
dict[str, DataFrame | dict[str, DataFrame]]
|
The output of an AbstractRecordsAndFiles instance. |
required |
metrics_dict |
dict[str, Callable]
|
A dictionary where the keys are metrics and the values are functions to apply to rows in the event that there are multiple rows with the same rownames. Set to None to raise error if duplicate rownames are found. |
required |
rownames |
str
|
Column name to use for row labels. |
'target_symbol'
|
colnames |
str
|
Column name to use for column labels. |
'regulator_symbol'
|
drop_incomplete_rows |
bool
|
When True, drops rows and columns with all NaN values. |
True
|
Returns:
Type | Description |
---|---|
dict[str, DataFrame]
|
A dictionary where the metric is the key and the value is a DataFrame. The column values are metric values, and the column names correspond to |
Raises:
Type | Description |
---|---|
AttributeError
|
If the values in |
KeyError
|
If the res_dict does not have keys ‘metadata’ and ‘data’ |
KeyError
|
If the data dictionary does not have the same keys as the ‘id’ column |
ValueError
|
If the metadata does not have an ‘id’ column |
ValueError
|
If either the metadata or the data dictionary values are not DataFrames |
ValueError
|
If the |
ValueError
|
If the |
ValueError
|
If the metrics are not in the data dictionary |
Source code in yeastdnnexplorer/interface/metric_arrays.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
|