# HG changeset patch # User greg # Date 1498493421 14400 # Node ID 60e2cf57f2c15356cd013ac7a31c3eb897f9157f # Parent 17ca41359a2df22f1fceed8ba74b0ee3b5a85591 Uploaded diff -r 17ca41359a2d -r 60e2cf57f2c1 ks_distribution.R --- a/ks_distribution.R Mon Jun 26 12:05:18 2017 -0400 +++ b/ks_distribution.R Mon Jun 26 12:10:21 2017 -0400 @@ -7,7 +7,7 @@ make_option(c("-k", "--kaks_input"), action="store", dest="kaks_input", help="KaKs analysis input dataset"), make_option(c("-n", "--number_comp"), action="store", dest="number_comp", type="integer", help="Number of significant components in the Ks distribution"), make_option(c("-o", "--output"), action="store", dest="output", help="Output dataset"), - make_option(c("-r", "--colors"), action="store", default=NA, help="List of component colors") + make_option(c("-r", "--colors"), action="store", default="", help="List of component colors") ) parser <- OptionParser(usage="%prog [options] file", option_list=option_list) @@ -17,7 +17,7 @@ set_component_colors = function(colors, number_comp) { # Handle colors for components. - if (is.na(colors)) + if (nchar(colors) == 0) { # Randomly specify colors for components. specified_colors <- c('red', 'yellow', 'green', 'black', 'blue', 'darkorange')