changeset 75:d9342dc571e5 draft

Uploaded
author greg
date Tue, 02 Jan 2018 10:53:05 -0500
parents 1c8322d11836
children a3bd0cecdeb2
files ideas_genome_tracks.R
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ideas_genome_tracks.R	Tue Jan 02 10:21:13 2018 -0500
+++ b/ideas_genome_tracks.R	Tue Jan 02 10:53:05 2018 -0500
@@ -103,6 +103,13 @@
         chrom_len_file, tracks_dir, hub_name, short_label, long_label, state_indexes, state_colors) {
     # Create a trackDb.txt file that includes each state.
     para_files <- list.files(path=input_dir_para, full.names=TRUE);
+    ######
+    # The following is temporary and will be eliminated when there
+    # are multiple .para files.  See the comments in the for loop
+    # below.
+    data_frame <- read.table(para_files[1], comment="!", header=T);
+	color_hex_code <- create_heatmap(data_frame);
+    ######
     base_track_file_name <- paste(tracks_dir, hub_name, sep="");
     cells = create_track(input_dir_state, chrom_len_file, base_track_file_name);
     if (!is.null(state_indexes)) {
@@ -125,8 +132,10 @@
     for (i in 1:length(cells)) {
         # Get the color for the current state.
         if (is.null(state_indexes) || !is.element(i, s_indexes)) {
-            data_frame <- read.table(para_files[i], comment="!", header=T);
-            color_hex_code <- create_heatmap(data_frame);
+            ######
+            # This is for future use since there is currently only a single .para file.
+            # data_frame <- read.table(para_files[i], comment="!", header=T);
+            # color_hex_code <- create_heatmap(data_frame);
         } else {
             # Use the selected color for the current state.
             color_hex_code <- s_colors[i];
@@ -194,3 +203,4 @@
 
 # Create the primary HTML dataset.
 create_primary_html(opt$output_trackhub, tracks_dir, opt$build);
+