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,Name=Value) specifies options using one or more name-value arguments. For example, to use a cytoband file, set CytoBand to the name of the file.

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-Value Arguments

collapse all

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: setReference(gv,referenceFile,CytoBand="cytoBandIdeo.txt.gz") specifies a cytoband file.

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

Since R2026a

Name of the index file for the reference sequence, specified as a string scalar, character vector, or []. You can specify a local file or a URL to a remote file.

By default, the value is the original reference filename appended with the corresponding index file extension. For example, if the original filename is hg38.fa, then the value is hg38.fa.fai.

If the value is [], the function treats the reference file as if it is not indexed.

Data Types: char | string

Version History

Introduced in R2024a

expand all