def parse_wig(line):
    """Parse a wig line"""
    
    standard_chroms={'I':'chrI','II':'chrII','III':'chrIII','IV':'chrIV','V':'chrV','M':'chrM','X':'chrX'}
    
    if re.search(r'track',line): 
        try:
            description=re.search(r'description="([A-Za-z0-9]+)"\s',line).group(1)
            if not self.description: self.description=description
        except __HOLE__:
            pass
    elif re.search(r'chrom=([A-Za-z0-9]+)\s',line):
        chrom=re.search(r'chrom=([A-Za-z0-9]+)\s',line).group(1)
        try:
            chrom=standard_chroms[chrom]
        except KeyError:
            pass
dataset/ETHPy150Open taoliu/taolib/Assoc/inout.py/parse_wig