Bpipe Version 0.9.9.5
===============

## Summary

This release has a smattering of handy features including much more flexible
options to limit concurrency based on memory limits, native support for
BED file for parallelising over genomic regions, and some other minor features.
A range of important bug fixes are included as well. One minor behavior change may 
be observed for pipelines using the `$threads` variable: this variable will now
only cause dynamic thread allocation if the `procs` config for that command is
either unset or is set to zero. The old behavior caused dynamic allocation of threads when
this value was set to 1, which was counterintuitive and confusing.

## Changes

 - Jobs are now automatically throttled based on memory if a memory 
   limit is set using `-m` flag or `limit { memory="<n>g" }` in bpipe.config.

 - Inline memory variable can now be used to reference the amount of memory
   specified in bpipe.config for a stage. Returns memory in GB.

 - Support for `memoryMargin` command config so that memory variable returns
   less memory than allocated to a job (to allow for memory overhead)
 
 - Add `maxFileNameLength` config parameter that will cause Bpipe to ensure file names
   do not exceed this length for file systems supporting limited file name length

 - Support for loading BED files as genomic regions to parallelize over,
   using built in `bed` command, eg: 
   
   `bed('test.bed', allowBreaks:false, padding: 20).split(10) * [ foo ]`

 - Add support for config for `groovy` command

 - Check clauses can now omit the `otherwise` clause. Such checks are 
   executed after a stage exits.

 - Add detailed command config to output displayed by `bpipe errors`

 - Change: dynamic thread allocation is now invoked when procs=0 
   OR unspecified, not procs=1 

 - Preliminary support for jobs in queued / waiting state to be reallocated
   if a pre-allocated job becomes available

## Fixes

 - Fix possible failure of `cleanup` to identify files as eligible due to incorrectly
   thinking they are pre-existing files

 - Fix `output.dir` set differently in consecutive stages sometimes nesting directories
   instead of creating at top level

 - Fix `bpipe test` generating a pipeline result, causing it to show up in `bpipe stats` and
   other commands

 - Fix 'bpipe errors' failing if non-xml files in .bpipe/results 

 - Fix 'bpipe errors' also showing log file tail                 

 - Fix ranged values not working in proc configuration    

 - Fix dynamic threads not used through if procs unset 

 - Fix stack traces having double groovy extension in file name

 - Fix segments not correctly represented in json graph output

