File: gencode.py

package info (click to toggle)
python-ncls 0.0.63-hotfix%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 376 kB
  • sloc: ansic: 2,412; python: 205; sh: 18; makefile: 5
file content (10 lines) | stat: -rw-r--r-- 312 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
import pandas as pd
from ncls import NCLS

d = pd.read_table("../gencode.v28.annotation.gtf.gz", usecols=[0, 3, 4], header=None, comment="#", names="Chromosome Start End".split(),  dtype={"Chromosome": "category"})

d = d[d.Chromosome == "chr1"]

n = NCLS(d.Start.values, d.End.values, d.index.values)

print(n)