Skip to content

Instantly share code, notes, and snippets.

@michaelbarton
Forked from mndoci/gist:9315
Created September 8, 2008 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelbarton/9396 to your computer and use it in GitHub Desktop.
Save michaelbarton/9396 to your computer and use it in GitHub Desktop.
BLAST protein YDL177C
BLAST dna YDL177C
Blastable = Struct.new(:type,:target)
def protein(target); Blastable.new(:protein,target); end
def dna(target); Blastable.new(:dna,target); end
def Object.const_missing(const, *args)
# Maybe send this somewhere so the code is debuggable
return const.to_s
end
def blast(blastable)
puts "Performing a BLAST #{blastable.type} search for #{blastable.target}"
end
alias BLAST blast
alias Blast blast
text = File.open(ARGV.shift).read
self.instance_eval(text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment