Skip to content

Commit

Permalink
added printing of all parameter settings in Param object to statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
ksahlin committed Feb 17, 2016
1 parent a0ff96c commit f38c8d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions BESST/Parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ def __init__(self, parameter_mean_coverage=None, parameter_std_dev_coverage=None
self.NO_ILP = NO_ILP
self.FASTER_ILP = FASTER_ILP

def get_params(self):
output = "param\tvalue\n"
values = "".join([ "{0}\t{1}\n".format(attr, value) if value == None or type(value) in [bool, int,float, file] or len(value) < 5 else "" for attr, value in self.__dict__.items() if not callable(value)])
output += values
return output

class counters(object):
def __init__(self, param_count=None, param_non_unique=None, param_non_unique_for_scaf=None,
param_nr_of_duplicates=None, param_prev_obs1=None, param_prev_obs2=None,
Expand Down
5 changes: 4 additions & 1 deletion runBESST
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ def main(options):
shutil.copyfileobj(open("{0}/repeats.fa".format(param.output_directory, str(i+1) ), 'rb'), destination)
destination.close()
os.remove( "{0}/pass{1}/Scaffolds-pass{1}.fa".format(param.output_directory, str(i+1)) )


all_parameter_settings = param.get_params()
print >> Information, all_parameter_settings

param.first_lib = False #not the first lib any more

if not options.separate_repeats:
Expand Down

0 comments on commit f38c8d2

Please sign in to comment.