[Bioperl-l] Changes to SearchIO/Writer/GbrowseGFF.pm

Susan J. Miller sjmiller at email.arizona.edu
Thu May 12 17:53:54 EDT 2005


Hi,

I've made a few changes to SearchIO/Writer/GbrowseGFF.pm:
1. Fixed what I believe is a small bug that appears for single-HSP +/- 
hits (use of wrong variables causing undefined value in concatenation)
2. Added an option to output the CIGAR line
3. Added an option to output e-values in the score column

Below are the diffs between bioperl 1.5 GbrowseGFF.pm and my code - if 
these seem reasonable perhaps they can be incorporated.

21,23c21
<                               -file           => ">result.gff"
<                               -output_cigar   => 1
<                               -output_signif  => 1);
---
 >                               -file           => ">result.gff");
80,81d77
<          :  -output_cigar  => 1   : output cigar lines
<          :  -output_signif => 1   : output e-value in score column
89c85
<     my ($evalue, $cigar, $signif) = $self->_rearrange(["E_VALUE", 
"OUTPUT_CIGAR", "OUTPUT_SIGNIF"], @args);
---
 >     my ($evalue) = $self->_rearrange(["E_VALUE"], @args);
91,92d86
<     $self->{_cigar} = $cigar;
<     $self->{_signif} = $signif;
153c147
<     my ($GFF, $cigar, $score);
---
 >     my $GFF;
161d154
<
171,175c164
<         if (defined $self->{_signif}) {
<           $score = $hit->significance;
<         } else {
<           $score = $hit->raw_score;
<         }
---
 >         my $score = $hit->raw_score;
222,224d210
<
<             #retrieve cigar line for possible output
<             $cigar = $hsp->cigar_string;
231d216
<
243,245c228
<         if (defined $self->{_cigar}) {
<             $tags{'Gap'} = $cigar;
<         }
---
 >
264c247
<             # The following lines should use $qmmin, $qmmax instead of 
$qpmax, $qpmin
---
 >
267,268c250,251
<                 $tags{'tstart'} = $qmmin;
<                 $tags{'tend'}   = $qmmax;
---
 >                 $tags{'tstart'} = $qpmax;
 >                 $tags{'tend'}   = $qpmin;
271c254
<                 $tags{'Target'} = "EST:$seqname $qmmin $qmmax";
---
 >                 $tags{'Target'} = "EST:$seqname $qpmax $qpmin";
274,276d256
<         if (defined $self->{_cigar}) {
<             $tags{'Gap'} = $cigar;
<         }
300,304c280,281
<             if (defined $self->{_signif}) {
<               $score  = $hsp->significance;
<             } else {
<               $score  = $hsp->score;
<             }
---
 >             my $score  = $hsp->score;
 >
317,319d293
<         if (defined $self->{_cigar}) {
<             $tags{'Gap'} = $cigar;
<         }
342,346c316,317
<             if (defined $self->{_signif}) {
<               $score  = $hsp->significance;
<             } else {
<               $score = $hsp->score;
<             }
---
 >             my $score = $hsp->score;
 >
359,361d329
<         if (defined $self->{_cigar}) {
<             $tags{'Gap'} = $cigar;
<         }

-- 
Regards,
-susan

Susan J. Miller
Biotechnology Computing Facility
Arizona Research Laboratories
Bio West 228
University of Arizona
Tucson, AZ  85721
(520) 626-2597



More information about the Bioperl-l mailing list