IGVsession | R Documentation |
This function will create an IGV session file
IGVsession(files, sessionFile, genome='hg18', VisibleAttribute='', destdir=getwd())
files |
Character vector of one or more filenames or urls to load - required. |
sessionFile |
String representing session file name - required |
genome |
String representing a genome that IGV knows about. |
VisibleAttribute |
Character vector of one or more IGV Visible Attributes to annotate data tracks to be loaded - optional. |
destdir |
Path where to save the IGV session file. |
While the current state of an IGV session can be saved to a named session file that can be opened to restore the IGV session later on, a IGV session file can be manually or programmatically created to achieve more efficient data loading and better control of IGV. IGVsession function was developed to create such IGV session files. For details please check IGV web site: http://www.broadinstitute.org/igv/ControlIGV
An IGV session file with full file path.
Jack Zhu <zhujack@mail.nih.gov>
IGVload
, IGVgenome
, IGVgoto
library(SRAdb) exampleBams = file.path(system.file('extdata',package='SRAdb'), dir(system.file('extdata',package='SRAdb'),pattern='bam$')) exampleSessionFile <- IGVsession(exampleBams, 'exampleBams.xml'); ## Not run: ## Start IGV within R. You only need one IGV instance with listen port 60151 open. startIGV() ## Create a socket connection to IGV sock <- IGVsocket() ## Wait until IGV fully launched and make sure the listen port for IGV is open (If not configured in IGV, follow these steops: IGV --> Perferences --> Advanced --> Check the checkbox 'Enable port' 60151.) IGVload(sock, exampleSessionFile) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.