def read_gtf_line(cols, field="<STR_LIT:name>"):
field = field.lower()<EOL>try:<EOL><INDENT>group = cols[<NUM_LIT:2>]<EOL>attrs = cols[<NUM_LIT:8>].split("<STR_LIT:;>")<EOL>name = [attr.strip().split("<STR_LIT:U+0020>")[<NUM_LIT:1>] for attr in attrs if attr.strip().split("<STR_LIT:U+0020>")[<NUM_LIT:0>].lower().endswith(field)]<EOL>if not name:<EOL><INDENT>name = [attr.strip().split("<STR_LIT:U+0020>")[<NUM_LIT:1>] for attr in attrs if attr.strip().split("<STR_LIT:U+0020>")[<NUM_LIT:0>].lower().endswith("<STR_LIT>")]<EOL><DEDENT>if not name:<EOL><INDENT>name = ["<STR_LIT:None>"]<EOL><DEDENT>biotype = [attr.strip().split("<STR_LIT:U+0020>")[<NUM_LIT:1>] for attr in attrs if attr.strip().split("<STR_LIT:U+0020>")[<NUM_LIT:0>].lower().endswith("<STR_LIT>")]<EOL>if biotype:<EOL><INDENT>group = biotype[<NUM_LIT:0>]<EOL><DEDENT>c = cols[<NUM_LIT:0>]<EOL>s = int(cols[<NUM_LIT:3>])<EOL>e = int(cols[<NUM_LIT:4>])<EOL>st = cols[<NUM_LIT:6>]<EOL>return [c, s, e, st, group, name[<NUM_LIT:0>]]<EOL><DEDENT>except(Exception, e):<EOL><INDENT>logger.error(cols)<EOL>logger.error("<STR_LIT>")<EOL>logger.error("<STR_LIT>")<EOL>logger.error("<STR_LIT>")<EOL>logger.error("<STR_LIT>")<EOL>logger.error("<STR_LIT>")<EOL>logger.error(e)<EOL>raise<EOL><DEDENT>
parse gtf line to get class/name information