Skip to content

Instantly share code, notes, and snippets.

@robsyme
Created November 27, 2009 06:18
Show Gist options
  • Save robsyme/243854 to your computer and use it in GitHub Desktop.
Save robsyme/243854 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require 'rubygems'
require 'bio'
Bio::Blast.reports(ARGF) do |report|
query_name = report.query_def
top_hit = report.hits.max {|one,two| one.bit_score <=> two.bit_score }
puts "#{query_name}\t#{top_hit.target_def}\t#{top_hit.evalue}\t#{top_hit.bit_score}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment