[BioRuby] More Bl2seq questions

Trevor Wennblom trevor at corevx.com
Thu Sep 8 18:05:13 EDT 2005


Another question regarding Bl2seq.

This works:
  Bio::FlatFile.open(Bio::Blast::Bl2seq::Report, filename_bl2seq_output) 
do |ff|
    ff.each do |rep|
      rep.iterations.each do |itr|
        itr.hits.each do |hit|
          a = hit.identity
        end
      end
    end
  end

But this doesn't:
  Bio::FlatFile.open(Bio::Blast::Bl2seq::Report, filename_bl2seq_output) 
do |ff|
    ff.each do |rep|
      rep.iterations.each do |itr|
        itr.hits.each do |hit|
          a = hit.percent_identity
        end
      end
    end
  end

To make it work I have to go down to the HSP level: 
  Bio::FlatFile.open(Bio::Blast::Bl2seq::Report, filename_bl2seq_output) 
do |ff|
    ff.each do |rep|
      rep.iterations.each do |itr|
        itr.hits.each do |hit|
          hit.hsps.each do |hsp|
            a = hsp.percent_identity
          end
        end
      end
    end
  end


Shouldn't we be able to see percent_identity, percent_positive, 
positive, etc. on the hit level?

Trevor


More information about the BioRuby mailing list