Main Content

genomicsViewer

Open and add files to Genomics Viewer app programmatically

Since R2024a

Description

genomicsViewer opens the Genomics Viewer app and lets you add a reference sequence and other genomics data as tracks to the app from the command line. The Genomics Viewer app allows you to view and explore the data using an embedded version of the Integrative Genomics Viewer (IGV) [1][2].

Creation

Description

gv = genomicsViewer opens a new instance of the Genomics Viewer app and returns gv, a genomicsViewer object. When you call genomicsViewer without specifying a reference sequence, the app uses Human (GRCh38/hg38) as the reference sequence by default. If you are offline, you must specify a local file to use as the reference by setting the ReferenceFile name-value argument.

example

gv = genomicsViewer(Name=Value) specifies additional options using one or more name-value arguments. For example, use the ReferenceFile name-value argument to specify a reference sequence.

Input Arguments

expand all

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: gv = genomicsViewer(ReferenceFile="chr24.fasta") opens the specified FASTA file in the app.

Name of a reference sequence file, specified as a character vector or string scalar. Specify a local FASTA-formatted file or a URL to a remote file. If you specify a URL, it must start with http, https, or gs. Other file transfer protocols, such as FTP, are not supported.

Data Types: char | string

Name of a cytoband ideogram file for reference chromosomes, specified as a character vector or string scalar. Specify a local file or a URL to a remote file. If you specify a URL, it must start with http, https, or gs. Other file transfer protocols, such as FTP, are not supported. For more information on cytoband files, see cytobandread and chromosomeplot.

If you specify a cytoband file, you must also specify a reference sequence file using the ReferenceFile name-value argument.

Data Types: char | string

Names of aligned genomic data files, specified as a character vector, string scalar, string vector, or cell array of character vectors. You can specify a list of filenames or URLs.

If you specify a URL, it must start with http, https, or gs. Other file transfer protocols, such as FTP, are not supported.

For a list of supported data file formats, see https://igv.org/doc/desktop/#FileFormats/DataTracks/.

Data Types: char | string

Object Functions

addTracksAdd tracks to Genomics Viewer
setReferenceSpecify reference sequence for Genomics Viewer
closeClose Genomics Viewer app

Examples

collapse all

This example requires an internet connection.

Open a new instance of the Genomics Viewer app. Specify to use Human (GRCh38/hg38) as the reference sequence and the corresponding cytoband ideogram file.

gv = genomicsViewer(ReferenceFile="https://s3.amazonaws.com/igv.broadinstitute.org/genomes/seq/hg38/hg38.fa",...
                    CytoBand="https://s3.amazonaws.com/igv.org.genomes/hg38/annotations/cytoBandIdeo.txt.gz");

Alternatively, you can use the setReference function to specify the reference sequence and the cytoband file.

In the IGV panel, click Chromosome 10 to zoom in on it.

The IGV panel is updated as follows.

Add the Refseq genes as the annotation file.

addTracks(gv,"https://s3.amazonaws.com/igv.org.genomes/hg38/refGene.sorted.txt.gz");

Load a low coverage alignment data. The sample ID is NA18564 and the sample has been identified with the CYP2C19*3 mutation.

addTracks(gv,"https://s3.amazonaws.com/1000genomes/data/NA18564/alignment/NA18564.alt_bwamem_GRCh38DH.20150718.CHB.low_coverage.cram");

To center the alignment data around the location of the mutation on the CYP2C19 gene, enter chr10:94,780,635-94,780,673 in the search text box.

To show the bases on track2, click the gear icon and select Show all bases.

The IGV panel is updated as follows.

For additional information on other interactive visualization options, see Visualize NGS Data Using Genomics Viewer App.

Close the app.

close(gv);

References

[1] Robinson, J., H. Thorvaldsdóttir, W. Winckler, M. Guttman, E. Lander, G. Getz, J. Mesirov. 2011. Integrative Genomics Viewer. Nature Biotechnology. 29:24–26.

[2] Thorvaldsdóttir, H., J. Robinson, J. Mesirov. 2013. Integrative Genomics Viewer (IGV): High-performance genomics data visualization and exploration. Briefings in Bioinformatics. 14:178–192.

Version History

Introduced in R2024a