Learn R Programming

SRAdb (version 1.30.0)

IGVsession: Create an IGV session file

Description

This function will create an IGV session file

Usage

IGVsession(files, sessionFile, genome='hg18', VisibleAttribute='', destdir=getwd())

Arguments

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.

Value

An IGV session file with full file path.

Details

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

See Also

IGVload, IGVgenome, IGVgoto

Examples

Run this code
	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)

Run the code above in your browser using DataLab