Skip to content

Commit

Permalink
Merge pull request #65 from wtsi-npg/devel
Browse files Browse the repository at this point in the history
release 0.12
  • Loading branch information
dozy committed Jan 27, 2015
2 parents 24b821d + 9c43d31 commit 9bc2103
Show file tree
Hide file tree
Showing 27 changed files with 3,214 additions and 6,150 deletions.
19 changes: 18 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
CHANGES LOG
-----------

release 0.12
-viv.pl
read/write to/from stdin/stdout
exec failure of a node's command is now fatal (bug fix)

-vtfp.pl
updated to use new subst_params format in templates
multiple -keys/-values pairs on the command-line now produce an array on substitution into the template
when substition of nested parameters is done, array elements which are themselves arrays are flattened
(its elements are spliced into the position of the original array); net result is that top-level
parameter substitutions result in either strings or arrays of strings

-templates
new subst_params format for production templates
changes to final_output_prep template to add flexibility to this phase of analysis (e.g. y chrom. split)
output of seqchksum files for hash type sha512primesums512 added

release 0.09
-install action should not remove lib directory at target
-install action should not remove lib directory at target
3 changes: 0 additions & 3 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ bin/viv.pl
bin/vtfp.pl
Build.PL
Changes
data/bwamem_wtsi_stage2_template.vtf
data/snap_sample_template.vtf
data/tophat2_wtsi_stage2_template.vtf
examples/bwa_aln_cfg.png
examples/bwa_mem/bwa_mem_alignment.vtf
examples/bwa_mem/generic_alignment_with_phix.vtf
Expand Down
20 changes: 12 additions & 8 deletions bin/viv.pl
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
$logger->($VLMAX, "EXEC nodes(post EXEC nodes preprocessing): ", Dumper(%exec_nodes), "\n");
setpgrp; # create new processgroup so signals can be fired easily in suitable way later
# kick off any unblocked EXEC nodes, noting their details for later release of any dependants
$logger->($VLMED, qq[master process is $$\n]);
my %pid2id = ();
for my $node_id (keys %exec_nodes) {
my $wait_counter = $exec_nodes{$node_id}->{wait_counter};
Expand Down Expand Up @@ -205,7 +206,6 @@
sub _get_node_info {
my ($edge_id, $all_nodes) = @_;

my $from = $edge_id;
my ($id, $port);
# slightly more concise regex usage might be good here
if($edge_id =~ /^([^:]*):(.*)$/) {
Expand Down Expand Up @@ -303,16 +303,20 @@ sub _fork_off {
$0 .= q{ (pending }.$node->{'id'}.qq{: $cmd)}; #rename process so fork can be easily identified whilst open waits on fifo
open STDERR, q(>), $node->{'id'}.q(.).$$.q(.err) or croak "Failed to reset STDERR, pid $$ with cmd: $cmd";
select(STDERR);$|=1;
$node->{'STDIN'} ||= '/dev/null';
open STDIN, q(<), $node->{'STDIN'} or croak "Failed to reset STDIN, pid $$ with cmd: $cmd";
$node->{'STDOUT'} ||= '/dev/null';
open STDOUT, q(>), $node->{'STDOUT'} or croak "Failed to reset STDOUT, pid $$ with cmd: $cmd";
if(not $node->{use_STDIN}) { $node->{'STDIN'} ||= '/dev/null'; }
if($node->{'STDIN'}) {
open STDIN, q(<), $node->{'STDIN'} or croak "Failed to reset STDIN, pid $$ with cmd: $cmd";
}
if(not $node->{use_STDOUT}) { $node->{'STDOUT'} ||= '/dev/null'; }
if($node->{'STDOUT'}) {
open STDOUT, q(>), $node->{'STDOUT'} or croak "Failed to reset STDOUT, pid $$ with cmd: $cmd";
}
print STDERR "Process $$ for cmd $cmd:\n";
print STDERR ' fileno(STDIN,'.(fileno STDIN).') reading from '.$node->{'STDIN'} ."\n";
print STDERR ' fileno(STDOUT,'.(fileno STDOUT).') writing to '.$node->{'STDOUT'}."\n";
print STDERR ' fileno(STDIN,'.(fileno STDIN).') reading from '.($node->{'STDIN'}?$node->{'STDIN'}:'stdin') ."\n";
print STDERR ' fileno(STDOUT,'.(fileno STDOUT).') writing to '.($node->{'STDOUT'}?$node->{'STDOUT'}:'stdout') ."\n";
print STDERR ' fileno(STDERR,'.(fileno STDERR).")\n";
print STDERR " execing....\n";
exec @cmd;
exec @cmd or croak qq[Failed to exec cmd: ], join " ", @cmd;
}
else {
$logger->($VLMED, q[child exec not switched on], "\n");
Expand Down
Loading

0 comments on commit 9bc2103

Please sign in to comment.