Sha256: 7852419121f306b90da65a5b1dac03111fbd8adb20272d7b9fde911138664a5f
Contents?: true
Size: 541 Bytes
Versions: 4
Compression:
Stored size: 541 Bytes
Contents
#!/usr/bin/env ruby require 'cri' trap "INT" do $interupted = true end Signal.trap("PIPE", "EXIT") root_cmd = Cri::Command.new_basic_root.modify do name 'prot2pept' required :p, :pattern, "cleavage pattern to split input protein (default: ([KR])([^P]))" run do |opts, args, cmd| pattern = opts.fetch(:pattern, "([KR])([^P])") $stdin.each_line do |prot| break if $interupted puts prot.gsub(/#{pattern}/,"\\1\n\\2").gsub(/#{pattern}/, "\\1\n\\2").split("\n").reject(&:empty?) end end end root_cmd.run(ARGV)
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
unipept-0.3.2 | bin/prot2pept |
unipept-0.3.1 | bin/prot2pept |
unipept-0.3.0 | bin/prot2pept |
unipept-0.2.10 | bin/prot2pept |