Skip to content

Instantly share code, notes, and snippets.

@pcomans
Created May 12, 2011 09:14
Show Gist options
  • Save pcomans/968223 to your computer and use it in GitHub Desktop.
Save pcomans/968223 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'bio'
seq = Bio::Sequence::NA.new("atgcagctctttgtccgcgcccaggagctacacaccttcgaggtgaccggccaggaaacggtcgcccagatcaaggctcatgtagcctcactggagggcattgccccggaagatcaagtcgtgctcctggcaggcgcgcccctggaggatgaggccactctgggccagtgcggggtggaggccctgactaccctggaagtagcaggccgcatgcttggaggtaaagtccatggttccctggcccgtgctggaaaagtgagaggtcagactcctaaggtggccaaacaggagaagaagaagaagaagacaggtcgggctaagcggcggatgcagtacaaccggcgctttgtcaacgttgtgcccacctttggcaagaagaagggccccaatgccaactcttaa")
remote = Bio::Blast.remote('blastn', 'genes-nt', '-e 0.01')
blobj = remote.query(seq)
blobj.each_hit do |hit|
puts "#{hit.target_def} #{hit.evalue}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment