Title: | igvShiny: a wrapper of Integrative Genomics Viewer (IGV - an interactive tool for visualization and exploration integrated genomic data) |
---|---|
Description: | This package is a wrapper of Integrative Genomics Viewer (IGV). It comprises an htmlwidget version of IGV. It can be used as a module in Shiny apps. |
Authors: | Paul Shannon [aut], Arkadiusz Gladki [aut, cre] , Karolina Scigocka [aut] |
Maintainer: | Arkadiusz Gladki <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.3.0 |
Built: | 2024-12-09 06:17:06 UTC |
Source: | https://github.com/bioc/igvShiny |
display the already constructed and configured track
## S4 method for signature 'GWASTrack' display(obj, session, id, deleteTracksOfSameName = TRUE)
## S4 method for signature 'GWASTrack' display(obj, session, id, deleteTracksOfSameName = TRUE)
obj |
An object of class GWASTrack |
session |
a Shiny session object |
id |
character the identifier of the target igv object in the browser |
deleteTracksOfSameName |
logical to avoid duplications in track names |
nothing
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
a helper function for basic genomes, obtains the genome codes (e.g. 'hg38')
get_basic_genomes()
get_basic_genomes()
an list of short genome codes, e.g., "hg38", "dm6"
bs <- get_basic_genomes()
bs <- get_basic_genomes()
a helper function for common always available stock genomes, obtains the genome codes (e.g. 'hg38')
get_cas_genomes()
get_cas_genomes()
an list of short genome codes, e.g., "hg38", "dm6"
cas <- get_cas_genomes()
cas <- get_cas_genomes()
a helper function for mostly internal use, obtains the genome codes (e.g. 'hg38') supported by igv.js
get_css_genomes(test = FALSE)
get_css_genomes(test = FALSE)
test |
logical(1) defaults to FALSE |
an list of short genome codes, e.g., "hg38", "dm6", "tair10"
css <- get_css_genomes(test = TRUE)
css <- get_css_genomes(test = TRUE)
get_tracks_dir Get the directory where tracks are stored. The directory can be defined with environmental variable. If not defined the default is a directory called "tracks" in the temp directory. We need a local directory to write files - for instance, a vcf file representing a genomic region of interest. We then tell shiny about that directory, so that shiny's built-in http server can serve up files we write there, ultimately consumed by igv.js
get_tracks_dir(env_var = "TRACKS_DIR")
get_tracks_dir(env_var = "TRACKS_DIR")
env_var |
The name of the environmental variable to use. |
string with the path to the tracks directory.
gtd <- get_tracks_dir(env_var = "TRACKS_DIR")
gtd <- get_tracks_dir(env_var = "TRACKS_DIR")
the url of the gwas table
## S4 method for signature 'GWASTrack' getUrl(obj)
## S4 method for signature 'GWASTrack' getUrl(obj)
obj |
An object of class GWASTrack |
character
file <- # a local gwas file system.file(package = "igvShiny", "extdata", "gwas-5k.tsv.gz") tbl.gwas <- read.table(file, sep = "\t", header = TRUE, quote = "") track <- GWASTrack( "gwas 5k", tbl.gwas, chrom.col = 12, pos.col = 13, pval.col = 28 ) getUrl(track)
file <- # a local gwas file system.file(package = "igvShiny", "extdata", "gwas-5k.tsv.gz") tbl.gwas <- read.table(file, sep = "\t", header = TRUE, quote = "") track <- GWASTrack( "gwas 5k", tbl.gwas, chrom.col = 12, pos.col = 13, pval.col = 28 ) getUrl(track)
GWASTrack
creates an IGV
manhattan track from GWAS data
GWASTrack( trackName, data, chrom.col, pos.col, pval.col, trackHeight = 50, autoscale = TRUE, minY = 0, maxY = 30 )
GWASTrack( trackName, data, chrom.col, pos.col, pval.col, trackHeight = 50, autoscale = TRUE, minY = 0, maxY = 30 )
trackName |
A character string, used as track label by igv, we recommend unique names per track. |
data |
a data.frame or a url pointing to one, whose structure is described by chrom.col, pos.col, pval.col |
chrom.col |
numeric, the column number of the chromosome column |
pos.col |
numeric, the column number of the position column |
pval.col |
numeric, the column number of the GWAS pvalue column |
trackHeight |
numeric in pixels |
autoscale |
logical |
minY |
numeric for explicit (non-auto) scaling |
maxY |
numeric for explicit (non-auto) scaling |
A GWASTrack object
file <- # a local gwas file system.file(package = "igvShiny", "extdata", "gwas-5k.tsv.gz") tbl.gwas <- read.table(file, sep = "\t", header = TRUE, quote = "") dim(tbl.gwas) track <- GWASTrack( "gwas 5k", tbl.gwas, chrom.col = 12, pos.col = 13, pval.col = 28 ) getUrl(track) url <- "https://gladki.pl/igvShiny/gwas_sample.tsv.gz" track <- GWASTrack( "remote url gwas", url, chrom.col = 3, pos.col = 4, pval.col = 10, autoscale = FALSE, minY = 0, maxY = 300, trackHeight = 100 ) getUrl(track)
file <- # a local gwas file system.file(package = "igvShiny", "extdata", "gwas-5k.tsv.gz") tbl.gwas <- read.table(file, sep = "\t", header = TRUE, quote = "") dim(tbl.gwas) track <- GWASTrack( "gwas 5k", tbl.gwas, chrom.col = 12, pos.col = 13, pval.col = 28 ) getUrl(track) url <- "https://gladki.pl/igvShiny/gwas_sample.tsv.gz" track <- GWASTrack( "remote url gwas", url, chrom.col = 3, pos.col = 4, pval.col = 10, autoscale = FALSE, minY = 0, maxY = 300, trackHeight = 100 ) getUrl(track)
This function is called in the server function of your shiny app
igvShiny( genomeOptions, width = NULL, height = NULL, elementId = NULL, displayMode = "squished", tracks = list() )
igvShiny( genomeOptions, width = NULL, height = NULL, elementId = NULL, displayMode = "squished", tracks = list() )
genomeOptions |
a list with these fields: genomeName, initialLocus, annotation, dataMode, fasta, fastaIndex, stockGenome, validated |
width |
a character string, standard css notations, either e.g., "1000px" or "95%" |
height |
a character string, needs to be an explicit pixel measure, e.g., "800px" |
elementId |
a character string, the html element id within which igv is created |
displayMode |
a character string, default "SQUISHED". |
tracks |
a list of track specifications to be created and displayed at startup |
the created widget
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
This function is called in the ui function of your shiny app
igvShinyOutput(outputId, width = "100%", height = NULL)
igvShinyOutput(outputId, width = "100%", height = NULL)
outputId |
a character string, specifies the html element id |
width |
a character string, standard css notations, either e.g., "1000px" or "95%", "100%" by default |
height |
a character string, needs to be an explicit pixel measure, e.g., "800px", "400px" by default |
the created widget's html
io <- igvShinyOutput("igvOut")
io <- igvShinyOutput("igvOut")
load GenomicAlignments data as an igv.js alignment track
loadBamTrackFromLocalData( session, id, trackName, data, deleteTracksOfSameName = TRUE, displayMode = "EXPANDED" )
loadBamTrackFromLocalData( session, id, trackName, data, deleteTracksOfSameName = TRUE, displayMode = "EXPANDED" )
session |
an environment or list, provided and managed by shiny |
id |
character string, the html element id of this widget instance |
trackName |
character string |
data |
GenomicAlignments object |
deleteTracksOfSameName |
logical, default TRUE |
displayMode |
character string, possible values are "EXPANDED"(default), "SQUISHED" or "COLLAPSED" |
nothing
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
load a remote bam track
loadBamTrackFromURL( session, id, trackName, bamURL, indexURL, deleteTracksOfSameName = TRUE, displayMode = "EXPANDED", showAllBases = FALSE )
loadBamTrackFromURL( session, id, trackName, bamURL, indexURL, deleteTracksOfSameName = TRUE, displayMode = "EXPANDED", showAllBases = FALSE )
session |
an environment or list, provided and managed by shiny |
id |
character string, the html element id of this widget instance |
trackName |
character string |
bamURL |
character string http url for the bam file, typically very large |
indexURL |
character string http url for the bam file index, typically small |
deleteTracksOfSameName |
logical, default TRUE |
displayMode |
character string, possible values are "EXPANDED"(default), "SQUISHED" or "COLLAPSED" |
showAllBases |
logical, show all bases in the alignment, default FALSE |
nothing
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
load a genome annotation track provided as a data.frame
loadBedGraphTrack( session, id, trackName, tbl, color = "gray", trackHeight = 30, autoscale, autoscaleGroup = -1, min = NA_real_, max = NA_real_, deleteTracksOfSameName = TRUE, quiet = TRUE )
loadBedGraphTrack( session, id, trackName, tbl, color = "gray", trackHeight = 30, autoscale, autoscaleGroup = -1, min = NA_real_, max = NA_real_, deleteTracksOfSameName = TRUE, quiet = TRUE )
session |
an environment or list, provided and managed by shiny |
id |
character string, the html element id of this widget instance |
trackName |
character string |
tbl |
data.frame, with at least "chrom" "start" "end" "score" columns |
color |
character string, a legal CSS color, or "random", "gray" by default |
trackHeight |
an integer, 30 (pixels) by default |
autoscale |
logical |
autoscaleGroup |
numeric(1) defaults to -1 |
min |
numeric, consulted when autoscale is FALSE |
max |
numeric, consulted when autoscale is FALSE |
deleteTracksOfSameName |
logical, default TRUE |
quiet |
logical, default TRUE, controls verbosity |
nothing
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
load a bedgraph track provided as a data.frame
loadBedGraphTrackFromURL( session, id, trackName, url, color = "gray", trackHeight = 30, autoscale = TRUE, min = 0, max = 1, autoscaleGroup = -1, deleteTracksOfSameName = TRUE, quiet = TRUE )
loadBedGraphTrackFromURL( session, id, trackName, url, color = "gray", trackHeight = 30, autoscale = TRUE, min = 0, max = 1, autoscaleGroup = -1, deleteTracksOfSameName = TRUE, quiet = TRUE )
session |
an environment or list, provided and managed by shiny |
id |
character string, the html element id of this widget instance |
trackName |
character string |
url |
character |
color |
character string, a legal CSS color, or "random", "gray" by default |
trackHeight |
an integer, 30 (pixels) by default |
autoscale |
logical |
min |
numeric, consulted when autoscale is FALSE |
max |
numeric, consulted when autoscale is FALSE |
autoscaleGroup |
numeric(1) defaults to -1 |
deleteTracksOfSameName |
logical(1) defaults to TRUE |
quiet |
logical, default TRUE, controls verbosity |
nothing
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
load a bed track provided as a data.frame
loadBedTrack( session, id, trackName, tbl, color = "", trackHeight = 50, deleteTracksOfSameName = TRUE, quiet = TRUE )
loadBedTrack( session, id, trackName, tbl, color = "", trackHeight = 50, deleteTracksOfSameName = TRUE, quiet = TRUE )
session |
an environment or list, provided and managed by shiny |
id |
character string, the html element id of this widget instance |
trackName |
character string |
tbl |
data.frame, with at least "chrom" "start" "end" columns |
color |
character string, a legal CSS color, or "random", "gray" by default |
trackHeight |
an integer, 50 (pixels) by default |
deleteTracksOfSameName |
logical, default TRUE |
quiet |
logical, default TRUE, controls verbosity |
nothing
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
load a remote cram track
loadCramTrackFromURL( session, id, trackName, cramURL, indexURL, deleteTracksOfSameName = TRUE )
loadCramTrackFromURL( session, id, trackName, cramURL, indexURL, deleteTracksOfSameName = TRUE )
session |
an environment or list, provided and managed by shiny |
id |
character string, the html element id of this widget instance |
trackName |
character string |
cramURL |
character string http url for the bam file, typically very large |
indexURL |
character string http url for the bam file index, typically small |
deleteTracksOfSameName |
logical, default TRUE |
nothing
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
load a local GFF3 track file
loadGFF3TrackFromLocalData( session, id, trackName, tbl.gff3, color = "gray", colorTable, colorByAttribute, displayMode, trackHeight = 50, visibilityWindow, deleteTracksOfSameName = TRUE )
loadGFF3TrackFromLocalData( session, id, trackName, tbl.gff3, color = "gray", colorTable, colorByAttribute, displayMode, trackHeight = 50, visibilityWindow, deleteTracksOfSameName = TRUE )
session |
an environment or list, provided and managed by shiny |
id |
character string, the html element id of this widget instance |
trackName |
character string |
tbl.gff3 |
data.frame in standard 9-column GFF3 format |
color |
character #RGB or a recognized color name. ignored if colorTable and colorByAttribute provided |
colorTable |
list, mapping a gff3 attribute, typically biotype, to a color |
colorByAttribute |
character, name of a gff3 attribute in column 9, typically "biotype" |
displayMode |
character, "EXPANDED", "SQUISHED" or "COLLAPSED" |
trackHeight |
numeric defaults to 50 |
visibilityWindow |
numeric, Maximum window size in base pairs for which indexed annotations or variants are displayed |
deleteTracksOfSameName |
logical, default TRUE |
nothing
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo-GFF3.R") if (interactive()) { shiny::runApp(demo_app_file) }
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo-GFF3.R") if (interactive()) { shiny::runApp(demo_app_file) }
load a remote GFF3 track
loadGFF3TrackFromURL( session, id, trackName, gff3URL, indexURL, color = "gray", colorTable, colorByAttribute, displayMode, trackHeight = 50, visibilityWindow, deleteTracksOfSameName = TRUE )
loadGFF3TrackFromURL( session, id, trackName, gff3URL, indexURL, color = "gray", colorTable, colorByAttribute, displayMode, trackHeight = 50, visibilityWindow, deleteTracksOfSameName = TRUE )
session |
an environment or list, provided and managed by shiny |
id |
character string, the html element id of this widget instance |
trackName |
character string |
gff3URL |
character string http url for the bam file, typically very large |
indexURL |
character string http url for the bam file index, typically small |
color |
character #RGB or a recognized color name. ignored if colorTable and colorByAttribute provided |
colorTable |
list, mapping a gff3 attribute, typically biotype, to a color |
colorByAttribute |
character, name of a gff3 attribute in column 9, typically "biotype" |
displayMode |
character, "EXPANDED", "SQUISHED" or "COLLAPSED" |
trackHeight |
numeric defaults to 50 |
visibilityWindow |
numeric, Maximum window size in base pairs for which indexed annotations or variants are displayed |
deleteTracksOfSameName |
logical, default TRUE |
nothing
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo-GFF3.R") if (interactive()) { shiny::runApp(demo_app_file) }
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo-GFF3.R") if (interactive()) { shiny::runApp(demo_app_file) }
load a GWAS (genome-wide association study) track provided as a data.frame
loadGwasTrack( session, id, trackName, tbl.gwas, ymin = 0, ymax = 35, deleteTracksOfSameName = TRUE )
loadGwasTrack( session, id, trackName, tbl.gwas, ymin = 0, ymax = 35, deleteTracksOfSameName = TRUE )
session |
an environment or list, provided and managed by shiny |
id |
character string, the html element id of this widget instance |
trackName |
character string |
tbl.gwas |
data.frame, with at least "chrom" "start" "end" columns |
ymin |
numeric defaults to 0 |
ymax |
numeric defaults to 35 |
deleteTracksOfSameName |
logical, default TRUE |
nothing
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
load a SEG track provided as a data.frame. igv "displays segmented data as a blue-to-red heatmap where the data range is -1.5 to 1.5... The segmented data file format is the output of the Circular Binary Segmentation algorithm (Olshen et al., 2004)".
loadSegTrack(session, id, trackName, tbl, deleteTracksOfSameName = TRUE)
loadSegTrack(session, id, trackName, tbl, deleteTracksOfSameName = TRUE)
session |
an environment or list, provided and managed by shiny |
id |
character string, the html element id of this widget instance |
trackName |
character string |
tbl |
data.frame, with at least "chrom" "start" "end" "score" columns |
deleteTracksOfSameName |
logical, default TRUE |
nothing
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
load a VCF (variant) track provided as a Bioconductor VariantAnnotation object
loadVcfTrack(session, id, trackName, vcfData, deleteTracksOfSameName = TRUE)
loadVcfTrack(session, id, trackName, vcfData, deleteTracksOfSameName = TRUE)
session |
an environment or list, provided and managed by shiny |
id |
character string, the html element id of this widget instance |
trackName |
character string |
vcfData |
VariantAnnotation object |
deleteTracksOfSameName |
logical, default TRUE |
nothing
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo-withVCF.R") if (interactive()) { shiny::runApp(demo_app_file) }
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo-withVCF.R") if (interactive()) { shiny::runApp(demo_app_file) }
a helper function for internal use by the igvShiny constructor, but possible also of use to those building an igvShiny app, to test their genome specification for validity
parseAndValidateGenomeSpec( genomeName, initialLocus = "all", stockGenome = TRUE, dataMode = NA, fasta = NA, fastaIndex = NA, genomeAnnotation = NA )
parseAndValidateGenomeSpec( genomeName, initialLocus = "all", stockGenome = TRUE, dataMode = NA, fasta = NA, fastaIndex = NA, genomeAnnotation = NA )
genomeName |
character usually one short code of a supported ("stock") genome (e.g., "hg38") or for a user-supplied custom genome, the name you wish to use |
initialLocus |
character default "all", otherwise "chrN:start-end" or a recognized gene symbol |
stockGenome |
logical default TRUE |
dataMode |
character either "stock", "localFile" or "http" |
fasta |
character when supplying a custom (non-stock) genome, either a file path or a URL |
fastaIndex |
character when supplying a custom (non-stock) genome, either a file path or a URL, essential for all but the very small custom genomes. |
genomeAnnotation |
character when supplying a custom (non-stock) genome, a file path or URL pointing to a genome annotation file in a gff3 format |
an options list directly usable by igvApp.js, and thus igv.js
[get_css_genomes()] for stock genomes we support.
genomeSpec <- parseAndValidateGenomeSpec("hg38", "APOE") # the simplest case base.url <- "https://gladki.pl/igvr/testFiles/sarsGenome" fasta.file <- sprintf("%s/%s", base.url, "Sars_cov_2.ASM985889v3.dna.toplevel.fa") fastaIndex.file <- sprintf("%s/%s", base.url, "Sars_cov_2.ASM985889v3.dna.toplevel.fa.fai") annotation.file <- sprintf("%s/%s", base.url, "Sars_cov_2.ASM985889v3.101.gff3") custom.genome.title <- "SARS-CoV-2" genomeOptions <- parseAndValidateGenomeSpec( genomeName = custom.genome.title, initialLocus = "all", stockGenome = FALSE, dataMode = "http", fasta = fasta.file, fastaIndex = fastaIndex.file, genomeAnnotation = annotation.file )
genomeSpec <- parseAndValidateGenomeSpec("hg38", "APOE") # the simplest case base.url <- "https://gladki.pl/igvr/testFiles/sarsGenome" fasta.file <- sprintf("%s/%s", base.url, "Sars_cov_2.ASM985889v3.dna.toplevel.fa") fastaIndex.file <- sprintf("%s/%s", base.url, "Sars_cov_2.ASM985889v3.dna.toplevel.fa.fai") annotation.file <- sprintf("%s/%s", base.url, "Sars_cov_2.ASM985889v3.101.gff3") custom.genome.title <- "SARS-CoV-2" genomeOptions <- parseAndValidateGenomeSpec( genomeName = custom.genome.title, initialLocus = "all", stockGenome = FALSE, dataMode = "http", fasta = fasta.file, fastaIndex = fastaIndex.file, genomeAnnotation = annotation.file )
delete tracks on the browser
removeTracksByName(session, id, trackNames)
removeTracksByName(session, id, trackNames)
session |
an environment or list, provided and managed by shiny |
id |
character string, the html element id of this widget instance |
trackNames |
a vector of character strings |
nothing
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
remove only those tracks explicitly added by your app. stock tracks (i.e., #' Refseq Genes) remain
removeUserAddedTracks(session, id)
removeUserAddedTracks(session, id)
session |
an environment or list, provided and managed by shiny |
id |
character string, the html element id of this widget instance |
nothing
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
This function is called in the server function of your shiny app
renderIgvShiny(expr, env = parent.frame(), quoted = FALSE)
renderIgvShiny(expr, env = parent.frame(), quoted = FALSE)
expr |
an expression that generates an HTML widget |
env |
the environment in which to evaluate expr |
quoted |
logical flag indicating if expr a quoted expression |
an output or render function that enables the use of the widget within Shiny applications
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
zoom in or out to show the nominated region, by chromosome locus or gene symbol
return the current region displayed by your igv instance
showGenomicRegion(session, id, region) getGenomicRegion(session, id)
showGenomicRegion(session, id, region) getGenomicRegion(session, id)
session |
an environment or list, provided and managed by shiny |
id |
character string, the html element id of this widget instance |
region |
a character string, either e.g. "chr5:92,221,640-92,236,523" or "MEF2C" |
a character string of format "chrom:start-end"
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) } library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }
library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) } library(igvShiny) demo_app_file <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") if (interactive()) { shiny::runApp(demo_app_file) }