Question: Draw Gene Models From Gff3 File
2
gravatar for inadamj
5.3 years ago by
inadamj50
Canada
inadamj50 wrote:

I have the following input GFF3 format and I want to pars it in javascript code since I did not find available tools to draw the gene models from gff file. I found many differences in the gff3 files.. What is the important fields to extract in order to draw the gene models.

I want to extract these field in order to give it to Scribl to draw the gene ..

I want the output to be like this genemodele

Here is the file : GFF

and this GFF

gene model visualization • 3.4k views
ADD COMMENTlink modified 2.0 years ago by Biostar ♦♦ 20 • written 5.3 years ago by inadamj50

"I have the following input GFF3 format ": where is it ?

ADD REPLYlink written 5.3 years ago by Pierre Lindenbaum120k

I put the link .. but my question is based on the differences that I found.

ADD REPLYlink written 5.3 years ago by inadamj50

Second link is not pointing to a GFF file. What differences are you seeing?

ADD REPLYlink modified 5.3 years ago • written 5.3 years ago by Chase Miller400

the number of the column is confusing some of the file they have 8 column while the other is less

ADD REPLYlink written 5.3 years ago by inadamj50

There are lots of "available tools to draw the gene models from gff file." For example: the GenomeTools package (introduction) , the Bio::Graphics libraries of Perl or Ruby and Bioconductor's rtracklayer.

ADD REPLYlink modified 5.3 years ago • written 5.3 years ago by Neilfws48k
3
gravatar for Chase Miller
5.3 years ago by
Chase Miller400
University of Utah
Chase Miller400 wrote:

Here's a jsbin that seems to work with both of your sample files (although I haven't checked very closely).

http://jsbin.com/cuy/1/edit?js,output

The parsing and drawing code is here

var canvas = document.getElementById('canvas');      
// Create Chart
chart1 = new Scribl(canvas, 770);
chart1.laneSizes = 18;

// grab gff data
var records = $("textarea").html().split('\n');

for (var i=0; i < records.length; i++) {
 // ignore comments
 if (records[i][0] == '#') continue;
 // parse gff fields
 var fields = records[i].split("\t");
 var seqid  = fields[0],
     source = fields[1],
     type   = fields[2],
     start  = parseInt(fields[3]),
     end    = parseInt(fields[4]),
     score  = fields[5],
     strand = fields[6],
     phase  = fields[7],
     attr   = fields[8];

 // add gene to chart with desired attributes
 var gene = chart1.addGene(start, end-start, strand);
 gene.name = type;
}

// Draw Chart
chart1.draw();
ADD COMMENTlink modified 5.3 years ago • written 5.3 years ago by Chase Miller400

thanks very much I wrote something similar and this makes me assure that I am correct.

ADD REPLYlink written 5.3 years ago by inadamj50
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 891 users visited in the last hour