52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
# File 'bin/biohello.rb', line 52
def show_usage
prog = File.basename($0)
usage = %Q[
Usage:
% #{prog} \[options...\] string
% #{prog} \[options...\] file
Options:
-e or --encode
Encode the given string or file contents as a DNA sequence. (default)
-d or --decode
Decode a DNA encoded string.
-x or --helix
Show a DNA double strand helix in ASCII art.
-c or --code
Show the BioRuby code snippet.
-h or --help
Print this help message.
Examples:
% #{prog} file
% #{prog} -e file
% #{prog} -d file
% #{prog} "BioRuby is fun"
% #{prog} -e "BIORUBY*IS*FUN"
% #{prog} -d "nacatatagagatganactattaaataagttaattttgaaat"
% #{prog} -x "I love you"
% #{prog} -x -e "I*LOVE*YOU"
% #{prog} -x -d "atataattataggtagaataatattagtga"
% #{prog} -c "A happy new year"
% #{prog} -c -e "A*HAPPY*NEW*YEAR"
% #{prog} -c -d "gcataacatgcacctccttattaaaatgaatggtaatatgaagcaaga"
]
puts usage
exit
end
|