Skip to content

Instantly share code, notes, and snippets.

@sminot
Created August 13, 2020 16:34
Show Gist options
  • Save sminot/9b345937d3adca053bcde411b388e263 to your computer and use it in GitHub Desktop.
Save sminot/9b345937d3adca053bcde411b388e263 to your computer and use it in GitHub Desktop.
from functools import lru_cache
import pandas as pd
@lru_cache(maxsize=128)
def parse_gff(gff_fp):
df = pd.read_csv(
gff_fp,
sep="\t",
comment="#",
header=None,
names=[
"seqname",
"source",
"feature",
"start",
"end",
"score",
"strand",
"frame",
"attribute",
]
)
return df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment