% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/igvShiny.R
\name{loadSpliceJunctionTrackFromLocalData}
\alias{loadSpliceJunctionTrackFromLocalData}
\title{load a splice junction track from a data.frame}
\usage{
loadSpliceJunctionTrackFromLocalData(
  session,
  id,
  trackName,
  tbl,
  trackHeight = 100,
  displayMode = "COLLAPSED",
  deleteTracksOfSameName = TRUE,
  trackConfig = list()
)
}
\arguments{
\item{session}{an environment or list, provided and managed by shiny}

\item{id}{character string, the html element id of this widget instance}

\item{trackName}{character string}

\item{tbl}{data.frame, with at least "chrom" "start" "end" columns, in bed
coordinates: a 0-based start and an exclusive end}

\item{trackHeight}{an integer, 100 (pixels) by default}

\item{displayMode}{character, "COLLAPSED", "EXPANDED" or "SQUISHED"}

\item{deleteTracksOfSameName}{logical, default TRUE}

\item{trackConfig}{a named list of additional igv.js track configuration
options, the junction ones among them; see
\code{\link{loadSpliceJunctionTrackFromURL}}}
}
\value{
nothing
}
\description{
load splice junctions held in R. The table is written as the
six-column bed igv.js draws junctions from, and served from the same
directory as the other local-data tracks.

Coordinates are taken as bed coordinates and written out unchanged, as the
other \code{*FromLocalData} loaders take theirs. STAR reports the first and
last intron base of a junction 1-based in \code{SJ.out.tab}, so a table read
straight from that file needs its start shifted by one first; a bed already
converted from it, which is what STAR wrappers and the igv.js test fixtures
ship, is passed in as is.

Columns \code{chrom} (or \code{chr}), \code{start} and \code{end} are
required. \code{score} and \code{strand} are used when present. The
per-junction attributes \code{motif}, \code{uniquely_mapped},
\code{multi_mapped}, \code{maximum_spliced_alignment_overhang} and
\code{annotated_junction} are packed into the bed name column, which is
where the track reads its filters and labels from; supply the ones you
want to filter or label on. A \code{name} column, if you have already
packed it yourself, is written through untouched.

Without \code{uniquely_mapped} or an explicit \code{score} the arcs all
draw at the same thickness: igv.js has nothing to size them by.
}
\examples{
library(igvShiny)
demo_app_file <-
  system.file(package = "igvShiny", "showcase", "igvShinyDemo.R")
if (interactive()) {
  shiny::runApp(demo_app_file)
}

}
\keyword{track_loaders}
