-
-
Save michaelbarton/9396 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BLAST protein YDL177C | |
BLAST dna YDL177C |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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