changeset 91:f73d71daefd5 draft

Uploaded
author greg
date Wed, 10 Jan 2018 14:27:44 -0500
parents 0d1548b67de5
children fb23828b634b
files ideas_genome_tracks.R
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ideas_genome_tracks.R	Wed Jan 10 14:12:26 2018 -0500
+++ b/ideas_genome_tracks.R	Wed Jan 10 14:27:44 2018 -0500
@@ -177,8 +177,13 @@
     # .para0 file.  We'll take the largest color_codes_vector in
     # cases where training was not performed.  This approach is
     # not ideal since it can potentially eliminate some colors.
-    if (length(color_codes_vectors_by_para_file) >1 ) {
-        color_codes_vector = max(color_codes_vectors_by_para_file);
+    if (length(color_codes_vectors_by_para_file) > 1) {
+        color_codes_vector = NULL;
+        for (ccv in color_codes_vectors_by_para_file) {
+            if (length(color_codes_vector) < length(ccv)) {
+                color_codes_vector = ccv;
+            }
+        }
     } else {
         color_codes_vector = color_codes_vectors_by_para_file[1];
     }