skbold.utils.sort_numbered_list module

sort_numbered_list(stat_list)[source]

Sorts a list containing numbers.

Sorts list with paths to statistic files (e.g. COPEs, VARCOPES), which are often sorted wrong (due to single and double digits). This function extracts the numbers from the stat files and sorts the original list accordingly.

Parameters:stat_list (list or str) – list with absolute paths to files
Returns:sorted_list – sorted stat_list
Return type:list of str