Moved new-work-checking scripts to ../personal_mine, more appropriate.
Added frame-removal functions (full, and top/right half).
Added set_axes_limits; cleanup.

Added set_axes_limits function to set xlim/ylim for not-None values
only (don't change if None).

Improved the ax=None system for the other functions by adding an
mplt.sca(ax) clause so that mplt.* functions always act on ax if given,
rather than on the "current" axis.  Added some comments.

In color_plot_frame just renamed plot_axes arg to ax to match everything
else.
Added format_base_distance function; unit-tests pass.

Format base distance as a string: 1bp for 1, 12345bp for 12345, 2kb for
2000, 2Mb for 2000000.
Refactoring CHROMOSOME_TYPE_COLORS dict out of chromosome_color function.
Added colormap utilities, and added the CMRmap colormap; works.
Rewrote/updated generate_seq_slices; added unit-tests, they pass.
Changed generate_seq_slices positions to 1-based; updated tests pass.
Added approximate arg to format_base_distance.

With approximation:    1bp for 1, 2kb for 1800, 12kb for 12345, 2kb for
                        2000, 1Mb for 1000000, 2Mb for 2111000.
Approximate=True by default.

Updated unit-tests, pass.
Added pickle convenience function, to mirror unpickle.

Also renamed pickle module to Pickle so I can have pickle as a function
name.
Tricky format_base_distance bug due to old-style division!

There was a tricky bug in format_base_distance, where the unit-tests
passed, but if it was run from inside something with "from __future__
import division", the results in the no-approximation variant were
floats (so 1000 was 1.0kb instead of 1kb, etc).
Added "from __future__ import division" to this file (all files should
have it, this one was just old!), which caused some unit-tests to fail,
so I fixed the format_base_distance function, then had to fix some other
unit-tests due to the same problem, and added more direct unit-tests
just in case.  All pass.
Added filter_dict_by_keys function and tests; tests pass.
Added flatten_lists function (when?); needs unit-tests!

flatten_lists function to flatten a list or dict of lists:
  """ Given a list or dict of lists/arrays/sets/etc, return list
    combining all the value lists (or a set if unique_only). """

I think this happened a while ago and I forgot to commit it then.
Also still need to write unit-tests for this function!
Bugfix: added missing import.
Added GC_content function (and unit-tests, pass).
Changed savefig to take an extension list and save in multiple formats.

Tested, works.
Added check_seq_against_pattern and unit-tests (pass).

check_seq_against_pattern(seq, pattern):
""" Check if sequence string matches pattern string (ACTGN only);
 return True/False. Inputs must be same length. """
New functions: base_count_dict/fraction and two other; unit-tests pass.

Added functions (mostly moved from ~/experiments/mutant_pool_screens/
1211_cassette-deepseq-data_for-paper/flanking_region_tools.py
and rewritten somewhat):
 - get_all_seq_length: Given a list of sequence strings, return N if all
   seqs are length N; raise ValueError if lengths differ or list was
   empty.
 - base_count_dict: Given a list of (seq,count) tuples, return a
   base:base_count_list_for_each_position dict.
 - base_fraction_dict_from_count_dict and base_fraction_dict:  Same as
   base_count_dict, but returns normalized fractions instead of counts.
 - base_fractions_from_GC_content: Given a GC content, return
   base:fraction dict.
Added unit-tests for all; they pass.

Minor refactoring: removed separate normal_bases from GC_content,
replaced with global NORMAL_DNA_BASES.
Minor: bugfix for base-fraction edge case with total 0 bases.

Fix in base_fraction_dict_from_count_dict - when the total number of
bases is 0, return NaN fraction for each base, rather than raising
DivideByZeroError.

Also rewrote docstring to make that clearer.

Added unit-test to test the NaN case, which was a little complicated.
Inverted GC_content other-bases argument for clarity; changed error messages.

In GC_content, changed the error_other_bases argument to
ignore_other_bases (the opposite) for clarity; changed the code
and unit-tests to match.  No functionality change besides inverting the
argument value.

Also changed the error messages to NOT print the sequence, because
sometimes it's really long (whole genome etc) and we really don't want
to do that.