Skip to content

Commit

Permalink
0.130 release
Browse files Browse the repository at this point in the history
  • Loading branch information
pfh committed Mar 15, 2015
1 parent 5593471 commit 37ffaf2
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
2 changes: 2 additions & 0 deletions nesoni/CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

0.130 - grace.status returns old status, bam reader restores old status after finishing

0.129 - slight tweak to error reporting
don't require SplitsTree to be installed

Expand Down
2 changes: 1 addition & 1 deletion nesoni/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION='0.129'
VERSION='0.130'
#^ Note: this first line is read by the setup.py script to get the version

import sys
Expand Down
10 changes: 2 additions & 8 deletions nesoni/grace.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,8 @@ def __exit__(self):
def status(string):
""" Display a status string. """
from nesoni import legion
legion.coordinator().set_status( legion.process_identity(), string )
#if sys.stderr.isatty():
# #Show in terminal title
# sys.stderr.write('\x1b]2;'+string+'\x07')
# sys.stderr.flush()
#
# #sys.stderr.write('\r\x1b[K\x1b[34m' + string + '\x1b[m\r')
# #sys.stderr.flush()
return legion.coordinator().set_status( legion.process_identity(), string )


def load(module_name):
status('Loading')
Expand Down
7 changes: 5 additions & 2 deletions nesoni/legion.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ def acquire_core(self):
self.trade_cores(0,1)

def set_status(self, identity, value):
old = self.statuses.get(identity,"")
if value:
self.statuses[identity] = value
elif identity in self.statuses:
Expand All @@ -305,6 +306,8 @@ def set_status(self, identity, value):
#Show in terminal title
sys.stderr.write('\x1b]2;'+status+'\x07')
sys.stderr.flush()

return old

def job(self, func, *args, **kwargs):
number = self.set_mail((func,args,kwargs))
Expand Down Expand Up @@ -870,11 +873,11 @@ def _make_inner(action):
if LOCAL.abort_make and not selection.matches(LOCAL.do_selection, [action.shell_name()]):
raise grace.Error('%s would be run. Stopping here.' % action.ident())

grace.status(action.ident())
old_status = grace.status(action.shell_name())
try:
_run_and_save_state(action, timestamp)
finally:
grace.status('')
grace.status(old_status)
finally:
if cores > 1:
coordinator().trade_cores(cores, 1)
Expand Down
2 changes: 1 addition & 1 deletion nesoni/nesoni-r/R/nesoni_version.R
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Autogenerated
nesoni_version <- function() { '0.128' }
nesoni_version <- function() { '0.129' }
4 changes: 3 additions & 1 deletion nesoni/sam.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ def next(self):

def bam_iter_fragments(filename, status_text='Processing'):
reader = Bam_reader(filename)

old_status = grace.status(status_text)

n = 0
n_ambiguous = 0
Expand Down Expand Up @@ -280,7 +282,7 @@ def bam_iter_fragments(filename, status_text='Processing'):

yield read_name, pairs + unpaired, unmapped

grace.status('')
grace.status(old_status)
if n_ambiguous:
print >> sys.stderr
print >> sys.stderr, 'The alignment pairing was unclear %s times, and alignments were paired arbitrarily.' % grace.pretty_number(n_ambiguous)
Expand Down

0 comments on commit 37ffaf2

Please sign in to comment.