IGVsnap: Script generator for Integrative Genomics Viewer (IGV) batch...

View source: R/IGVsnap.R

IGVsnapR Documentation

Script generator for Integrative Genomics Viewer (IGV) batch tasks.

Description

The function builds a script file that can be run on IGV to generate multiple screenshots at specific genomic regions.

Usage

IGVsnap(
  loci_vector,
  input_type,
  biomart = "ensembl",
  dataset = "mmusculus_gene_ensembl",
  reference_genome = NULL,
  fivePrime = 1000,
  threePrime = 1000,
  snap_names = NULL,
  IGV_batch_file = paste(getwd(), "/IGV_batch.txt", sep = ""),
  snap_image_format = "png",
  snap_directory = getwd(),
  maxPanelHeight = 1000,
  delay.interval = 10,
  session = NULL,
  exit = FALSE
)

Arguments

loci_vector

Either a gene name vector (e.g. c("Gapdh", "Spi1", ...)) or a regions vector (eg. c('chr1:253000-256503', ...). All IGV formats are allowed.

input_type

Define the input type. Allowed values are genes and regions.

biomart

Defines the biomart parameter for biomaRt package, by default ensembl.

dataset

Defines the dataset parameter for biomaRt package, by default mmusculus_gene_ensembl.

reference_genome

[optional] Defines the genome to use, e.g. "mm9", "mm10", "hg19", "hg38", ... . By default NULL.

fivePrime

Numeric value to define of how many base-pairs (bp) expand from full gene position at it's 5'-end, default 1000bp.

threePrime

Numeric value to define of how many base-pairs (bp) expand from full gene position at it's 3'-end, default 1000bp.

snap_names

[optional] String vector to define the names of images (without extention), by default uses loci_vector.

IGV_batch_file

String for the batch_script_file_name/path, by default <working_directory>/IGV_batch.txt.

snap_image_format

String to define the format of the images, e.g. "png", "jpeg", "svg", ... . By default png.

snap_directory

String for the output directory for the snapshoots. By default <working_directory>.

maxPanelHeight

Numeric value to define the height in pixel of the IGV pannel that will be captured on IGV. By default 1000.

delay.interval

Sets a delay (sleep) time in milliseconds. The sleep interval is invoked between successive commands. By default 10. helps to give the time to IGV to adapt the view before the snap (such as the autoscale).

session

[optional] FULL path to an IGV session file (session.xml) to use for the images. By default NULL.

exit

Logical value to indicate whether exit IGV after image capture ended. By default FALSE.

Details

To run the script on IGV: Tools > Run Batch Script... > choose the .txt output file from this function.
For more info on how batch tasks work on IGV see:
https://software.broadinstitute.org/software/igv/PortCommands.

Value

Exports a .txt file ready-to-use on IGV.


sebastian-gregoricchio/Rseb documentation built on May 15, 2024, 5:45 a.m.