import re


def getRoutes(sim_type, data, letters):
    """Get raw data actual pathways and convert to node routes."""
    all_actual_pathways = [data[i] for i in range(len(data))]
    split_routes = [re.findall('.',route) for route in all_actual_pathways]
    Routes = [[letters.index(r) + 1 for r in route] for route in split_routes]
    if sim_type == 'Raw Pathways':
        Routes = [[1] + route for route in Routes]
    return Routes