share/rbbt_commands/workflow/prov in rbbt-util-5.22.3 vs share/rbbt_commands/workflow/prov in rbbt-util-5.22.4
- old
+ new
@@ -43,11 +43,11 @@
color = case status.to_sym
when :error, :aborted, :missing, :dead
:red
when :streaming, :started
:cyan
- when :done
+ when :done, :noinfo
:green
when :dependencies, :waiting, :setyp
:yellow
else
if status.to_s.index ">"
@@ -71,11 +71,11 @@
else
status_msg(status.to_s) << " " << [workflow, task, path] * " "
end
if $inputs and $inputs.any?
- job_inputs = info[:inputs]
+ job_inputs = Workflow.load_step(path).recursive_inputs.to_hash
IndiferentHash.setup(job_inputs)
$inputs.each do |input|
value = job_inputs[input]
next if value.nil?
@@ -132,20 +132,21 @@
else
workflow, task, name = path.split("/")[-3..-1]
end
name = name.split(":").last
status = :unsync if status == :done and not File.exist? path
+ shapes = Hash.new "circle"
edge_info = {:status => status, :workflow => workflow, :task => task, :name => name, :label => task, :shape => shapes[workflow], :color => status == 'remote' ? 'blue' : 'green'}
id = Misc.digest(path)
edges = []
node_info = {}
node_info[id] = edge_info
if info[:dependencies]
info[:dependencies].each do |task,name,path|
dep = get_step path
_id, _edges, _node_info = adjacency(dep)
- edges << [id, _id]
+ edges << [_id, id]
edges.concat _edges
node_info.merge!(_node_info)
end
end
@@ -171,22 +172,19 @@
end
end
require 'rbbt/util/R'
- ppp Open.read edge_file
- ppp Open.read node_info_file
-
R.run <<-EOF
nodes <- read.csv("#{node_info_file}", header=T, as.is=T)
links <- read.csv("#{edge_file}", header=T, as.is=T)
library(igraph)
net <- graph.data.frame(links, nodes, directed=T)
net <- simplify(net, remove.multiple = F, remove.loops = T)
- png("#{options[:plot]}")
+ png("#{options[:plot]}", width=1000, height=1000)
plot(net, edge.arrow.size=0.4, vertex.label=net$label, vertex.color=net$color)
dev.off()
EOF
end
end