From 4ecd60be1d78980fea10759db1515f5ee3e9eaa0 Mon Sep 17 00:00:00 2001 From: "C. Titus Brown" Date: Tue, 21 Jul 2015 18:55:02 -0400 Subject: [PATCH] minor cleanup --- ChangeLog | 59 ++++++++++++++++++---------------- khmer/kfile.py | 2 +- scripts/filter-abund-single.py | 1 - scripts/load-into-counting.py | 1 - scripts/normalize-by-median.py | 1 - tests/test_script_arguments.py | 2 -- 6 files changed, 33 insertions(+), 33 deletions(-) diff --git a/ChangeLog b/ChangeLog index 21ed4f849e..39d206cad0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,16 @@ -2015-07-20 Jacob Fenton +2015-07-21 Jacob Fenton * khmer/{kfile,khmer_args}.py: refactored information passing, made it so - space checks happen in the right directory - * oxli/build_graph.py,sandbox/collect-reads.py,scripts/{count-overlap, + space checks happen in the right directory. + * oxli/build_graph.py,sandbox/collect-reads.py,scripts/{ abundance-dist-single,filter-abund-single,load-into-counting, - make-initial-stoptags,normalize-by-median,partition-graph, - sample-reads-randomly,trim-low-abund}.py,tests/test_script_arguments.py: - changed to use new arg structure + normalize-by-median,trim-low-abund}.py,tests/test_script_arguments.py: + changed to use new arg structure for checking hashtable save space. + * oxli/functions.py,scripts/saturate-by-median.py: updated error message + to mention --force option. + * scripts/{count-overlap,load-into-counting,make-initial-stoptags, + partition-graph,sample-reads-randomly}.py: removed unnecessary call to + check_space. 2015-07-20 Titus Brown @@ -20,43 +24,44 @@ * oxli/{functions,build_graph}.py,scripts/{load-graph,normalize-by-median, abundance-dist}.py,tests/test_{normalize_by_median,subset_graph,hashbits, - oxli_function}.py: pylint cleanup + oxli_function}.py: pylint cleanup. 2015-07-17 Michael R. Crusoe - * Makefile, tests/test_read_aligner.py: import khmer when pylinting + * Makefile, tests/test_read_aligner.py: import khmer when pylinting. 2015-07-17 Michael R. Crusoe * lib/read_parser.{cc,hh}: use std::string everywhere to match existing - exceptions + exceptions. 2015-07-10 Jacob Fenton * khmer/kfile.py: changed check_valid_file_exists to recognize fifos as - non-empty - * tests/test_normalize_by_median.py: added test + non-empty. + * tests/test_normalize_by_median.py: added test. 2015-07-10 Jacob Fenton * oxli/functions.py: changed estimate functions to use correct letter - abbreviations - * sandbox/estimate_optimal_hash.py: changed to use renamed estimate - functions + abbreviations. + * sandbox/estimate_optimal_hash.py: changed to use renamed estimate + functions. * sandbox/unique-kmers.py: changed to not output recommended HT args by - default - * tests/test_oxli_functions.py: changed to use renamed estimate functions + default. + * tests/test_oxli_functions.py: changed to use renamed estimate functions. 2015-07-10 Jacob Fenton - * oxli/functions.py: added '--force' check to sanity check + * oxli/functions.py: added '--force' check to sanity check. 2015-07-10 Jacob Fenton - * oxli/functions.py: moved optimization/sanity check func to oxli + * oxli/functions.py: moved optimization/sanity check func to oxli. * scripts/normalize-by-median.py,oxli/build_graph.py: added - optimization/sanity checking via oxli estimation funcs - * tests/test_normalize_by_median.py: updated tests to cover estimation funcs + optimization/sanity checking via oxli estimation funcs. + * tests/test_normalize_by_median.py: updated tests to cover estimation + functions. 2015-07-08 Luiz Irber @@ -74,22 +79,22 @@ 2015-07-05 Jacob Fenton * doc/whats-new-2.0.rst: added in normalize-by-median.py broken paired - updates + updates. 2015-07-05 Michael R. Crusoe - * Makefile: fix cppcheck invocation + * Makefile: fix cppcheck invocation. * khmer/_khmer.cc: switch to prefix increment for non-primitive objects, - use a C++ cast, adjust scope + use a C++ cast, adjust scope. * lib/hashtable.{hh,cc}: make copy constructor no-op explicit. adjust scope - * lib/{ht-diff,test-HashTables,test-Parser}.cc: remove unused test code - * lib/labelhash.cc,hllcounter.cc: astyle reformatting - * lib/read_parsers.hh: more explicit constructors + * lib/{ht-diff,test-HashTables,test-Parser}.cc: remove unused test code. + * lib/labelhash.cc,hllcounter.cc: astyle reformatting. + * lib/read_parsers.hh: more explicit constructors. 2015-07-05 Michael R. Crusoe * sandbox/{collect-variants,optimal_args_hashbits,sweep-files}.py: - update API usage + update API usage. 2015-07-05 Titus Brown diff --git a/khmer/kfile.py b/khmer/kfile.py index c434fae1bb..430f8c64cd 100644 --- a/khmer/kfile.py +++ b/khmer/kfile.py @@ -122,7 +122,7 @@ def check_space(in_files, force, _testhook_free_space=None): def check_space_for_hashtable(outfile_name, hash_size, force, _testhook_free_space=None): - """Check we have enough size to write a hash table.""" + """Check that we have enough size to write the specified hash table.""" dir_path = os.path.dirname(os.path.realpath(outfile_name)) target = os.statvfs(dir_path) diff --git a/scripts/filter-abund-single.py b/scripts/filter-abund-single.py index 9b5f9b71b5..1cb9947ad7 100755 --- a/scripts/filter-abund-single.py +++ b/scripts/filter-abund-single.py @@ -71,7 +71,6 @@ def main(): check_input_files(args.datafile, args.force) check_space([args.datafile], args.force) if args.savetable: - mem_args = args.max_memory_usage tablesize = calculate_tablesize(args, 'countgraph') check_space_for_hashtable(args.savetable, tablesize, args.force) diff --git a/scripts/load-into-counting.py b/scripts/load-into-counting.py index 0d5b11eddc..fcf8fbb109 100755 --- a/scripts/load-into-counting.py +++ b/scripts/load-into-counting.py @@ -125,7 +125,6 @@ def main(): thread.join() if index > 0 and index % 10 == 0: - mem_args = args.max_memory_usage tablesize = calculate_tablesize(args, 'countgraph') check_space_for_hashtable(base, tablesize, args.force) print('mid-save', base, file=sys.stderr) diff --git a/scripts/normalize-by-median.py b/scripts/normalize-by-median.py index 60a74770d2..68601d663d 100755 --- a/scripts/normalize-by-median.py +++ b/scripts/normalize-by-median.py @@ -306,7 +306,6 @@ def main(): # pylint: disable=too-many-branches,too-many-statements check_space(args.input_filenames, args.force) if args.savetable: tablesize = calculate_tablesize(args, 'countgraph') - check_space_for_hashtable(args.savetable, tablesize, args.force) # load or create counting table. diff --git a/tests/test_script_arguments.py b/tests/test_script_arguments.py index 4e2f16a140..bf2148dc02 100644 --- a/tests/test_script_arguments.py +++ b/tests/test_script_arguments.py @@ -53,7 +53,6 @@ def test_check_tablespace(): args = parser.parse_args(['-M', '1e9']) try: - mem_args = args.max_memory_usage tablesize = khmer_args.calculate_tablesize(args, 'countgraph') khmer.kfile.check_space_for_hashtable(outfile, tablesize, False, _testhook_free_space=0) @@ -87,7 +86,6 @@ def test_check_tablespace_force(): args = parser.parse_args(['-M', '1e9']) try: - mem_args = args.max_memory_usage tablesize = khmer_args.calculate_tablesize(args, 'countgraph') khmer.kfile.check_space_for_hashtable(outfile, tablesize, True, _testhook_free_space=0)