Browse code

BED-6 for peaks instead of BED-9

chakalakka authored on 25/11/2017 14:33:16
Showing 1 changed files

... ...
@@ -203,13 +203,13 @@ exportUnivariatePeaks <- function(hmm.list, filename, header=TRUE, separate.file
203 203
         # Make score integer
204 204
         df$peakScores <- round(df$peakScores)
205 205
         numsegments <- nrow(df)
206
-        df <- cbind(df, thickStart=df$start, thickEnd=df$end)
207 206
         # Convert from 1-based closed to 0-based half open
208 207
         df$start <- df$start - 1
209
-        df$thickStart <- df$thickStart - 1
210
-        # Colors
211
-        RGB <- t(grDevices::col2rgb(getStateColors('modified')))
212
-        df$itemRgb <- apply(RGB,1,paste,collapse=",")
208
+        # df$thickStart <- df$start
209
+        # df$thickEnd <- df$end
210
+        # # Colors
211
+        # RGB <- t(grDevices::col2rgb(getStateColors('modified')))
212
+        # df$itemRgb <- apply(RGB,1,paste,collapse=",")
213 213
         if (nrow(df) == 0) {
214 214
             warning('hmm ',imod,' does not contain any \'modified\' calls')
215 215
         } else {
... ...
@@ -452,11 +452,11 @@ exportMultivariatePeaks <- function(hmm, filename, trackname=NULL, header=TRUE,
452 452
         
453 453
         # Convert from 1-based closed to 0-based half open
454 454
         df$start <- df$start - 1
455
-        df$thickStart <- df$start
456
-        df$thickEnd <- df$end
457
-        # Colors
458
-        RGB <- t(grDevices::col2rgb(getStateColors('modified')))
459
-        df$itemRgb <- apply(RGB,1,paste,collapse=",")
455
+        # df$thickStart <- df$start
456
+        # df$thickEnd <- df$end
457
+        # # Colors
458
+        # RGB <- t(grDevices::col2rgb(getStateColors('modified')))
459
+        # df$itemRgb <- apply(RGB,1,paste,collapse=",")
460 460
         
461 461
         ## Write to file
462 462
         if (separate.files) {
... ...
@@ -624,11 +624,11 @@ exportCombinedMultivariatePeaks <- function(hmm, filename, trackname=NULL, heade
624 624
         
625 625
         # Convert from 1-based closed to 0-based half open
626 626
         df$start <- df$start - 1
627
-        df$thickStart <- df$start
628
-        df$thickEnd <- df$end
629
-        # Colors
630
-        RGB <- t(grDevices::col2rgb(getStateColors('modified')))
631
-        df$itemRgb <- apply(RGB,1,paste,collapse=",")
627
+        # df$thickStart <- df$start
628
+        # df$thickEnd <- df$end
629
+        # # Colors
630
+        # RGB <- t(grDevices::col2rgb(getStateColors('modified')))
631
+        # df$itemRgb <- apply(RGB,1,paste,collapse=",")
632 632
         
633 633
         ## Write to file
634 634
         if (separate.files) {