[Bioperl-l] gff -> gene, or exonerate ->gene?

Lincoln Stein lstein at cshl.org
Mon Mar 24 13:43:20 EST 2003


Hi,

This code *should* work:

	while (my $feature = $gffio->next_feature) {
		next unless $feature->type =~ /transcript/;
		my $spliced = join '', map {$_->seq} $feature->Exon;
		my $protein = Bio::PrimarySeq->new($spliced)->translate->seq;
	}

This ought to work correctly for both forward and reverse strands.  Let me 
know if it doesn't.  It also assumes that your first exon begins at the ATG 
-- in other words, that it's a CDS and not really an exon.

Lincoln


On Friday 21 March 2003 11:41 am, Charles Hauser wrote:
> Hi,
>
> I am trying to see if exonerate faithfully predicts splice sites for the
> organism we work with.  So, I'd like to construct genes (exons only)
> from GFF files and compare the translations of these to 'known' gene
> products.
>
> I have not found a way yet to assemble exons usingBio::Tools::GFF?
> Are there better approaches?
>
>
> Charles
>
> my $gffio = Bio::Tools::GFF->new(
> 				 -file => $infile,
> 				 -gff_version => 2);
>
> my $feature;
> while($feature = $gffio->next_feature()) {
> ** -> assemble exons
> }
> $gffio->close();
>
>
> ##gff-version 2
> ##source-version exonerate:est2genome 0.6.7
> ##date 2003-03-20
> ##type DNA
> #
> #
> # seqname source feature start end score strand frame attributes
> #
> scaffold_17	exonerate:est2genome	gene	63923	66012	4300	+	.	gene_id	1	;	sequ
>ence	20021010.141.1.rev	;	gene_orientation	+	;
> scaffold_17	exonerate:est2genome	exon	63923	64093	4300	+	.	insertions	0	;	d
>eletions	0	;
> scaffold_17	exonerate:est2genome	splice5	64093	64095	4300	+	.	intron_id	1	;
>	splice_site	"GT"	;
> scaffold_17	exonerate:est2genome	intron	64157	64157	4300	+	.	intron_id	1	;
> ...
> # --- END OF GFF DUMP ---
>
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l

-- 
========================================================================
Lincoln D. Stein                           Cold Spring Harbor Laboratory
lstein at cshl.org			                  Cold Spring Harbor, NY
========================================================================




More information about the Bioperl-l mailing list