From f38c8d27bb189da81a8f8ba27dffb305f1bcca5e Mon Sep 17 00:00:00 2001 From: Kristoffer Sahlin Date: Wed, 17 Feb 2016 13:11:39 -0500 Subject: [PATCH] added printing of all parameter settings in Param object to statistics --- BESST/Parameter.py | 6 ++++++ runBESST | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/BESST/Parameter.py b/BESST/Parameter.py index 9bb3bc3..5c011b5 100644 --- a/BESST/Parameter.py +++ b/BESST/Parameter.py @@ -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, diff --git a/runBESST b/runBESST index 755ae66..83f5798 100755 --- a/runBESST +++ b/runBESST @@ -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: