def nameToChannel(name):
    """Returns the channel from the name of a file
    >>> name = 'foo_C07'
    >>> nameToChannel(name)
    '7'
    >>> name = 'foo_C12'
    >>> nameToChannel(name)
    '12'
    """
    channelString = name.split('_')[-1]
    if channelString[1] == '0':
        return channelString[-1]
    return channelString[1:]