Sha256: a5e5113933660c74d726d531f995f99b09fb17d4807c23803099b4f0488978e9

Contents?: true

Size: 1.3 KB

Versions: 8

Compression:

Stored size: 1.3 KB

Contents

#!/usr/bin/ruby -w


require 'optparse'

opt = {}
opt[:probability] = 1.0
opts = OptionParser.new do |op|
  op.banner = "USAGE: #{File.basename(__FILE__)} toppred.out"
  op.separator "Outputs toppred.yaml"
  op.separator "takes the highest probability structure"
  op.separator "for best structures of equal probability, takes first given"
  op.separator "Each line contains:"
  op.separator "<identifier>: String :"
  op.separator "                      num_found: Int"
  op.separator "                      num_certain_transmembrane_segments: Int"
  op.separator "                      num_putative_transmembrane_segments: Int"
  op.separator "                      best_structure_probability: Float"
  op.separator "                      transmembrane_segments:"
  op.separator "                        - probability: Float"
  op.separator "                          start: Int"
  op.separator "                          stop: Int"
  op.separator "                          aaseq: String"
  op.separator ""
  op.separator "OPTIONS:"
  op.on("-p", "--probability", Float, "min structure prob threshold (default #{opt[:probability]})") {|v| opt[:probability] = v}
end

opts.parse!


if ARGV.size == 0
  puts opts
  exit
end

file = ARGV.shift

File.open(file) do |fh|
  hash = Transmem.read_toppred(fh)
end

puts hash.to_yaml




Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mspire-0.4.9 script/toppred_to_yaml.rb
mspire-0.3.0 script/toppred_to_yaml.rb
mspire-0.3.9 script/toppred_to_yaml.rb
mspire-0.3.1 script/toppred_to_yaml.rb
mspire-0.4.4 script/toppred_to_yaml.rb
mspire-0.4.2 script/toppred_to_yaml.rb
mspire-0.4.5 script/toppred_to_yaml.rb
mspire-0.4.7 script/toppred_to_yaml.rb