def ReadIgnoreFile(infile):
    """Parses a file indicating which communities should be skipped by
    RemoveLowComplexityRepeats.

    The numbers of communities to skip should be separated by commas
    Lines beginning with # will be treated as comments and skipped
    (eg providing justification for skipping these communities).
    """
    ignore_list=[]
    inhandle=open(infile, 'r')
    for line in inhandle:
        #Skip comments
        if line[0]=='#': continue
        ignore_list+=line.split(',')

    inhandle.close()
    return ignore_list