Bio-Graphics-Glyph-decorated_gene

 view release on metacpan or  search on metacpan

lib/Bio/Graphics/Glyph/decorated_transcript.pm  view on Meta::CPAN


chr1   my_source   mRNA  74796  75599   .  +  .  ID=rna_gene-1;protein_decorations=SignalP40:SP:1:23:0:my_comment,TMHMM:TM:187:209:0

Each protein decoration consists of six fields separated by a colon:

1) Type. For example used to specify decoration source (e.g. 'SignalP40')
2) Name. Decoration name. Used as decoration label by default (e.g. 'SP' for signal peptide)
3) Start. Start coordinate at the protein-level (1-based coordinate)
4) End. End coordinate at the protein-level
5) Score. Optional. Score associated with a decoration (e.g. Pfam E-value). This score can be used 
   to dynamically filter or color decorations via callbacks (see glyph options).
6) Description. Optional. User-defined description of decoration. The glyph ignores this description, 
   but it will be made available to callback functions for inspection. Special characters 
   like ':' or ',' that might interfere with the GFF tag parser should be avoided. 

If callback functions are used as glyph parameters (see below), the callback is called for each
decoration separately. That is, the callback can get called multiple times for the same CDS feature,
but each time with a different active decoration. The currently drawn (active) decoration is made available 
to the callback via the glyph method 'active_decoration'. The active decoration is returned in form
of a Bio::Graphics::Feature object, with decoration data fields mapped to corresponding feature
attributes in the following way:

lib/Bio/Graphics/Glyph/decorated_transcript.pm  view on Meta::CPAN

		(
			-type => $type,
			-name => $name,
			-display_name => $name,
			-start => $nt_start,
 			-end => $nt_end,
			-score => $score,
			-desc => $desc,
			-seq_id => $feature->seq_id,
			-strand => $feature->strand,
			-attributes => {   # remember protein coordinates for callbacks  
				'p_start' => $p_start, 
				'p_end' => $p_end 
			}
		);
		
		warn "DECORATION=$decoration --> $nt_start:$nt_end\n" if (DEBUG);

		push(@features, $f);
	}	
	

lib/Bio/Graphics/Glyph/decorated_transcript.pm  view on Meta::CPAN


Start coordinate at the protein-level (1-based coordinate)

=item 4. end

End coordinate at the protein-level

=item 5. score

Optional. Score associated with a decoration (e.g. Pfam E-value). This score can be used 
to dynamically filter or color decorations via callbacks (see glyph options).

=item 6. description

Optional. User-defined description of decoration. The glyph ignores this description, 
but it will be made available to callback functions for inspection. Special characters 
like ':' or ',' that might interfere with the GFF tag parser should be avoided. 

=back 

If callback functions are used as glyph parameters (see below), the callback is called for each



( run in 2.489 seconds using v1.01-cache-2.11-cpan-cdf2f3d4e48 )