Giter Club home page Giter Club logo

gff-parser's Introduction

GFF-Parser

A python GFF parser.

General Feature Format (GFF) also known as Gene-Finding Format is a file format which describes the features of genomic and protein sequences. A GFF file is a tab delimited text file where each feature is described on a single line.

More information about GFF format can be found at Wellcome Trust Sanger Institute.

e.g. for maize, the GFF file I used looks like -

9	ensembl	chromosome	1	156750706	.	.	.	ID=9;Name=chromosome:AGPv2:9:1:156750706:1
9	ensembl	gene	66347	68582	.	-	.	ID=GRMZM2G354611;Name=GRMZM2G354611;biotype=protein_coding
9	ensembl	mRNA	66347	68582	.	-	.	ID=GRMZM2G354611_T01;Parent=GRMZM2G354611;Name=GRMZM2G354611_T01;biotype=protein_coding
9	ensembl	intron	68433	68561	.	-	.	Parent=GRMZM2G354611_T01;Name=intron.1

Usage:

from gff import gffParser
import sys
    
input_file = sys.argv[1]
out = gffParser(input_file)

## get genes in the chromosome 1
out.getGenes("1")

## get mRNA corresponding to a gene
out.getmRNA(chrom, gene)

## get coding regions in the mRNA
out.getCDS(chrom, mRNA)

## get introns/exons
out.getInrons(chrom, mRNA)
out.getExonss(chrom, mRNA) 

gff-parser's People

Contributors

januverma avatar

Stargazers

Zonglin Yang avatar Arya avatar Enes Kemal Ergin avatar

Watchers

James Cloos avatar Janu Verma avatar

gff-parser's Issues

IndexError: list index out of range

Hey there,

I'm trying to parse my gff3 file.

File "gff_1.py", line 5, in
out = gffParser(input_file)
File "/myscratch/GFF-Parser/gff.py", line 35, in init
source = record[1]
IndexError: list index out of range

I keep getting this error, could you please help me?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.