Skip to content

Commit

Permalink
gpmap -m option added, doc fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
bver committed May 4, 2012
1 parent 5e9cc85 commit 870d089
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tools/gpmap.rb
Expand Up @@ -16,6 +16,12 @@
# -u, --used:
# print number of codons used for GP mapping
#
# -s, --supress:
# supress printing of the phenotype
#
# -g, --genotype:
# copy the genotype from $stdin before another output
#
# config.yaml is a configuration file with [grammar] and [mapper] sections.
# for instance:
# grammar:
Expand All @@ -41,12 +47,14 @@
[ "--track", '-t', GetoptLong::NO_ARGUMENT ],
[ "--used", '-u', GetoptLong::NO_ARGUMENT ],
[ "--help", '-h', GetoptLong::NO_ARGUMENT ],
[ "--supress", '-s', GetoptLong::NO_ARGUMENT ]
[ "--supress", '-s', GetoptLong::NO_ARGUMENT ],
[ "--genotype", '-g', GetoptLong::NO_ARGUMENT ]
)

used = false
track = false
supress = false
mirror = false
opts.each do |opt, arg|
case opt
when '--help'
Expand All @@ -62,6 +70,8 @@
track = true
when '--supress'
supress = true
when '--genotype'
mirror = true
end
end

Expand All @@ -73,6 +83,7 @@
mapper.track_support_on = track

$stdin.each_line do |chromozome|
puts chromozome if mirror
genotype = eval chromozome
next unless genotype.kind_of? Array
phenotype = mapper.phenotype genotype
Expand Down

0 comments on commit 870d089

Please sign in to comment.