This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

GTF Parsing

Project Description
[![Build Status](https://travis-ci.org/hammerlab/gtfparse.svg?branch=master)](https://travis-ci.org/hammerlab/gtfparse) [![Coverage Status](https://coveralls.io/repos/hammerlab/gtfparse/badge.svg?branch=master&service=github)](https://coveralls.io/github/hammerlab/gtfparse?branch=master)

gtfparse
========
Parsing tools for GTF (gene transfer format) files.

# Example usage

## Parsing all rows of a GTF file into a Pandas DataFrame

```python
from gtfparse import read_gtf_as_dataframe

# returns GTF with essential columns such as "feature", "seqname", "start", "end"
# alongside the names of any optional keys which appeared in the attribute column
df = read_gtf_as_dataframe("gene_annotations.gtf")

# filter DataFrame to gene entries on chrY
df_genes = df[df["feature"] == "gene"]
df_genes_chrY = df_genes[df_genes["seqname"] == "Y"]
```


## Getting gene FPKM values from a StringTie GTF file

```python
from gtfparse import read_gtf_as_dict

gtf_dict = read_gtf_as_dict(
"stringtie-output.gtf",
column_converters={"FPKM": float})

gene_fpkms = {
gene_name: fpkm
for (gene_name, fpkm, feature)
in zip(gtf_dict["gene_name"], gtf_dict["FPKM"], gtf_dict["feature"])
if feature == "gene"
}
```
Release History

Release History

This version
History Node

0.0.6

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
gtfparse-0.0.6.tar.gz (11.5 kB) Copy SHA256 Checksum SHA256 Source May 10, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting