def parse_gtf(<EOL>filepath_or_buffer,<EOL>chunksize=<NUM_LIT> * <NUM_LIT>,<EOL>features=None,<EOL>intern_columns=["<STR_LIT>", "<STR_LIT:source>", "<STR_LIT>", "<STR_LIT>"],<EOL>fix_quotes_columns=["<STR_LIT>"]):
if features is not None:<EOL><INDENT>features = set(features)<EOL><DEDENT>dataframes = []<EOL>def parse_frame(s):<EOL><INDENT>if s == "<STR_LIT:.>":<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT>else:<EOL><INDENT>return int(s)<EOL><DEDENT><DEDENT>chunk_iterator = pd.read_csv(<EOL>filepath_or_buffer,<EOL>sep="<STR_LIT:\t>",<EOL>comment="<STR_LIT:#>",<EOL>names=REQUIRED_COLUMNS,<EOL>skipinitialspace=True,<EOL>skip_blank_lines=True,<EOL>error_bad_lines=True,<EOL>warn_bad_lines=True,<EOL>chunksize=chunksize,<EOL>engine="<STR_LIT:c>",<EOL>dtype={<EOL>"<STR_LIT:start>": np.int64,<EOL>"<STR_LIT:end>": np.int64,<EOL>"<STR_LIT>": np.float32,<EOL>"<STR_LIT>": str,<EOL>},<EOL>na_values="<STR_LIT:.>",<EOL>converters={"<STR_LIT>": parse_frame})<EOL>dataframes = []<EOL>try:<EOL><INDENT>for df in chunk_iterator:<EOL><INDENT>for intern_column in intern_columns:<EOL><INDENT>df[intern_column] = [intern(str(s)) for s in df[intern_column]]<EOL><DEDENT>if features is not None:<EOL><INDENT>df = df[df["<STR_LIT>"].isin(features)]<EOL><DEDENT>for fix_quotes_column in fix_quotes_columns:<EOL><INDENT>df[fix_quotes_column] = [<EOL>s.replace('<STR_LIT>', '<STR_LIT>').replace("<STR_LIT>", "<STR_LIT:->")<EOL>for s in df[fix_quotes_column]<EOL>]<EOL><DEDENT>dataframes.append(df)<EOL><DEDENT><DEDENT>except Exception as e:<EOL><INDENT>raise ParsingError(str(e))<EOL><DEDENT>df = pd.concat(dataframes)<EOL>return df<EOL>
Parameters
----------

filepath_or_buffer : str or buffer object

chunksize : int

features : set or None
    Drop entries which aren't one of these features

intern_columns : list
    These columns are short strings which should be interned

fix_quotes_columns : list
    Most commonly the 'attribute' column which had broken quotes on
    some Ensembl release GTF files.