Back to Multiple platform build/check report for BioC 3.9
ABCD[E]FGHIJKLMNOPQRSTUVWXYZ

CHECK report for EventPointer on malbec2

This page was generated on 2019-04-08 11:28:41 -0400 (Mon, 08 Apr 2019).

Package 514/1703HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
EventPointer 2.1.3
Juan Pablo Romero
Snapshot Date: 2019-04-07 17:01:41 -0400 (Sun, 07 Apr 2019)
URL: https://git.bioconductor.org/packages/EventPointer
Branch: master
Last Commit: 03b15b3
Last Changed Date: 2019-03-14 12:49:08 -0400 (Thu, 14 Mar 2019)
malbec2 Linux (Ubuntu 18.04.2 LTS) / x86_64  OK  OK [ OK ]UNNEEDED, same version exists in internal repository
tokay2 Windows Server 2012 R2 Standard / x64  OK  OK  OK  OK UNNEEDED, same version exists in internal repository
celaya2 OS X 10.11.6 El Capitan / x86_64  OK  OK  OK  OK UNNEEDED, same version exists in internal repository
merida2 OS X 10.11.6 El Capitan / x86_64  OK  OK  OK  OK 

Summary

Package: EventPointer
Version: 2.1.3
Command: /home/biocbuild/bbs-3.9-bioc/R/bin/R CMD check --install=check:EventPointer.install-out.txt --library=/home/biocbuild/bbs-3.9-bioc/R/library --no-vignettes --timings EventPointer_2.1.3.tar.gz
StartedAt: 2019-04-08 00:33:28 -0400 (Mon, 08 Apr 2019)
EndedAt: 2019-04-08 00:38:47 -0400 (Mon, 08 Apr 2019)
EllapsedTime: 319.8 seconds
RetCode: 0
Status:  OK 
CheckDir: EventPointer.Rcheck
Warnings: 0

Command output

##############################################################################
##############################################################################
###
### Running command:
###
###   /home/biocbuild/bbs-3.9-bioc/R/bin/R CMD check --install=check:EventPointer.install-out.txt --library=/home/biocbuild/bbs-3.9-bioc/R/library --no-vignettes --timings EventPointer_2.1.3.tar.gz
###
##############################################################################
##############################################################################


* using log directory ‘/home/biocbuild/bbs-3.9-bioc/meat/EventPointer.Rcheck’
* using R Under development (unstable) (2019-03-18 r76245)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using option ‘--no-vignettes’
* checking for file ‘EventPointer/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘EventPointer’ version ‘2.1.3’
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘EventPointer’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking dependencies in R code ... NOTE
Unexported objects imported by ':::' calls:
  ‘SGSeq:::addFeatureID’ ‘SGSeq:::addGeneID’ ‘SGSeq:::edges’
  ‘SGSeq:::exonGraph’ ‘SGSeq:::feature2name’ ‘SGSeq:::matchSGFeatures’
  ‘SGSeq:::nodes’ ‘SGSeq:::propagateAnnotation’
  ‘SGSeq:::splitCharacterList’
  See the note in ?`:::` about the use of this operator.
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... NOTE
annotate2: no visible global function definition for
  ‘addDummySpliceSites’
annotate2: no visible global function definition for ‘annotatePaths’
annotateFeatures2: no visible global function definition for
  ‘matchTxFeatures’
Undefined global functions or variables:
  addDummySpliceSites annotatePaths matchTxFeatures
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
Examples with CPU or elapsed time > 5s
                      user system elapsed
CDFfromGTF           6.533  0.128   7.022
CDFfromGTF_Multipath 5.489  0.027   5.523
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘runTests.R’
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking running R code from vignettes ... SKIPPED
* checking re-building of vignette outputs ... SKIPPED
* checking PDF version of manual ... OK
* DONE

Status: 2 NOTEs
See
  ‘/home/biocbuild/bbs-3.9-bioc/meat/EventPointer.Rcheck/00check.log’
for details.



Installation output

EventPointer.Rcheck/00install.out

##############################################################################
##############################################################################
###
### Running command:
###
###   /home/biocbuild/bbs-3.9-bioc/R/bin/R CMD INSTALL EventPointer
###
##############################################################################
##############################################################################


* installing to library ‘/home/biocbuild/bbs-3.9-bioc/R/library’
* installing *source* package ‘EventPointer’ ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (EventPointer)

Tests output

EventPointer.Rcheck/tests/runTests.Rout


R Under development (unstable) (2019-03-18 r76245) -- "Unsuffered Consequences"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> BiocGenerics:::testPackage("EventPointer")

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colMeans, colSums, colnames,
    dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
    intersect, is.unsorted, lapply, mapply, match, mget, order, paste,
    pmax, pmax.int, pmin, pmin.int, rank, rbind, rowMeans, rowSums,
    rownames, sapply, setdiff, sort, table, tapply, union, unique,
    unsplit, which, which.max, which.min


Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

    expand.grid


Attaching package: 'Biostrings'

The following object is masked from 'package:base':

    strsplit

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.


Attaching package: 'matrixStats'

The following objects are masked from 'package:Biobase':

    anyMissing, rowMedians


Attaching package: 'DelayedArray'

The following objects are masked from 'package:matrixStats':

    colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges

The following object is masked from 'package:Biostrings':

    type

The following objects are masked from 'package:base':

    aperm, apply, rowsum


Attaching package: 'Matrix'

The following object is masked from 'package:S4Vectors':

    expand

Creating SG Information...Creating SG Information...
 Obtaining Events
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |============                                                          |  17%
  |                                                                            
  |=======================                                               |  33%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |===============================================                       |  67%
  |                                                                            
  |==========================================================            |  83%
  |                                                                            
  |======================================================================| 100%


 Obtaining Events
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |============                                                          |  17%
  |                                                                            
  |=======================                                               |  33%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |===============================================                       |  67%
  |                                                                            
  |==========================================================            |  83%
  |                                                                            
  |======================================================================| 100%

Creating SG Information...Creating SG Information...Creating SG Information...Creating SG Information...Creating SG Information...Import genomic features from the file as a GRanges object ... OK
Prepare the 'metadata' data frame ... OK
Make the TxDb object ... OK

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |======================================================================| 100%

Creating .txt ...
.txt created
Creating .GTF ...
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |========                                                              |  11%Called from: GetIGVPaths(Result2[jj, ], EvtEdg)
Browse[1]> debug: Gene <- as.vector(EventInfo[1, 1])
Browse[2]> debug: Path1 <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.1"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: Path2 <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.2"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: PathR <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.Reference"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: SG_Edges_Orig <- SG_Edges
Browse[2]> debug: SG_Edges[, 1] <- gsub(".[ab]", "", SG_Edges[, 1])
Browse[2]> debug: SG_Edges[, 2] <- gsub(".[ab]", "", SG_Edges[, 2])
Browse[2]> debug: P1.ix <- apply(Path1, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: P2.ix <- apply(Path2, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: PR.ix <- apply(PathR, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: Path1 <- SG_Edges[P1.ix, ]
Browse[2]> debug: Path2 <- SG_Edges[P2.ix, ]
Browse[2]> debug: PathR <- SG_Edges[PR.ix, ]
Browse[2]> debug: PlotPath1 <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Path1))) {
    Type <- as.vector(Path1[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
            "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Path1[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep("A", 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotPath1 <- rbind(PlotPath1, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Path1[ii, "Chr"])
        St <- as.numeric(as.vector(Path1[ii, "Start"]))
        Ed <- as.numeric(as.vector(Path1[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Path1[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = "A", 
            stringsAsFactors = FALSE)
        PlotPath1 <- rbind(PlotPath1, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Path1[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path1[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("A", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: Chr <- as.vector(Path1[ii, "Chr"])
Browse[2]> debug: St <- as.numeric(as.vector(Path1[ii, "Start"]))
Browse[2]> debug: Ed <- as.numeric(as.vector(Path1[ii, "End"]))
Browse[2]> debug: Wd <- Ed - St
Browse[2]> debug: Str <- as.vector(Path1[ii, "Strand"])
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gene, transcript = "A", stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath1 <- rbind(PlotPath1, Res)
Browse[2]> debug: Type <- as.vector(Path1[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path1[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("A", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path1[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("A", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath1 <- rbind(PlotPath1, Res)
Browse[2]> debug: PlotPath2 <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Path2))) {
    Type <- as.vector(Path2[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
            "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Path2[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep("B", 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotPath2 <- rbind(PlotPath2, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Path2[ii, "Chr"])
        St <- as.numeric(as.vector(Path2[ii, "Start"]))
        Ed <- as.numeric(as.vector(Path2[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Path2[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = "B", 
            stringsAsFactors = FALSE)
        PlotPath2 <- rbind(PlotPath2, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Path2[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path2[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("B", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath2 <- rbind(PlotPath2, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path2[ii, "Chr"])
    St <- as.numeric(as.vector(Path2[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path2[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path2[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "B", 
        stringsAsFactors = FALSE)
    PlotPath2 <- rbind(PlotPath2, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path2[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("B", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath2 <- rbind(PlotPath2, Res)
Browse[2]> debug: Ref.Group <- connectedComp(ftM2graphNEL(as.matrix(SG_Edges_Orig[rownames(PathR), 
    seq_len(2)])))
Browse[2]> debug: for (ii in seq_along(Ref.Group)) {
    LL <- length(Ref.Group[[ii]])
    Ref.Group[[ii]] <- cbind(Ref.Group[[ii]][seq_len((LL - 1))], 
        Ref.Group[[ii]][2:LL])
    ixx <- row.match(as.data.frame(Ref.Group[[ii]]), SG_Edges_Orig[, 
        c(1, 2)])
    RR <- SG_Edges_Orig[ixx, ]
    RR[, 1] <- gsub(".[ab]", "", RR[, 1])
    RR[, 2] <- gsub(".[ab]", "", RR[, 2])
    Trs <- rep(paste("Ref", ii, sep = ""), nrow(RR))
    RR <- cbind(RR, Trs)
    Ref.Group[[ii]] <- RR
}
Browse[2]> debug: LL <- length(Ref.Group[[ii]])
Browse[2]> debug: Ref.Group[[ii]] <- cbind(Ref.Group[[ii]][seq_len((LL - 1))], 
    Ref.Group[[ii]][2:LL])
Browse[2]> debug: ixx <- row.match(as.data.frame(Ref.Group[[ii]]), SG_Edges_Orig[, 
    c(1, 2)])
Browse[2]> debug: RR <- SG_Edges_Orig[ixx, ]
Browse[2]> debug: RR[, 1] <- gsub(".[ab]", "", RR[, 1])
Browse[2]> debug: RR[, 2] <- gsub(".[ab]", "", RR[, 2])
Browse[2]> debug: Trs <- rep(paste("Ref", ii, sep = ""), nrow(RR))
Browse[2]> debug: RR <- cbind(RR, Trs)
Browse[2]> debug: Ref.Group[[ii]] <- RR
Browse[2]> debug: Reference <- do.call(rbind, Ref.Group)
Browse[2]> debug: PlotReference <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Reference))) {
    Type <- as.vector(Reference[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Reference[ii, "Start"]), 
            as.vector(Reference[ii, "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Reference[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep(Reference[ii, "Trs"], 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotReference <- rbind(PlotReference, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Reference[ii, "Chr"])
        St <- as.numeric(as.vector(Reference[ii, "Start"]))
        Ed <- as.numeric(as.vector(Reference[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Reference[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
                "Trs"], stringsAsFactors = FALSE)
        PlotReference <- rbind(PlotReference, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Reference[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Reference[ii, "Start"]), as.vector(Reference[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Reference[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep(Reference[ii, "Trs"], 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
} else if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: Chr <- as.vector(Reference[ii, "Chr"])
Browse[2]> debug: St <- as.numeric(as.vector(Reference[ii, "Start"]))
Browse[2]> debug: Ed <- as.numeric(as.vector(Reference[ii, "End"]))
Browse[2]> debug: Wd <- Ed - St
Browse[2]> debug: Str <- as.vector(Reference[ii, "Strand"])
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gene, transcript = Reference[ii, "Trs"], 
    stringsAsFactors = FALSE)
Browse[2]> debug: PlotReference <- rbind(PlotReference, Res)
Browse[2]> debug: Type <- as.vector(Reference[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Reference[ii, "Start"]), as.vector(Reference[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Reference[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep(Reference[ii, "Trs"], 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
} else if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Reference[ii, "Start"]), as.vector(Reference[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Reference[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep(Reference[ii, "Trs"], 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotReference <- rbind(PlotReference, Res)
Browse[2]> debug: Plot <- rbind(PlotPath1, PlotPath2, PlotReference)
Browse[2]> debug: return(Plot)
Browse[2]> 
  |                                                                            
  |================                                                      |  22%Called from: GetIGVPaths(Result2[jj, ], EvtEdg)
Browse[1]> debug: Gene <- as.vector(EventInfo[1, 1])
Browse[2]> debug: Path1 <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.1"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: Path2 <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.2"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: PathR <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.Reference"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: SG_Edges_Orig <- SG_Edges
Browse[2]> debug: SG_Edges[, 1] <- gsub(".[ab]", "", SG_Edges[, 1])
Browse[2]> debug: SG_Edges[, 2] <- gsub(".[ab]", "", SG_Edges[, 2])
Browse[2]> debug: P1.ix <- apply(Path1, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: P2.ix <- apply(Path2, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: PR.ix <- apply(PathR, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: Path1 <- SG_Edges[P1.ix, ]
Browse[2]> debug: Path2 <- SG_Edges[P2.ix, ]
Browse[2]> debug: PathR <- SG_Edges[PR.ix, ]
Browse[2]> debug: PlotPath1 <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Path1))) {
    Type <- as.vector(Path1[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
            "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Path1[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep("A", 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotPath1 <- rbind(PlotPath1, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Path1[ii, "Chr"])
        St <- as.numeric(as.vector(Path1[ii, "Start"]))
        Ed <- as.numeric(as.vector(Path1[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Path1[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = "A", 
            stringsAsFactors = FALSE)
        PlotPath1 <- rbind(PlotPath1, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Path1[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path1[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("A", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path1[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("A", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath1 <- rbind(PlotPath1, Res)
Browse[2]> debug: Type <- as.vector(Path1[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path1[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("A", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: Chr <- as.vector(Path1[ii, "Chr"])
Browse[2]> debug: St <- as.numeric(as.vector(Path1[ii, "Start"]))
Browse[2]> debug: Ed <- as.numeric(as.vector(Path1[ii, "End"]))
Browse[2]> debug: Wd <- Ed - St
Browse[2]> debug: Str <- as.vector(Path1[ii, "Strand"])
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gene, transcript = "A", stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath1 <- rbind(PlotPath1, Res)
Browse[2]> debug: Type <- as.vector(Path1[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path1[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("A", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path1[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("A", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath1 <- rbind(PlotPath1, Res)
Browse[2]> debug: PlotPath2 <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Path2))) {
    Type <- as.vector(Path2[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
            "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Path2[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep("B", 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotPath2 <- rbind(PlotPath2, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Path2[ii, "Chr"])
        St <- as.numeric(as.vector(Path2[ii, "Start"]))
        Ed <- as.numeric(as.vector(Path2[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Path2[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = "B", 
            stringsAsFactors = FALSE)
        PlotPath2 <- rbind(PlotPath2, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Path2[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path2[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("B", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath2 <- rbind(PlotPath2, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path2[ii, "Chr"])
    St <- as.numeric(as.vector(Path2[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path2[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path2[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "B", 
        stringsAsFactors = FALSE)
    PlotPath2 <- rbind(PlotPath2, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path2[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("B", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath2 <- rbind(PlotPath2, Res)
Browse[2]> debug: Ref.Group <- connectedComp(ftM2graphNEL(as.matrix(SG_Edges_Orig[rownames(PathR), 
    seq_len(2)])))
Browse[2]> debug: for (ii in seq_along(Ref.Group)) {
    LL <- length(Ref.Group[[ii]])
    Ref.Group[[ii]] <- cbind(Ref.Group[[ii]][seq_len((LL - 1))], 
        Ref.Group[[ii]][2:LL])
    ixx <- row.match(as.data.frame(Ref.Group[[ii]]), SG_Edges_Orig[, 
        c(1, 2)])
    RR <- SG_Edges_Orig[ixx, ]
    RR[, 1] <- gsub(".[ab]", "", RR[, 1])
    RR[, 2] <- gsub(".[ab]", "", RR[, 2])
    Trs <- rep(paste("Ref", ii, sep = ""), nrow(RR))
    RR <- cbind(RR, Trs)
    Ref.Group[[ii]] <- RR
}
Browse[2]> debug: LL <- length(Ref.Group[[ii]])
Browse[2]> debug: Ref.Group[[ii]] <- cbind(Ref.Group[[ii]][seq_len((LL - 1))], 
    Ref.Group[[ii]][2:LL])
Browse[2]> debug: ixx <- row.match(as.data.frame(Ref.Group[[ii]]), SG_Edges_Orig[, 
    c(1, 2)])
Browse[2]> debug: RR <- SG_Edges_Orig[ixx, ]
Browse[2]> debug: RR[, 1] <- gsub(".[ab]", "", RR[, 1])
Browse[2]> debug: RR[, 2] <- gsub(".[ab]", "", RR[, 2])
Browse[2]> debug: Trs <- rep(paste("Ref", ii, sep = ""), nrow(RR))
Browse[2]> debug: RR <- cbind(RR, Trs)
Browse[2]> debug: Ref.Group[[ii]] <- RR
Browse[2]> debug: Reference <- do.call(rbind, Ref.Group)
Browse[2]> debug: PlotReference <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Reference))) {
    Type <- as.vector(Reference[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Reference[ii, "Start"]), 
            as.vector(Reference[ii, "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Reference[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep(Reference[ii, "Trs"], 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotReference <- rbind(PlotReference, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Reference[ii, "Chr"])
        St <- as.numeric(as.vector(Reference[ii, "Start"]))
        Ed <- as.numeric(as.vector(Reference[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Reference[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
                "Trs"], stringsAsFactors = FALSE)
        PlotReference <- rbind(PlotReference, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Reference[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Reference[ii, "Start"]), as.vector(Reference[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Reference[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep(Reference[ii, "Trs"], 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
} else if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: Chr <- as.vector(Reference[ii, "Chr"])
Browse[2]> debug: St <- as.numeric(as.vector(Reference[ii, "Start"]))
Browse[2]> debug: Ed <- as.numeric(as.vector(Reference[ii, "End"]))
Browse[2]> debug: Wd <- Ed - St
Browse[2]> debug: Str <- as.vector(Reference[ii, "Strand"])
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gene, transcript = Reference[ii, "Trs"], 
    stringsAsFactors = FALSE)
Browse[2]> debug: PlotReference <- rbind(PlotReference, Res)
Browse[2]> debug: Type <- as.vector(Reference[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Reference[ii, "Start"]), as.vector(Reference[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Reference[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep(Reference[ii, "Trs"], 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
} else if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Reference[ii, "Start"]), as.vector(Reference[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Reference[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep(Reference[ii, "Trs"], 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotReference <- rbind(PlotReference, Res)
Browse[2]> debug: Plot <- rbind(PlotPath1, PlotPath2, PlotReference)
Browse[2]> debug: return(Plot)
Browse[2]> 
  |                                                                            
  |=======================                                               |  33%Called from: GetIGVPaths(Result2[jj, ], EvtEdg)
Browse[1]> debug: Gene <- as.vector(EventInfo[1, 1])
Browse[2]> debug: Path1 <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.1"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: Path2 <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.2"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: PathR <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.Reference"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: SG_Edges_Orig <- SG_Edges
Browse[2]> debug: SG_Edges[, 1] <- gsub(".[ab]", "", SG_Edges[, 1])
Browse[2]> debug: SG_Edges[, 2] <- gsub(".[ab]", "", SG_Edges[, 2])
Browse[2]> debug: P1.ix <- apply(Path1, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: P2.ix <- apply(Path2, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: PR.ix <- apply(PathR, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: Path1 <- SG_Edges[P1.ix, ]
Browse[2]> debug: Path2 <- SG_Edges[P2.ix, ]
Browse[2]> debug: PathR <- SG_Edges[PR.ix, ]
Browse[2]> debug: PlotPath1 <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Path1))) {
    Type <- as.vector(Path1[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
            "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Path1[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep("A", 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotPath1 <- rbind(PlotPath1, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Path1[ii, "Chr"])
        St <- as.numeric(as.vector(Path1[ii, "Start"]))
        Ed <- as.numeric(as.vector(Path1[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Path1[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = "A", 
            stringsAsFactors = FALSE)
        PlotPath1 <- rbind(PlotPath1, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Path1[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path1[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("A", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path1[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("A", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath1 <- rbind(PlotPath1, Res)
Browse[2]> debug: PlotPath2 <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Path2))) {
    Type <- as.vector(Path2[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
            "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Path2[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep("B", 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotPath2 <- rbind(PlotPath2, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Path2[ii, "Chr"])
        St <- as.numeric(as.vector(Path2[ii, "Start"]))
        Ed <- as.numeric(as.vector(Path2[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Path2[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = "B", 
            stringsAsFactors = FALSE)
        PlotPath2 <- rbind(PlotPath2, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Path2[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path2[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("B", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath2 <- rbind(PlotPath2, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path2[ii, "Chr"])
    St <- as.numeric(as.vector(Path2[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path2[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path2[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "B", 
        stringsAsFactors = FALSE)
    PlotPath2 <- rbind(PlotPath2, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path2[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("B", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath2 <- rbind(PlotPath2, Res)
Browse[2]> debug: Ref.Group <- connectedComp(ftM2graphNEL(as.matrix(SG_Edges_Orig[rownames(PathR), 
    seq_len(2)])))
Browse[2]> debug: for (ii in seq_along(Ref.Group)) {
    LL <- length(Ref.Group[[ii]])
    Ref.Group[[ii]] <- cbind(Ref.Group[[ii]][seq_len((LL - 1))], 
        Ref.Group[[ii]][2:LL])
    ixx <- row.match(as.data.frame(Ref.Group[[ii]]), SG_Edges_Orig[, 
        c(1, 2)])
    RR <- SG_Edges_Orig[ixx, ]
    RR[, 1] <- gsub(".[ab]", "", RR[, 1])
    RR[, 2] <- gsub(".[ab]", "", RR[, 2])
    Trs <- rep(paste("Ref", ii, sep = ""), nrow(RR))
    RR <- cbind(RR, Trs)
    Ref.Group[[ii]] <- RR
}
Browse[2]> debug: LL <- length(Ref.Group[[ii]])
Browse[2]> debug: Ref.Group[[ii]] <- cbind(Ref.Group[[ii]][seq_len((LL - 1))], 
    Ref.Group[[ii]][2:LL])
Browse[2]> debug: ixx <- row.match(as.data.frame(Ref.Group[[ii]]), SG_Edges_Orig[, 
    c(1, 2)])
Browse[2]> debug: RR <- SG_Edges_Orig[ixx, ]
Browse[2]> debug: RR[, 1] <- gsub(".[ab]", "", RR[, 1])
Browse[2]> debug: RR[, 2] <- gsub(".[ab]", "", RR[, 2])
Browse[2]> debug: Trs <- rep(paste("Ref", ii, sep = ""), nrow(RR))
Browse[2]> debug: RR <- cbind(RR, Trs)
Browse[2]> debug: Ref.Group[[ii]] <- RR
Browse[2]> debug: Reference <- do.call(rbind, Ref.Group)
Browse[2]> debug: PlotReference <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Reference))) {
    Type <- as.vector(Reference[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Reference[ii, "Start"]), 
            as.vector(Reference[ii, "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Reference[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep(Reference[ii, "Trs"], 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotReference <- rbind(PlotReference, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Reference[ii, "Chr"])
        St <- as.numeric(as.vector(Reference[ii, "Start"]))
        Ed <- as.numeric(as.vector(Reference[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Reference[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
                "Trs"], stringsAsFactors = FALSE)
        PlotReference <- rbind(PlotReference, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Reference[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Reference[ii, "Start"]), as.vector(Reference[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Reference[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep(Reference[ii, "Trs"], 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
} else if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: Chr <- as.vector(Reference[ii, "Chr"])
Browse[2]> debug: St <- as.numeric(as.vector(Reference[ii, "Start"]))
Browse[2]> debug: Ed <- as.numeric(as.vector(Reference[ii, "End"]))
Browse[2]> debug: Wd <- Ed - St
Browse[2]> debug: Str <- as.vector(Reference[ii, "Strand"])
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gene, transcript = Reference[ii, "Trs"], 
    stringsAsFactors = FALSE)
Browse[2]> debug: PlotReference <- rbind(PlotReference, Res)
Browse[2]> debug: Plot <- rbind(PlotPath1, PlotPath2, PlotReference)
Browse[2]> debug: return(Plot)
Browse[2]> 
  |                                                                            
  |===============================                                       |  44%Called from: GetIGVPaths(Result2[jj, ], EvtEdg)
Browse[1]> debug: Gene <- as.vector(EventInfo[1, 1])
Browse[2]> debug: Path1 <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.1"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: Path2 <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.2"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: PathR <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.Reference"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: SG_Edges_Orig <- SG_Edges
Browse[2]> debug: SG_Edges[, 1] <- gsub(".[ab]", "", SG_Edges[, 1])
Browse[2]> debug: SG_Edges[, 2] <- gsub(".[ab]", "", SG_Edges[, 2])
Browse[2]> debug: P1.ix <- apply(Path1, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: P2.ix <- apply(Path2, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: PR.ix <- apply(PathR, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: Path1 <- SG_Edges[P1.ix, ]
Browse[2]> debug: Path2 <- SG_Edges[P2.ix, ]
Browse[2]> debug: PathR <- SG_Edges[PR.ix, ]
Browse[2]> debug: PlotPath1 <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Path1))) {
    Type <- as.vector(Path1[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
            "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Path1[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep("A", 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotPath1 <- rbind(PlotPath1, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Path1[ii, "Chr"])
        St <- as.numeric(as.vector(Path1[ii, "Start"]))
        Ed <- as.numeric(as.vector(Path1[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Path1[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = "A", 
            stringsAsFactors = FALSE)
        PlotPath1 <- rbind(PlotPath1, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Path1[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path1[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("A", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: Chr <- as.vector(Path1[ii, "Chr"])
Browse[2]> debug: St <- as.numeric(as.vector(Path1[ii, "Start"]))
Browse[2]> debug: Ed <- as.numeric(as.vector(Path1[ii, "End"]))
Browse[2]> debug: Wd <- Ed - St
Browse[2]> debug: Str <- as.vector(Path1[ii, "Strand"])
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gene, transcript = "A", stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath1 <- rbind(PlotPath1, Res)
Browse[2]> debug: Type <- as.vector(Path1[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path1[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("A", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path1[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("A", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath1 <- rbind(PlotPath1, Res)
Browse[2]> debug: PlotPath2 <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Path2))) {
    Type <- as.vector(Path2[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
            "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Path2[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep("B", 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotPath2 <- rbind(PlotPath2, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Path2[ii, "Chr"])
        St <- as.numeric(as.vector(Path2[ii, "Start"]))
        Ed <- as.numeric(as.vector(Path2[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Path2[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = "B", 
            stringsAsFactors = FALSE)
        PlotPath2 <- rbind(PlotPath2, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Path2[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path2[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("B", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath2 <- rbind(PlotPath2, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path2[ii, "Chr"])
    St <- as.numeric(as.vector(Path2[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path2[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path2[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "B", 
        stringsAsFactors = FALSE)
    PlotPath2 <- rbind(PlotPath2, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path2[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("B", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath2 <- rbind(PlotPath2, Res)
Browse[2]> debug: Ref.Group <- connectedComp(ftM2graphNEL(as.matrix(SG_Edges_Orig[rownames(PathR), 
    seq_len(2)])))
Browse[2]> debug: for (ii in seq_along(Ref.Group)) {
    LL <- length(Ref.Group[[ii]])
    Ref.Group[[ii]] <- cbind(Ref.Group[[ii]][seq_len((LL - 1))], 
        Ref.Group[[ii]][2:LL])
    ixx <- row.match(as.data.frame(Ref.Group[[ii]]), SG_Edges_Orig[, 
        c(1, 2)])
    RR <- SG_Edges_Orig[ixx, ]
    RR[, 1] <- gsub(".[ab]", "", RR[, 1])
    RR[, 2] <- gsub(".[ab]", "", RR[, 2])
    Trs <- rep(paste("Ref", ii, sep = ""), nrow(RR))
    RR <- cbind(RR, Trs)
    Ref.Group[[ii]] <- RR
}
Browse[2]> debug: LL <- length(Ref.Group[[ii]])
Browse[2]> debug: Ref.Group[[ii]] <- cbind(Ref.Group[[ii]][seq_len((LL - 1))], 
    Ref.Group[[ii]][2:LL])
Browse[2]> debug: ixx <- row.match(as.data.frame(Ref.Group[[ii]]), SG_Edges_Orig[, 
    c(1, 2)])
Browse[2]> debug: RR <- SG_Edges_Orig[ixx, ]
Browse[2]> debug: RR[, 1] <- gsub(".[ab]", "", RR[, 1])
Browse[2]> debug: RR[, 2] <- gsub(".[ab]", "", RR[, 2])
Browse[2]> debug: Trs <- rep(paste("Ref", ii, sep = ""), nrow(RR))
Browse[2]> debug: RR <- cbind(RR, Trs)
Browse[2]> debug: Ref.Group[[ii]] <- RR
Browse[2]> debug: Reference <- do.call(rbind, Ref.Group)
Browse[2]> debug: PlotReference <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Reference))) {
    Type <- as.vector(Reference[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Reference[ii, "Start"]), 
            as.vector(Reference[ii, "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Reference[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep(Reference[ii, "Trs"], 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotReference <- rbind(PlotReference, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Reference[ii, "Chr"])
        St <- as.numeric(as.vector(Reference[ii, "Start"]))
        Ed <- as.numeric(as.vector(Reference[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Reference[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
                "Trs"], stringsAsFactors = FALSE)
        PlotReference <- rbind(PlotReference, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Reference[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Reference[ii, "Start"]), as.vector(Reference[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Reference[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep(Reference[ii, "Trs"], 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
} else if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: Chr <- as.vector(Reference[ii, "Chr"])
Browse[2]> debug: St <- as.numeric(as.vector(Reference[ii, "Start"]))
Browse[2]> debug: Ed <- as.numeric(as.vector(Reference[ii, "End"]))
Browse[2]> debug: Wd <- Ed - St
Browse[2]> debug: Str <- as.vector(Reference[ii, "Strand"])
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gene, transcript = Reference[ii, "Trs"], 
    stringsAsFactors = FALSE)
Browse[2]> debug: PlotReference <- rbind(PlotReference, Res)
Browse[2]> debug: Plot <- rbind(PlotPath1, PlotPath2, PlotReference)
Browse[2]> debug: return(Plot)
Browse[2]> 
  |                                                                            
  |=======================================                               |  56%Called from: GetIGVPaths(Result2[jj, ], EvtEdg)
Browse[1]> debug: Gene <- as.vector(EventInfo[1, 1])
Browse[2]> debug: Path1 <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.1"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: Path2 <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.2"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: PathR <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.Reference"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: SG_Edges_Orig <- SG_Edges
Browse[2]> debug: SG_Edges[, 1] <- gsub(".[ab]", "", SG_Edges[, 1])
Browse[2]> debug: SG_Edges[, 2] <- gsub(".[ab]", "", SG_Edges[, 2])
Browse[2]> debug: P1.ix <- apply(Path1, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: P2.ix <- apply(Path2, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: PR.ix <- apply(PathR, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: Path1 <- SG_Edges[P1.ix, ]
Browse[2]> debug: Path2 <- SG_Edges[P2.ix, ]
Browse[2]> debug: PathR <- SG_Edges[PR.ix, ]
Browse[2]> debug: PlotPath1 <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Path1))) {
    Type <- as.vector(Path1[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
            "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Path1[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep("A", 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotPath1 <- rbind(PlotPath1, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Path1[ii, "Chr"])
        St <- as.numeric(as.vector(Path1[ii, "Start"]))
        Ed <- as.numeric(as.vector(Path1[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Path1[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = "A", 
            stringsAsFactors = FALSE)
        PlotPath1 <- rbind(PlotPath1, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Path1[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path1[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("A", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path1[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("A", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath1 <- rbind(PlotPath1, Res)
Browse[2]> debug: Type <- as.vector(Path1[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path1[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("A", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: Chr <- as.vector(Path1[ii, "Chr"])
Browse[2]> debug: St <- as.numeric(as.vector(Path1[ii, "Start"]))
Browse[2]> debug: Ed <- as.numeric(as.vector(Path1[ii, "End"]))
Browse[2]> debug: Wd <- Ed - St
Browse[2]> debug: Str <- as.vector(Path1[ii, "Strand"])
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gene, transcript = "A", stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath1 <- rbind(PlotPath1, Res)
Browse[2]> debug: Type <- as.vector(Path1[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path1[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("A", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path1[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("A", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath1 <- rbind(PlotPath1, Res)
Browse[2]> debug: PlotPath2 <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Path2))) {
    Type <- as.vector(Path2[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
            "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Path2[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep("B", 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotPath2 <- rbind(PlotPath2, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Path2[ii, "Chr"])
        St <- as.numeric(as.vector(Path2[ii, "Start"]))
        Ed <- as.numeric(as.vector(Path2[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Path2[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = "B", 
            stringsAsFactors = FALSE)
        PlotPath2 <- rbind(PlotPath2, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Path2[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path2[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("B", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath2 <- rbind(PlotPath2, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path2[ii, "Chr"])
    St <- as.numeric(as.vector(Path2[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path2[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path2[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "B", 
        stringsAsFactors = FALSE)
    PlotPath2 <- rbind(PlotPath2, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path2[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("B", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath2 <- rbind(PlotPath2, Res)
Browse[2]> debug: Ref.Group <- connectedComp(ftM2graphNEL(as.matrix(SG_Edges_Orig[rownames(PathR), 
    seq_len(2)])))
Browse[2]> debug: for (ii in seq_along(Ref.Group)) {
    LL <- length(Ref.Group[[ii]])
    Ref.Group[[ii]] <- cbind(Ref.Group[[ii]][seq_len((LL - 1))], 
        Ref.Group[[ii]][2:LL])
    ixx <- row.match(as.data.frame(Ref.Group[[ii]]), SG_Edges_Orig[, 
        c(1, 2)])
    RR <- SG_Edges_Orig[ixx, ]
    RR[, 1] <- gsub(".[ab]", "", RR[, 1])
    RR[, 2] <- gsub(".[ab]", "", RR[, 2])
    Trs <- rep(paste("Ref", ii, sep = ""), nrow(RR))
    RR <- cbind(RR, Trs)
    Ref.Group[[ii]] <- RR
}
Browse[2]> debug: LL <- length(Ref.Group[[ii]])
Browse[2]> debug: Ref.Group[[ii]] <- cbind(Ref.Group[[ii]][seq_len((LL - 1))], 
    Ref.Group[[ii]][2:LL])
Browse[2]> debug: ixx <- row.match(as.data.frame(Ref.Group[[ii]]), SG_Edges_Orig[, 
    c(1, 2)])
Browse[2]> debug: RR <- SG_Edges_Orig[ixx, ]
Browse[2]> debug: RR[, 1] <- gsub(".[ab]", "", RR[, 1])
Browse[2]> debug: RR[, 2] <- gsub(".[ab]", "", RR[, 2])
Browse[2]> debug: Trs <- rep(paste("Ref", ii, sep = ""), nrow(RR))
Browse[2]> debug: RR <- cbind(RR, Trs)
Browse[2]> debug: Ref.Group[[ii]] <- RR
Browse[2]> debug: Reference <- do.call(rbind, Ref.Group)
Browse[2]> debug: PlotReference <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Reference))) {
    Type <- as.vector(Reference[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Reference[ii, "Start"]), 
            as.vector(Reference[ii, "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Reference[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep(Reference[ii, "Trs"], 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotReference <- rbind(PlotReference, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Reference[ii, "Chr"])
        St <- as.numeric(as.vector(Reference[ii, "Start"]))
        Ed <- as.numeric(as.vector(Reference[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Reference[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
                "Trs"], stringsAsFactors = FALSE)
        PlotReference <- rbind(PlotReference, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Reference[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Reference[ii, "Start"]), as.vector(Reference[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Reference[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep(Reference[ii, "Trs"], 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
} else if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: Chr <- as.vector(Reference[ii, "Chr"])
Browse[2]> debug: St <- as.numeric(as.vector(Reference[ii, "Start"]))
Browse[2]> debug: Ed <- as.numeric(as.vector(Reference[ii, "End"]))
Browse[2]> debug: Wd <- Ed - St
Browse[2]> debug: Str <- as.vector(Reference[ii, "Strand"])
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gene, transcript = Reference[ii, "Trs"], 
    stringsAsFactors = FALSE)
Browse[2]> debug: PlotReference <- rbind(PlotReference, Res)
Browse[2]> debug: Plot <- rbind(PlotPath1, PlotPath2, PlotReference)
Browse[2]> debug: return(Plot)
Browse[2]> 
  |                                                                            
  |===============================================                       |  67%Called from: GetIGVPaths(Result2[jj, ], EvtEdg)
Browse[1]> debug: Gene <- as.vector(EventInfo[1, 1])
Browse[2]> debug: Path1 <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.1"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: Path2 <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.2"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: PathR <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.Reference"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: SG_Edges_Orig <- SG_Edges
Browse[2]> debug: SG_Edges[, 1] <- gsub(".[ab]", "", SG_Edges[, 1])
Browse[2]> debug: SG_Edges[, 2] <- gsub(".[ab]", "", SG_Edges[, 2])
Browse[2]> debug: P1.ix <- apply(Path1, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: P2.ix <- apply(Path2, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: PR.ix <- apply(PathR, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: Path1 <- SG_Edges[P1.ix, ]
Browse[2]> debug: Path2 <- SG_Edges[P2.ix, ]
Browse[2]> debug: PathR <- SG_Edges[PR.ix, ]
Browse[2]> debug: PlotPath1 <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Path1))) {
    Type <- as.vector(Path1[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
            "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Path1[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep("A", 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotPath1 <- rbind(PlotPath1, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Path1[ii, "Chr"])
        St <- as.numeric(as.vector(Path1[ii, "Start"]))
        Ed <- as.numeric(as.vector(Path1[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Path1[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = "A", 
            stringsAsFactors = FALSE)
        PlotPath1 <- rbind(PlotPath1, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Path1[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path1[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("A", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: Chr <- as.vector(Path1[ii, "Chr"])
Browse[2]> debug: St <- as.numeric(as.vector(Path1[ii, "Start"]))
Browse[2]> debug: Ed <- as.numeric(as.vector(Path1[ii, "End"]))
Browse[2]> debug: Wd <- Ed - St
Browse[2]> debug: Str <- as.vector(Path1[ii, "Strand"])
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gene, transcript = "A", stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath1 <- rbind(PlotPath1, Res)
Browse[2]> debug: Type <- as.vector(Path1[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path1[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("A", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path1[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("A", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath1 <- rbind(PlotPath1, Res)
Browse[2]> debug: PlotPath2 <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Path2))) {
    Type <- as.vector(Path2[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
            "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Path2[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep("B", 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotPath2 <- rbind(PlotPath2, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Path2[ii, "Chr"])
        St <- as.numeric(as.vector(Path2[ii, "Start"]))
        Ed <- as.numeric(as.vector(Path2[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Path2[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = "B", 
            stringsAsFactors = FALSE)
        PlotPath2 <- rbind(PlotPath2, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Path2[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path2[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("B", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath2 <- rbind(PlotPath2, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path2[ii, "Chr"])
    St <- as.numeric(as.vector(Path2[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path2[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path2[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "B", 
        stringsAsFactors = FALSE)
    PlotPath2 <- rbind(PlotPath2, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path2[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("B", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath2 <- rbind(PlotPath2, Res)
Browse[2]> debug: Ref.Group <- connectedComp(ftM2graphNEL(as.matrix(SG_Edges_Orig[rownames(PathR), 
    seq_len(2)])))
Browse[2]> debug: for (ii in seq_along(Ref.Group)) {
    LL <- length(Ref.Group[[ii]])
    Ref.Group[[ii]] <- cbind(Ref.Group[[ii]][seq_len((LL - 1))], 
        Ref.Group[[ii]][2:LL])
    ixx <- row.match(as.data.frame(Ref.Group[[ii]]), SG_Edges_Orig[, 
        c(1, 2)])
    RR <- SG_Edges_Orig[ixx, ]
    RR[, 1] <- gsub(".[ab]", "", RR[, 1])
    RR[, 2] <- gsub(".[ab]", "", RR[, 2])
    Trs <- rep(paste("Ref", ii, sep = ""), nrow(RR))
    RR <- cbind(RR, Trs)
    Ref.Group[[ii]] <- RR
}
Browse[2]> debug: LL <- length(Ref.Group[[ii]])
Browse[2]> debug: Ref.Group[[ii]] <- cbind(Ref.Group[[ii]][seq_len((LL - 1))], 
    Ref.Group[[ii]][2:LL])
Browse[2]> debug: ixx <- row.match(as.data.frame(Ref.Group[[ii]]), SG_Edges_Orig[, 
    c(1, 2)])
Browse[2]> debug: RR <- SG_Edges_Orig[ixx, ]
Browse[2]> debug: RR[, 1] <- gsub(".[ab]", "", RR[, 1])
Browse[2]> debug: RR[, 2] <- gsub(".[ab]", "", RR[, 2])
Browse[2]> debug: Trs <- rep(paste("Ref", ii, sep = ""), nrow(RR))
Browse[2]> debug: RR <- cbind(RR, Trs)
Browse[2]> debug: Ref.Group[[ii]] <- RR
Browse[2]> debug: Reference <- do.call(rbind, Ref.Group)
Browse[2]> debug: PlotReference <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Reference))) {
    Type <- as.vector(Reference[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Reference[ii, "Start"]), 
            as.vector(Reference[ii, "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Reference[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep(Reference[ii, "Trs"], 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotReference <- rbind(PlotReference, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Reference[ii, "Chr"])
        St <- as.numeric(as.vector(Reference[ii, "Start"]))
        Ed <- as.numeric(as.vector(Reference[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Reference[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
                "Trs"], stringsAsFactors = FALSE)
        PlotReference <- rbind(PlotReference, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Reference[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Reference[ii, "Start"]), as.vector(Reference[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Reference[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep(Reference[ii, "Trs"], 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
} else if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: Chr <- as.vector(Reference[ii, "Chr"])
Browse[2]> debug: St <- as.numeric(as.vector(Reference[ii, "Start"]))
Browse[2]> debug: Ed <- as.numeric(as.vector(Reference[ii, "End"]))
Browse[2]> debug: Wd <- Ed - St
Browse[2]> debug: Str <- as.vector(Reference[ii, "Strand"])
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gene, transcript = Reference[ii, "Trs"], 
    stringsAsFactors = FALSE)
Browse[2]> debug: PlotReference <- rbind(PlotReference, Res)
Browse[2]> debug: Plot <- rbind(PlotPath1, PlotPath2, PlotReference)
Browse[2]> debug: return(Plot)
Browse[2]> 
  |                                                                            
  |======================================================                |  78%Called from: GetIGVPaths(Result2[jj, ], EvtEdg)
Browse[1]> debug: Gene <- as.vector(EventInfo[1, 1])
Browse[2]> debug: Path1 <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.1"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: Path2 <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.2"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: PathR <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.Reference"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: SG_Edges_Orig <- SG_Edges
Browse[2]> debug: SG_Edges[, 1] <- gsub(".[ab]", "", SG_Edges[, 1])
Browse[2]> debug: SG_Edges[, 2] <- gsub(".[ab]", "", SG_Edges[, 2])
Browse[2]> debug: P1.ix <- apply(Path1, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: P2.ix <- apply(Path2, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: PR.ix <- apply(PathR, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: Path1 <- SG_Edges[P1.ix, ]
Browse[2]> debug: Path2 <- SG_Edges[P2.ix, ]
Browse[2]> debug: PathR <- SG_Edges[PR.ix, ]
Browse[2]> debug: PlotPath1 <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Path1))) {
    Type <- as.vector(Path1[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
            "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Path1[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep("A", 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotPath1 <- rbind(PlotPath1, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Path1[ii, "Chr"])
        St <- as.numeric(as.vector(Path1[ii, "Start"]))
        Ed <- as.numeric(as.vector(Path1[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Path1[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = "A", 
            stringsAsFactors = FALSE)
        PlotPath1 <- rbind(PlotPath1, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Path1[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path1[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("A", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: Chr <- as.vector(Path1[ii, "Chr"])
Browse[2]> debug: St <- as.numeric(as.vector(Path1[ii, "Start"]))
Browse[2]> debug: Ed <- as.numeric(as.vector(Path1[ii, "End"]))
Browse[2]> debug: Wd <- Ed - St
Browse[2]> debug: Str <- as.vector(Path1[ii, "Strand"])
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gene, transcript = "A", stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath1 <- rbind(PlotPath1, Res)
Browse[2]> debug: PlotPath2 <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Path2))) {
    Type <- as.vector(Path2[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
            "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Path2[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep("B", 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotPath2 <- rbind(PlotPath2, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Path2[ii, "Chr"])
        St <- as.numeric(as.vector(Path2[ii, "Start"]))
        Ed <- as.numeric(as.vector(Path2[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Path2[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = "B", 
            stringsAsFactors = FALSE)
        PlotPath2 <- rbind(PlotPath2, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Path2[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path2[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("B", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath2 <- rbind(PlotPath2, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path2[ii, "Chr"])
    St <- as.numeric(as.vector(Path2[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path2[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path2[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "B", 
        stringsAsFactors = FALSE)
    PlotPath2 <- rbind(PlotPath2, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path2[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("B", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath2 <- rbind(PlotPath2, Res)
Browse[2]> debug: Ref.Group <- connectedComp(ftM2graphNEL(as.matrix(SG_Edges_Orig[rownames(PathR), 
    seq_len(2)])))
Browse[2]> debug: for (ii in seq_along(Ref.Group)) {
    LL <- length(Ref.Group[[ii]])
    Ref.Group[[ii]] <- cbind(Ref.Group[[ii]][seq_len((LL - 1))], 
        Ref.Group[[ii]][2:LL])
    ixx <- row.match(as.data.frame(Ref.Group[[ii]]), SG_Edges_Orig[, 
        c(1, 2)])
    RR <- SG_Edges_Orig[ixx, ]
    RR[, 1] <- gsub(".[ab]", "", RR[, 1])
    RR[, 2] <- gsub(".[ab]", "", RR[, 2])
    Trs <- rep(paste("Ref", ii, sep = ""), nrow(RR))
    RR <- cbind(RR, Trs)
    Ref.Group[[ii]] <- RR
}
Browse[2]> debug: LL <- length(Ref.Group[[ii]])
Browse[2]> debug: Ref.Group[[ii]] <- cbind(Ref.Group[[ii]][seq_len((LL - 1))], 
    Ref.Group[[ii]][2:LL])
Browse[2]> debug: ixx <- row.match(as.data.frame(Ref.Group[[ii]]), SG_Edges_Orig[, 
    c(1, 2)])
Browse[2]> debug: RR <- SG_Edges_Orig[ixx, ]
Browse[2]> debug: RR[, 1] <- gsub(".[ab]", "", RR[, 1])
Browse[2]> debug: RR[, 2] <- gsub(".[ab]", "", RR[, 2])
Browse[2]> debug: Trs <- rep(paste("Ref", ii, sep = ""), nrow(RR))
Browse[2]> debug: RR <- cbind(RR, Trs)
Browse[2]> debug: Ref.Group[[ii]] <- RR
Browse[2]> debug: Reference <- do.call(rbind, Ref.Group)
Browse[2]> debug: PlotReference <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Reference))) {
    Type <- as.vector(Reference[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Reference[ii, "Start"]), 
            as.vector(Reference[ii, "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Reference[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep(Reference[ii, "Trs"], 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotReference <- rbind(PlotReference, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Reference[ii, "Chr"])
        St <- as.numeric(as.vector(Reference[ii, "Start"]))
        Ed <- as.numeric(as.vector(Reference[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Reference[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
                "Trs"], stringsAsFactors = FALSE)
        PlotReference <- rbind(PlotReference, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Reference[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Reference[ii, "Start"]), as.vector(Reference[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Reference[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep(Reference[ii, "Trs"], 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
} else if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: Chr <- as.vector(Reference[ii, "Chr"])
Browse[2]> debug: St <- as.numeric(as.vector(Reference[ii, "Start"]))
Browse[2]> debug: Ed <- as.numeric(as.vector(Reference[ii, "End"]))
Browse[2]> debug: Wd <- Ed - St
Browse[2]> debug: Str <- as.vector(Reference[ii, "Strand"])
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gene, transcript = Reference[ii, "Trs"], 
    stringsAsFactors = FALSE)
Browse[2]> debug: PlotReference <- rbind(PlotReference, Res)
Browse[2]> debug: Plot <- rbind(PlotPath1, PlotPath2, PlotReference)
Browse[2]> debug: return(Plot)
Browse[2]> 
  |                                                                            
  |==============================================================        |  89%Called from: GetIGVPaths(Result2[jj, ], EvtEdg)
Browse[1]> debug: Gene <- as.vector(EventInfo[1, 1])
Browse[2]> debug: Path1 <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.1"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: Path2 <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.2"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: PathR <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.Reference"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: SG_Edges_Orig <- SG_Edges
Browse[2]> debug: SG_Edges[, 1] <- gsub(".[ab]", "", SG_Edges[, 1])
Browse[2]> debug: SG_Edges[, 2] <- gsub(".[ab]", "", SG_Edges[, 2])
Browse[2]> debug: P1.ix <- apply(Path1, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: P2.ix <- apply(Path2, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: PR.ix <- apply(PathR, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: Path1 <- SG_Edges[P1.ix, ]
Browse[2]> debug: Path2 <- SG_Edges[P2.ix, ]
Browse[2]> debug: PathR <- SG_Edges[PR.ix, ]
Browse[2]> debug: PlotPath1 <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Path1))) {
    Type <- as.vector(Path1[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
            "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Path1[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep("A", 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotPath1 <- rbind(PlotPath1, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Path1[ii, "Chr"])
        St <- as.numeric(as.vector(Path1[ii, "Start"]))
        Ed <- as.numeric(as.vector(Path1[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Path1[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = "A", 
            stringsAsFactors = FALSE)
        PlotPath1 <- rbind(PlotPath1, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Path1[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path1[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("A", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path1[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("A", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath1 <- rbind(PlotPath1, Res)
Browse[2]> debug: Type <- as.vector(Path1[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path1[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("A", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: Chr <- as.vector(Path1[ii, "Chr"])
Browse[2]> debug: St <- as.numeric(as.vector(Path1[ii, "Start"]))
Browse[2]> debug: Ed <- as.numeric(as.vector(Path1[ii, "End"]))
Browse[2]> debug: Wd <- Ed - St
Browse[2]> debug: Str <- as.vector(Path1[ii, "Strand"])
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gene, transcript = "A", stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath1 <- rbind(PlotPath1, Res)
Browse[2]> debug: Type <- as.vector(Path1[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path1[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("A", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path1[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("A", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath1 <- rbind(PlotPath1, Res)
Browse[2]> debug: PlotPath2 <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Path2))) {
    Type <- as.vector(Path2[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
            "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Path2[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep("B", 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotPath2 <- rbind(PlotPath2, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Path2[ii, "Chr"])
        St <- as.numeric(as.vector(Path2[ii, "Start"]))
        Ed <- as.numeric(as.vector(Path2[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Path2[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = "B", 
            stringsAsFactors = FALSE)
        PlotPath2 <- rbind(PlotPath2, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Path2[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path2[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("B", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath2 <- rbind(PlotPath2, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path2[ii, "Chr"])
    St <- as.numeric(as.vector(Path2[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path2[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path2[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "B", 
        stringsAsFactors = FALSE)
    PlotPath2 <- rbind(PlotPath2, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path2[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("B", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath2 <- rbind(PlotPath2, Res)
Browse[2]> debug: Ref.Group <- connectedComp(ftM2graphNEL(as.matrix(SG_Edges_Orig[rownames(PathR), 
    seq_len(2)])))
Browse[2]> debug: for (ii in seq_along(Ref.Group)) {
    LL <- length(Ref.Group[[ii]])
    Ref.Group[[ii]] <- cbind(Ref.Group[[ii]][seq_len((LL - 1))], 
        Ref.Group[[ii]][2:LL])
    ixx <- row.match(as.data.frame(Ref.Group[[ii]]), SG_Edges_Orig[, 
        c(1, 2)])
    RR <- SG_Edges_Orig[ixx, ]
    RR[, 1] <- gsub(".[ab]", "", RR[, 1])
    RR[, 2] <- gsub(".[ab]", "", RR[, 2])
    Trs <- rep(paste("Ref", ii, sep = ""), nrow(RR))
    RR <- cbind(RR, Trs)
    Ref.Group[[ii]] <- RR
}
Browse[2]> debug: LL <- length(Ref.Group[[ii]])
Browse[2]> debug: Ref.Group[[ii]] <- cbind(Ref.Group[[ii]][seq_len((LL - 1))], 
    Ref.Group[[ii]][2:LL])
Browse[2]> debug: ixx <- row.match(as.data.frame(Ref.Group[[ii]]), SG_Edges_Orig[, 
    c(1, 2)])
Browse[2]> debug: RR <- SG_Edges_Orig[ixx, ]
Browse[2]> debug: RR[, 1] <- gsub(".[ab]", "", RR[, 1])
Browse[2]> debug: RR[, 2] <- gsub(".[ab]", "", RR[, 2])
Browse[2]> debug: Trs <- rep(paste("Ref", ii, sep = ""), nrow(RR))
Browse[2]> debug: RR <- cbind(RR, Trs)
Browse[2]> debug: Ref.Group[[ii]] <- RR
Browse[2]> debug: Reference <- do.call(rbind, Ref.Group)
Browse[2]> debug: PlotReference <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Reference))) {
    Type <- as.vector(Reference[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Reference[ii, "Start"]), 
            as.vector(Reference[ii, "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Reference[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep(Reference[ii, "Trs"], 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotReference <- rbind(PlotReference, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Reference[ii, "Chr"])
        St <- as.numeric(as.vector(Reference[ii, "Start"]))
        Ed <- as.numeric(as.vector(Reference[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Reference[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
                "Trs"], stringsAsFactors = FALSE)
        PlotReference <- rbind(PlotReference, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Reference[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Reference[ii, "Start"]), as.vector(Reference[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Reference[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep(Reference[ii, "Trs"], 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
} else if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: Chr <- as.vector(Reference[ii, "Chr"])
Browse[2]> debug: St <- as.numeric(as.vector(Reference[ii, "Start"]))
Browse[2]> debug: Ed <- as.numeric(as.vector(Reference[ii, "End"]))
Browse[2]> debug: Wd <- Ed - St
Browse[2]> debug: Str <- as.vector(Reference[ii, "Strand"])
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gene, transcript = Reference[ii, "Trs"], 
    stringsAsFactors = FALSE)
Browse[2]> debug: PlotReference <- rbind(PlotReference, Res)
Browse[2]> debug: Type <- as.vector(Reference[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Reference[ii, "Start"]), as.vector(Reference[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Reference[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep(Reference[ii, "Trs"], 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
} else if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Reference[ii, "Start"]), as.vector(Reference[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Reference[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep(Reference[ii, "Trs"], 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotReference <- rbind(PlotReference, Res)
Browse[2]> debug: Plot <- rbind(PlotPath1, PlotPath2, PlotReference)
Browse[2]> debug: return(Plot)
Browse[2]> 
  |                                                                            
  |======================================================================| 100%Called from: GetIGVPaths(Result2[jj, ], EvtEdg)
Browse[1]> debug: Gene <- as.vector(EventInfo[1, 1])
Browse[2]> debug: Path1 <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.1"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: Path2 <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.2"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: PathR <- matrix(unlist(strsplit(as.vector(EventInfo[, "Path.Reference"]), 
    "[,-]")), ncol = 2, byrow = TRUE)
Browse[2]> debug: SG_Edges_Orig <- SG_Edges
Browse[2]> debug: SG_Edges[, 1] <- gsub(".[ab]", "", SG_Edges[, 1])
Browse[2]> debug: SG_Edges[, 2] <- gsub(".[ab]", "", SG_Edges[, 2])
Browse[2]> debug: P1.ix <- apply(Path1, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: P2.ix <- apply(Path2, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: PR.ix <- apply(PathR, 1, function(x) {
    ix <- which(SG_Edges[, 1] == x[1] & SG_Edges[, 2] == x[2])
    return(ix)
})
Browse[2]> debug: Path1 <- SG_Edges[P1.ix, ]
Browse[2]> debug: Path2 <- SG_Edges[P2.ix, ]
Browse[2]> debug: PathR <- SG_Edges[PR.ix, ]
Browse[2]> debug: PlotPath1 <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Path1))) {
    Type <- as.vector(Path1[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
            "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Path1[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep("A", 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotPath1 <- rbind(PlotPath1, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Path1[ii, "Chr"])
        St <- as.numeric(as.vector(Path1[ii, "Start"]))
        Ed <- as.numeric(as.vector(Path1[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Path1[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = "A", 
            stringsAsFactors = FALSE)
        PlotPath1 <- rbind(PlotPath1, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Path1[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path1[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("A", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: Chr <- as.vector(Path1[ii, "Chr"])
Browse[2]> debug: St <- as.numeric(as.vector(Path1[ii, "Start"]))
Browse[2]> debug: Ed <- as.numeric(as.vector(Path1[ii, "End"]))
Browse[2]> debug: Wd <- Ed - St
Browse[2]> debug: Str <- as.vector(Path1[ii, "Strand"])
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gene, transcript = "A", stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath1 <- rbind(PlotPath1, Res)
Browse[2]> debug: Type <- as.vector(Path1[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path1[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("A", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path1[ii, "Chr"])
    St <- as.numeric(as.vector(Path1[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path1[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path1[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "A", 
        stringsAsFactors = FALSE)
    PlotPath1 <- rbind(PlotPath1, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path1[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path1[ii, "Start"]), as.vector(Path1[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path1[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("A", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath1 <- rbind(PlotPath1, Res)
Browse[2]> debug: PlotPath2 <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Path2))) {
    Type <- as.vector(Path2[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
            "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Path2[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep("B", 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotPath2 <- rbind(PlotPath2, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Path2[ii, "Chr"])
        St <- as.numeric(as.vector(Path2[ii, "Start"]))
        Ed <- as.numeric(as.vector(Path2[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Path2[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = "B", 
            stringsAsFactors = FALSE)
        PlotPath2 <- rbind(PlotPath2, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Path2[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Path2[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep("B", 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotPath2 <- rbind(PlotPath2, Res)
} else if (Type == "E") {
    Chr <- as.vector(Path2[ii, "Chr"])
    St <- as.numeric(as.vector(Path2[ii, "Start"]))
    Ed <- as.numeric(as.vector(Path2[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Path2[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = "B", 
        stringsAsFactors = FALSE)
    PlotPath2 <- rbind(PlotPath2, Res)
}
Browse[2]> debug: Chr <- as.vector(rep(Path2[ii, "Chr"], 2))
Browse[2]> debug: St <- as.numeric(c(as.vector(Path2[ii, "Start"]), as.vector(Path2[ii, 
    "End"])))
Browse[2]> debug: Ed <- St
Browse[2]> debug: Wd <- as.numeric(rep(0, 2))
Browse[2]> debug: Str <- as.vector(rep(Path2[ii, "Strand"], 2))
Browse[2]> debug: Gn <- as.vector(rep(Gene, 2))
Browse[2]> debug: Trs <- rep("B", 2)
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gn, transcript = Trs, stringsAsFactors = FALSE)
Browse[2]> debug: PlotPath2 <- rbind(PlotPath2, Res)
Browse[2]> debug: Ref.Group <- connectedComp(ftM2graphNEL(as.matrix(SG_Edges_Orig[rownames(PathR), 
    seq_len(2)])))
Browse[2]> debug: for (ii in seq_along(Ref.Group)) {
    LL <- length(Ref.Group[[ii]])
    Ref.Group[[ii]] <- cbind(Ref.Group[[ii]][seq_len((LL - 1))], 
        Ref.Group[[ii]][2:LL])
    ixx <- row.match(as.data.frame(Ref.Group[[ii]]), SG_Edges_Orig[, 
        c(1, 2)])
    RR <- SG_Edges_Orig[ixx, ]
    RR[, 1] <- gsub(".[ab]", "", RR[, 1])
    RR[, 2] <- gsub(".[ab]", "", RR[, 2])
    Trs <- rep(paste("Ref", ii, sep = ""), nrow(RR))
    RR <- cbind(RR, Trs)
    Ref.Group[[ii]] <- RR
}
Browse[2]> debug: LL <- length(Ref.Group[[ii]])
Browse[2]> debug: Ref.Group[[ii]] <- cbind(Ref.Group[[ii]][seq_len((LL - 1))], 
    Ref.Group[[ii]][2:LL])
Browse[2]> debug: ixx <- row.match(as.data.frame(Ref.Group[[ii]]), SG_Edges_Orig[, 
    c(1, 2)])
Browse[2]> debug: RR <- SG_Edges_Orig[ixx, ]
Browse[2]> debug: RR[, 1] <- gsub(".[ab]", "", RR[, 1])
Browse[2]> debug: RR[, 2] <- gsub(".[ab]", "", RR[, 2])
Browse[2]> debug: Trs <- rep(paste("Ref", ii, sep = ""), nrow(RR))
Browse[2]> debug: RR <- cbind(RR, Trs)
Browse[2]> debug: Ref.Group[[ii]] <- RR
Browse[2]> debug: LL <- length(Ref.Group[[ii]])
Browse[2]> debug: Ref.Group[[ii]] <- cbind(Ref.Group[[ii]][seq_len((LL - 1))], 
    Ref.Group[[ii]][2:LL])
Browse[2]> debug: ixx <- row.match(as.data.frame(Ref.Group[[ii]]), SG_Edges_Orig[, 
    c(1, 2)])
Browse[2]> debug: RR <- SG_Edges_Orig[ixx, ]
Browse[2]> debug: RR[, 1] <- gsub(".[ab]", "", RR[, 1])
Browse[2]> debug: RR[, 2] <- gsub(".[ab]", "", RR[, 2])
Browse[2]> debug: Trs <- rep(paste("Ref", ii, sep = ""), nrow(RR))
Browse[2]> debug: RR <- cbind(RR, Trs)
Browse[2]> debug: Ref.Group[[ii]] <- RR
Browse[2]> debug: Reference <- do.call(rbind, Ref.Group)
Browse[2]> debug: PlotReference <- c()
Browse[2]> debug: for (ii in seq_len(nrow(Reference))) {
    Type <- as.vector(Reference[ii, "Type"])
    if (Type == "J") {
        Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
        St <- as.numeric(c(as.vector(Reference[ii, "Start"]), 
            as.vector(Reference[ii, "End"])))
        Ed <- St
        Wd <- as.numeric(rep(0, 2))
        Str <- as.vector(rep(Reference[ii, "Strand"], 2))
        Gn <- as.vector(rep(Gene, 2))
        Trs <- rep(Reference[ii, "Trs"], 2)
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gn, transcript = Trs, 
            stringsAsFactors = FALSE)
        PlotReference <- rbind(PlotReference, Res)
    }
    else if (Type == "E") {
        Chr <- as.vector(Reference[ii, "Chr"])
        St <- as.numeric(as.vector(Reference[ii, "Start"]))
        Ed <- as.numeric(as.vector(Reference[ii, "End"]))
        Wd <- Ed - St
        Str <- as.vector(Reference[ii, "Strand"])
        Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
            width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
                "Trs"], stringsAsFactors = FALSE)
        PlotReference <- rbind(PlotReference, Res)
    }
}
Browse[2]> debug: Type <- as.vector(Reference[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Reference[ii, "Start"]), as.vector(Reference[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Reference[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep(Reference[ii, "Trs"], 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
} else if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: Chr <- as.vector(Reference[ii, "Chr"])
Browse[2]> debug: St <- as.numeric(as.vector(Reference[ii, "Start"]))
Browse[2]> debug: Ed <- as.numeric(as.vector(Reference[ii, "End"]))
Browse[2]> debug: Wd <- Ed - St
Browse[2]> debug: Str <- as.vector(Reference[ii, "Strand"])
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gene, transcript = Reference[ii, "Trs"], 
    stringsAsFactors = FALSE)
Browse[2]> debug: PlotReference <- rbind(PlotReference, Res)
Browse[2]> debug: Type <- as.vector(Reference[ii, "Type"])
Browse[2]> debug: if (Type == "J") {
    Chr <- as.vector(rep(Reference[ii, "Chr"], 2))
    St <- as.numeric(c(as.vector(Reference[ii, "Start"]), as.vector(Reference[ii, 
        "End"])))
    Ed <- St
    Wd <- as.numeric(rep(0, 2))
    Str <- as.vector(rep(Reference[ii, "Strand"], 2))
    Gn <- as.vector(rep(Gene, 2))
    Trs <- rep(Reference[ii, "Trs"], 2)
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gn, transcript = Trs, 
        stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
} else if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: if (Type == "E") {
    Chr <- as.vector(Reference[ii, "Chr"])
    St <- as.numeric(as.vector(Reference[ii, "Start"]))
    Ed <- as.numeric(as.vector(Reference[ii, "End"]))
    Wd <- Ed - St
    Str <- as.vector(Reference[ii, "Strand"])
    Res <- data.frame(chromosome = Chr, start = St, end = Ed, 
        width = Wd, strand = Str, gene = Gene, transcript = Reference[ii, 
            "Trs"], stringsAsFactors = FALSE)
    PlotReference <- rbind(PlotReference, Res)
}
Browse[2]> debug: Chr <- as.vector(Reference[ii, "Chr"])
Browse[2]> debug: St <- as.numeric(as.vector(Reference[ii, "Start"]))
Browse[2]> debug: Ed <- as.numeric(as.vector(Reference[ii, "End"]))
Browse[2]> debug: Wd <- Ed - St
Browse[2]> debug: Str <- as.vector(Reference[ii, "Strand"])
Browse[2]> debug: Res <- data.frame(chromosome = Chr, start = St, end = Ed, width = Wd, 
    strand = Str, gene = Gene, transcript = Reference[ii, "Trs"], 
    stringsAsFactors = FALSE)
Browse[2]> debug: PlotReference <- rbind(PlotReference, Res)
Browse[2]> debug: Plot <- rbind(PlotPath1, PlotPath2, PlotReference)
Browse[2]> debug: return(Plot)
Browse[2]> 

.txt created
Creating the sparseMatrix of paths x transcripts...

	******FINISHED******


RUNIT TEST PROTOCOL -- Mon Apr  8 00:38:43 2019 
*********************************************** 
Number of test functions: 13 
Number of errors: 0 
Number of failures: 0 

 
1 Test Suite : 
EventPointer RUnit Tests - 13 test functions, 0 errors, 0 failures
Number of test functions: 13 
Number of errors: 0 
Number of failures: 0 
> 
> proc.time()
   user  system elapsed 
 25.331   0.486  26.496 

Example timings

EventPointer.Rcheck/EventPointer-Ex.timings

nameusersystemelapsed
CDFfromGTF6.5330.1287.022
CDFfromGTF_Multipath5.4890.0275.523
EventDetection1.8910.0081.900
EventDetectionMultipath1.1840.0001.183
EventPointer0.0580.0040.079
EventPointer_IGV3.2690.0013.269
EventPointer_RNASeq0.1160.0000.115
EventPointer_RNASeq_IGV1.1720.0001.175
EventPointer_RNASeq_TranRef0.0190.0040.023
EventsGTFfromTrancriptomeGTF4.3260.0074.357
GetPSI_FromTranRef0.0110.0000.140
PSI_Statistic0.1280.0000.128
PrepareBam_EP0.0000.0000.001
getbootstrapkallisto0.3050.0170.481