miga-base 0.3.12.0 → 0.3.12.1

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
  SHA256:
3
- metadata.gz: 48d903a383d237f7b236d8ad1706a5fb017b31d320768353a1bc33846ea0d471
4
- data.tar.gz: 9b448f00992aa4152df34ded6a48105afe5c1daf1e994737f253b519f81c998f
3
+ metadata.gz: 27eb47a34686d0488ec7ea4fd46f1d483b544153e9602770341758053fbbd3d4
4
+ data.tar.gz: 4dd5dd7d68382191de3e863831d4ceebf36f3fa4aa87e1a3206560c04faf9cf9
5
5
  SHA512:
6
- metadata.gz: 1579eecdab3c38bda21678baa4c903c85dfbb07e19f993212d89f6b62e1561d4044b41cfc98d80e43780d1fd172ef607a92d5320ff570de87dafda03520f2d59
7
- data.tar.gz: d083fc8ae10735f647681d3924c8990951fc2a6ba7d501c10b89d32b0f00088a5128dfca2b24df118b2f8a56e3a5853d210933e300d7ab7bd3bd14c4bab90b8a
6
+ metadata.gz: c949c82c16dbc89b1ce2b8c7b37a15a18909a554f5ce6bff943f7a881fe1ee5f9d4827f3dea2eb5cb172501df154d7c2608a16444040e09472d38ec9b6b2b0c7
7
+ data.tar.gz: 33aee8986863e07eec41bc9a139cfa90c036a1bc6c73b70407b46a5dd92d2deff1a794bf9db89f2ffdfec7931b2191c6cf759b9bdc2ae33bec4a19979abb0d98
data/lib/miga/daemon.rb CHANGED
@@ -240,8 +240,8 @@ class MiGA::Daemon < MiGA::MiGA
240
240
  return false
241
241
  end
242
242
  flush!
243
- if loop_i==4
244
- say 'Housekeeping for sanity'
243
+ if loop_i == 12
244
+ say 'Probing running jobs'
245
245
  @loop_i = 0
246
246
  purge!
247
247
  end
data/lib/miga/version.rb CHANGED
@@ -10,7 +10,7 @@ module MiGA
10
10
  # - Float representing the major.minor version.
11
11
  # - Integer representing gem releases of the current version.
12
12
  # - Integer representing minor changes that require new version number.
13
- VERSION = [0.3, 12, 0]
13
+ VERSION = [0.3, 12, 1]
14
14
 
15
15
  ##
16
16
  # Nickname for the current major.minor version.
@@ -18,7 +18,7 @@ module MiGA
18
18
 
19
19
  ##
20
20
  # Date of the current gem release.
21
- VERSION_DATE = Date.new(2019, 04, 26)
21
+ VERSION_DATE = Date.new(2019, 8, 5)
22
22
 
23
23
  ##
24
24
  # Reference of MiGA.
data/scripts/ogs.bash CHANGED
@@ -23,6 +23,7 @@ if [[ -n $DS ]] ; then
23
23
  [[ -s "$file" ]] && continue
24
24
  echo "SELECT seq1,id1,seq2,id2,bitscore from rbm where id >= $MIN_ID;" \
25
25
  | sqlite3 "../../09.distances/02.aai/$i.db" | tr "\\|" " " \
26
+ | perl -pe 's/ gene_/ /g' \
26
27
  | awk '{ print $1">"$2"'"\\t"'"$3">"$4"'"\\t"'"$5 }' \
27
28
  > "$file.tmp"
28
29
  mv "$file.tmp" "$file"
@@ -34,9 +35,9 @@ if [[ -n $DS ]] ; then
34
35
  # Estimate OGs and Clean RBMs
35
36
  ogs.mcl.rb -o miga-project.ogs --abc miga-project.abc -t "$CORES"
36
37
  if [[ $(miga about -P "$PROJECT" -m clean_ogs) == "false" ]] ; then
37
- rm miga-project.abc
38
- else
39
38
  gzip -9 miga-project.abc
39
+ else
40
+ rm miga-project.abc
40
41
  fi
41
42
  fi
42
43
 
@@ -31,7 +31,7 @@ if [[ -e "../02.trimmed_reads/$b.2.clipped.fastq" ]] ; then
31
31
  > "$b.SingleReads.fa"
32
32
  gzip -9 -f "$b.SingleReads.fa"
33
33
  else
34
- mv "$b.1.fasta" "$b.SingleReads.fa"
34
+ mv "$b.1.fasta" "$b.SingleReads.fa"
35
35
  fi
36
36
 
37
37
  # Compress input at 01.raw_reads and 02.trimmed_reads
data/test/daemon_test.rb CHANGED
@@ -58,12 +58,12 @@ class DaemonTest < Test::Unit::TestCase
58
58
  end
59
59
  assert_equal(Time, d.last_alive.class)
60
60
  assert(out.string =~ /-{20}\n.*MiGA:#{p.name} launched/)
61
- 2.times{ d.in_loop }
62
- assert_equal(3, d.loop_i)
61
+ 10.times{ d.in_loop }
62
+ assert_equal(11, d.loop_i)
63
63
  out = capture_stdout do
64
64
  d.in_loop
65
65
  end
66
- assert(out.string =~ /Housekeeping for sanity/)
66
+ assert(out.string =~ /Probing running jobs/)
67
67
  assert_equal(0, d.loop_i)
68
68
  end
69
69
 
@@ -86,7 +86,7 @@ class DaemonTest < Test::Unit::TestCase
86
86
  assert(l[0] =~ /-{20}\n/)
87
87
  assert(l[1] =~ /MiGA:#{p.name} launched/)
88
88
  assert(l[2] =~ /-{20}\n/)
89
- assert(l[3] =~ /Housekeeping for sanity\n/)
89
+ assert(l[3] =~ /Probing running jobs\n/)
90
90
  end
91
91
  ensure
92
92
  Process.kill("KILL", $child) unless $child.nil?
@@ -58,7 +58,7 @@ module MiGA::DistanceRunner::Commands
58
58
  # Returns +nil+ otherwise
59
59
  def ani_after_aai(target, aai_limit = 85.0)
60
60
  aai = aai(target)
61
- ani(target) unless aai.nil? or aai < aai_limit
61
+ (aai.nil? or aai < aai_limit) ? nil : ani(target)
62
62
  end
63
63
 
64
64
  ##
@@ -255,7 +255,7 @@ begin
255
255
  cur_model = nil
256
256
  mask = []
257
257
  when /^#=GS (\S+)\/([\d\-]+)\s+DE/
258
- cur_model ||= genes.rassoc($1).first
258
+ cur_model ||= ( genes.rassoc($1) || [] ).first
259
259
  aln[ cur_model ] ||= [ "# #{cur_model} : #{$1} : #{$2}" ]
260
260
  when /^#=GC RF\s+(\S+)/
261
261
  aln[ cur_model ][ 1 ] ||= $1.upcase.tap do |i|
data/utils/subclades.R CHANGED
@@ -111,7 +111,8 @@ subclade_clustering <- function(out_base, thr, ani.d, dist_rdata) {
111
111
 
112
112
  # Silhouette
113
113
  say("Silhouette")
114
- k <- 2:min(length(labels(ani.d))-1, 100)
114
+ nn <- length(labels(ani.d))
115
+ k <- min(max(floor(0.005 * nn), 2), 20):min(nn-1, 100)
115
116
  cl <- makeCluster(thr)
116
117
  s <- parSapply(cl, k, function(x) {
117
118
  library(cluster)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miga-base
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.12.0
4
+ version: 0.3.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis M. Rodriguez-R
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-26 00:00:00.000000000 Z
11
+ date: 2019-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons