rbbt-util 5.23.26 → 5.23.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 523b38a8f29fd560ffc459beb5916fc56a05d9dc
4
- data.tar.gz: e89da52590052d42bc3b76aab1a314c7562851bc
3
+ metadata.gz: 727fd7ea14a972a4bbd10a93b3d5ff270f049d7d
4
+ data.tar.gz: 8f60c11ea14eca70d231e8a4e55208a51207d989
5
5
  SHA512:
6
- metadata.gz: cdbb5baa368689965925f8ba68a9c2216adc94acff0e116759374176fbf6d2e2cda5b46f9f8b018f8bc211ac051deb0aa286f0482fd6eb21b23751248252c11a
7
- data.tar.gz: 5bb7aa53e0c9f21225775f2c4bb1439b0e7a65287ae572e3ce03aa87dab01b6dd119f15c5523b75bfe9aa7d97bd30b6f2326f6d76ccf0b7a332fc39c12ce05db
6
+ metadata.gz: 4bfcfd6f510295128945a4f3a759b755777063776f5b9478e3c94865854ecbc755714d61a9bb783b5beb18fd88f85ce03b4e87aa26f4bf794e40acee282f3972
7
+ data.tar.gz: 9c7d620f5acd24e129c210fe35476b8f055bb5170ce5698217b90406fc314b3b9a02d2d80142a5c744f5817f0c84ccdae6a1dd4a57b34703aa47a4a6b70ba8c9
@@ -31,6 +31,7 @@ module Persist
31
31
  file = file.find if Path === file
32
32
  patht = Open.mtime(path)
33
33
  filet = Open.mtime(file)
34
+ return true if patht.nil? || filet.nil?
34
35
  diff = patht - filet
35
36
  return diff if diff < 0
36
37
  return false
@@ -132,7 +132,17 @@ module Resource
132
132
  rake_dir, content = rake_for(path)
133
133
  rake_dir = Path.setup(rake_dir.dup, self.pkgdir, self)
134
134
  else
135
- raise "Resource is missing and does not seem to be claimed: #{ self } -- #{ path } "
135
+ begin
136
+ if path !~ /\.(gz|bgz)$/
137
+ begin
138
+ produce(path + '.gz', force)
139
+ rescue
140
+ produce(path + '.bgz', force)
141
+ end
142
+ end
143
+ rescue
144
+ raise "Resource is missing and does not seem to be claimed: #{ self } -- #{ path } "
145
+ end
136
146
  end
137
147
 
138
148
  if path.respond_to?(:find)
@@ -2,6 +2,7 @@ require 'rbbt/util/cmd'
2
2
  require 'rbbt/util/tmpfile'
3
3
  require 'rbbt/util/misc'
4
4
  require 'rbbt/util/misc/bgzf'
5
+ require 'pathname'
5
6
 
6
7
  require 'zlib'
7
8
 
@@ -710,7 +711,12 @@ module Open
710
711
  get_time_from_repo(*dir_sub_path)
711
712
  else
712
713
  file = file.find if Path === file
713
- File.mtime(file)
714
+ file = Pathname.new(file).realpath.to_s if File.symlink?(file)
715
+ begin
716
+ File.mtime(file)
717
+ rescue
718
+ nil
719
+ end
714
720
  end
715
721
  end
716
722
 
@@ -945,7 +945,7 @@ module Workflow
945
945
  all_d = (real_dependencies + real_dependencies.flatten.collect{|d| d.rec_dependencies} ).flatten.compact.uniq
946
946
 
947
947
  _inputs = assign_dep_inputs(_inputs, options, all_d, workflow.task_info(dep_task))
948
- jobname = _inputs[:jobname] if _inputs.include? :jobname
948
+ jobname = _inputs.delete :jobname if _inputs.include? :jobname
949
949
 
950
950
  job = workflow._job(dep_task, jobname, _inputs)
951
951
  ComputeDependency.setup(job, compute) if compute
@@ -53,6 +53,6 @@ else
53
53
  data = rbbt.tsv2matrix(rbbt.tsv('#{file}'))
54
54
  rbbt.pheatmap('#{png}', data, width=#{ width }, height=#{ height }, take_log=#{R.ruby2R logs}, positive=#{R.ruby2R positive})
55
55
  EOF
56
- `op #{png}`
56
+ `eog #{png}`
57
57
  end
58
58
  end
@@ -70,7 +70,12 @@ def report_msg(status, name, path, info = nil)
70
70
  task, status, workflow = Log.color(:yellow, info[:task_name]), Log.color(:blue, "file"), Log.color(:magenta, "-")
71
71
  end
72
72
 
73
- str = if not Open.remote?(path) and (Open.exists?(path) and $main_mtime and ($main_mtime - Open.mtime(path)) < 0)
73
+ path_mtime = begin
74
+ Open.mtime(path)
75
+ rescue
76
+ nil
77
+ end
78
+ str = if not Open.remote?(path) and (Open.exists?(path) and $main_mtime and path_mtime and ($main_mtime - path_mtime) < 0)
74
79
  status_msg(status.to_s) << " " << [workflow, task, path].compact * " " << " (#{Log.color(:red, "Mtime out of sync") })"
75
80
  else
76
81
  status_msg(status.to_s) << " " << [workflow, task, path].compact * " "
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.23.26
4
+ version: 5.23.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-16 00:00:00.000000000 Z
11
+ date: 2018-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake