unipept 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 600ed2755ace1b8b8b617e9e0065ee94ba7ca54a
4
- data.tar.gz: 2a243e1447775619c9647e8686392dda876d9531
3
+ metadata.gz: 50644c602dbd81f19cb9fe9227c961b7f201c558
4
+ data.tar.gz: f3d2c2640f96499686872f522f0862381268cda4
5
5
  SHA512:
6
- metadata.gz: 05527d12256c915151a261e29ab6be21bce9f787ed004b9607e4b63f76bc4b8d1d0224933e32702915bd90ac663779f8b626f44d36d69759d1ca8a70885b3dea
7
- data.tar.gz: cb2590b866380a7658827e615598bbe640004bfe5d19cc72160cc8081da37f57c8dafde1bf181ecf475f0ac69c66db4aad13011d33336688225282818d06db86
6
+ metadata.gz: a093829d561541fb505d676c386aa7503baf38c8295c8c002c012b24f4131324c1ade7261c0cdadb660a02cbe85ce332c3bffa11f138859bd20dd58cee35895c
7
+ data.tar.gz: 6824cac10d9ef6eb5621795ca0a0ab5e06cfb653c3470294fe918b45ea81d52ed054f7784077d2b359c74a70299b5ea7601460213f8448d6d67a505eabbffd22
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.3
data/bin/peptfilter CHANGED
@@ -1,10 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'cri'
3
3
 
4
- trap "INT" do
5
- $interupted = true
6
- end
7
4
  Signal.trap("PIPE", "EXIT")
5
+ Signal.trap("INT", "EXIT")
8
6
  root_cmd = Cri::Command.new_basic_root.modify do
9
7
  name 'peptfilter'
10
8
  flag :i, :unique, "only output unique peptides"
@@ -18,7 +16,6 @@ root_cmd = Cri::Command.new_basic_root.modify do
18
16
  lacks = opts.fetch(:lacks, "").chars.to_a
19
17
  contains = opts.fetch(:contains, "").chars.to_a
20
18
  $stdin.each_line do |pept|
21
- break if $interupted
22
19
  pept = pept.chomp
23
20
  length_ok = pept.length >= minlen && pept.length <= maxlen
24
21
  lacks_ok = (pept.chars.to_a & lacks).size == 0
data/bin/prot2pept CHANGED
@@ -1,17 +1,14 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'cri'
3
3
 
4
- trap "INT" do
5
- $interupted = true
6
- end
7
4
  Signal.trap("PIPE", "EXIT")
5
+ Signal.trap("INT", "EXIT")
8
6
  root_cmd = Cri::Command.new_basic_root.modify do
9
7
  name 'prot2pept'
10
8
  required :p, :pattern, "cleavage pattern to split input protein (default: ([KR])([^P]))"
11
9
  run do |opts, args, cmd|
12
10
  pattern = opts.fetch(:pattern, "([KR])([^P])")
13
11
  $stdin.each_line do |prot|
14
- break if $interupted
15
12
  puts prot.gsub(/#{pattern}/,"\\1\n\\2").gsub(/#{pattern}/, "\\1\n\\2").split("\n").reject(&:empty?)
16
13
  end
17
14
  end
data/bin/unipept CHANGED
@@ -8,13 +8,8 @@ require 'fileutils'
8
8
 
9
9
  require_relative '../lib/unipept'
10
10
 
11
- $interupted = false
12
-
13
- trap "INT" do
14
- puts "Interupted, exiting..."
15
- $interupted = true
16
- end
17
-
11
+ Signal.trap("PIPE", "EXIT")
12
+ Signal.trap("INT", "EXIT")
18
13
  class ApiRunner < Cri::CommandRunner
19
14
 
20
15
  def initialize(args, opts, cmd)
@@ -79,11 +74,6 @@ class ApiRunner < Cri::CommandRunner
79
74
  num_req = 0
80
75
 
81
76
  peptide_iterator(peptides) do |sub_division, i|
82
- if $interupted
83
- $stdin.close
84
- exit 1
85
- end
86
-
87
77
  request = Typhoeus::Request.new(
88
78
  @url,
89
79
  method: :post,
data/bin/uniprot CHANGED
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'faraday'
3
+ Signal.trap("PIPE", "EXIT")
4
+ Signal.trap("INT", "EXIT")
3
5
  ARGV.each do |arg|
4
6
  resp = Faraday.get("http://www.uniprot.org/uniprot/#{arg}.fasta")
5
7
  if resp.success?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unipept
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toon Willems
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-07 00:00:00.000000000 Z
11
+ date: 2014-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: shoulda