Main Content

setReference

Specify reference sequence for Genomics Viewer

Since R2024a

Description

setReference(gv,referenceFile) specifies referenceFile, a file containing the reference sequence for use in the Genomics Viewer app specified by the genomicsViewer object gv.

setReference(gv,referenceFile,Cytoband=cytobandFile) also specifies the corresponding cytoband ideogram file for the reference chromosomes.

example

Examples

collapse all

This example requires an internet connection.

Open the Genomics Viewer app. By default, the app uses the human genome (GRCh38/hg38) as the reference sequence.

gv = genomicsViewer;

Change the reference sequence to the mouse genome (GRCm39/mm39) and specify the corresponding cytoband file.

setReference(gv,"https://s3.amazonaws.com/igv.org.genomes/mm39/mm39.fa",...
                Cytoband="https://hgdownload.soe.ucsc.edu/goldenPath/mm39/database/cytoBandIdeo.txt.gz");

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

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

Close the app.

close(gv);

Input Arguments

collapse all

Genomics viewer object, specified as a genomicsViewer object.

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.

Data Types: char | string | cell

Version History

Introduced in R2024a