constrain.utils
A script that provides utility functions
Functions
|
Count the occurences of each key in the input dict and returns the percentage of each key in the total values |
|
Convert "location" as Bio.SeqFeature.CompoundLocation to "start", "end", "strand" key-value pairs. |
|
Get mean from a list. |
|
" |
|
rename the keys of a dictionary using another dictionary Parameters: ----------- dictionary : Dict[K, V] The input dictionary trans_dictionary : Dict[K, K] The dictionary containing the keys to be replaced as keys and the new keys as values |
|
Split a dictionary into two based on a list of keys. Parameters: ----------- dictionary : Dict[Any, Any] The input dictionary key_list : List[str] The list of keys to split the dictionary on. |
|
Start and End Key Value pair to Compound Location Key Value pair. |
|
Unnest a dictionary by merging the values of a nested dictionary with the original dictionary, and renaming the key "label" to "name" |