Main Content

chromosomeplot

Plot chromosome ideogram with G-banding pattern

Syntax

chromosomeplot(CytoData)
chromosomeplot(CytoData, ChromNum)
chromosomeplot(CytoData, ChromNum, ...,'Orientation', OrientationValue, ...)
chromosomeplot(CytoData, ChromNum, ...,'ShowBandLabel', ShowBandLabelValue, ...)
chromosomeplot(CytoData, ChromNum, ...,'AddToPlot', AddToPlotValue, ...)
chromosomeplot(..., 'Unit', UnitValue, ...)
chromosomeplot(..., 'CNV', CNVValue, ...)

Arguments

CytoDataEither of the following:
  • Character vector or string specifying a file containing cytogenetic G-banding data (in bp units), such as an NCBI ideogram text file or a UCSC Genome Browser cytoband text file.

  • Structure containing cytogenetic G-banding data (in bp units) in the following fields:

    • ChromLabels

    • BandStartBPs

    • BandEndBPs

    • BandLabels

    • GieStains

Tip

Use the cytobandread function to create the structure to use for CytoData.

ChromNumScalar or character vector or string specifying a single chromosome to plot. Valid entries are integers, 'X', and 'Y'.

Note

Setting ChromNum to 0 will plot ideograms for all chromosomes.

OrientationValueCharacter vector or string or number that specifies the orientation of the ideogram of a single chromosome specified by ChromNum. Choices are 'Vertical' or 1 (default) and 'Horizontal' or 2.
ShowBandLabelValueControls the display of band labels (such as q25.3) when plotting a single chromosome ideogram, specified by ChromNum. Choices are true (default) or false.
AddToPlotValueVariable name of a figure axis to which to add the single chromosome ideogram, specified by ChromNum.

Note

If you use this property to add the ideogram to a plot of genomic data that is in units other than bp, use the 'Unit' property to convert the ideogram data to the appropriate units.

Tip

Before printing a figure containing an added chromosome ideogram, change the background to white by issuing the following command:

set(gcf,'color','w') 
UnitValueInteger that specifies the units (base pairs, kilo base pairs, or mega base pairs) for the starting and ending genomic positions. This unit is used in the data tip displayed when you hover the cursor over chromosomes in the ideogram. This unit can also be used when using the 'AddToPlot' property to add the ideogram to a plot that is in units other than bp. Choices are 1 (bp), 2 (kb), or 3 (mb). Default is 1 (bp).
CNVValueControls the display of copy number variance (CNV) data, provided by CNVValue, aligned to the chromosome ideogram. Gains are shown in green to the right or above the ideogram, while losses are shown in red to the left or below the ideogram. CNVValue is a structure array containing the four fields described in the table below.

Description

chromosomeplot(CytoData) plots the ideogram of all chromosomes, using information from CytoData, a structure containing cytogenetic G-banding data (in bp units), or a character vector or string specifying a file containing cytogenetic G-banding data (in bp units), such as an NCBI ideogram text file or a UCSC Genome Browser cytoband text file. The G bands distinguish different areas of the chromosome. For example, for the Homo sapiens ideogram, possible G bands are:

  • gneg — white

  • gpos25 — light gray

  • gpos50 — medium gray

  • gpos75 — dark gray

  • gpos100 — black

  • acen — red (centromere)

  • stalk — indented region (region with repeats)

  • gvar — light blue

Darker bands are AT-rich, while lighter bands are GC-rich.

chromosomeplot(CytoData, ChromNum) plots the ideogram of a single chromosome specified by ChromNum.

chromosomeplot(..., 'PropertyName', PropertyValue, ...) calls chromosomeplot with optional properties that use property name/property value pairs. You can specify one or more properties in any order. Each PropertyName must be enclosed in single quotation marks and is case insensitive. These property name/property value pairs are as follows:

chromosomeplot(CytoData, ChromNum, ...,'Orientation', OrientationValue, ...) specifies the orientation of the ideogram of a single chromosome specified by ChromNum. Choices are 'Vertical' or 1 (default) and 'Horizontal' or 2.

Note

When plotting the ideogram of all chromosomes, the orientation is always vertical.

chromosomeplot(CytoData, ChromNum, ...,'ShowBandLabel', ShowBandLabelValue, ...) displays band labels (such as q25.3) when plotting a single chromosome ideogram, specified by ChromNum. Choices are true (default) or false.

chromosomeplot(CytoData, ChromNum, ...,'AddToPlot', AddToPlotValue, ...) adds the single chromosome ideogram, specified by ChromNum, to a figure axis specified by AddToPlotValue.

Note

If you use this property to add the ideogram to a plot of genomic data that is in units other than bp, use the 'Unit' property to convert the ideogram data to the appropriate units.

Tip

Before printing a figure containing an added chromosome ideogram, change the background to white by issuing the following command:

set(gcf,'color','w') 

chromosomeplot(..., 'Unit', UnitValue, ...) specifies the units (base pairs, kilo base pairs, or mega base pairs) for the starting and ending genomic positions. This unit is used in the data tip displayed when you hover the cursor over chromosomes in the ideogram. This unit can also be used when using the 'AddToPlot' property to add the ideogram to a plot that is in units other than bp. Choices are 1 (bp), 2 (kb), or 3 (mb). Default is 1 (bp).

chromosomeplot(..., 'CNV', CNVValue, ...) displays copy number variance (CNV) data, provided by CNVValue, aligned to the chromosome ideogram. Gains are shown in green to the right or above the ideogram, while losses are shown in red to the left or below the ideogram. CNVValue is a structure array containing the following fields. Each field must contain the same number of elements.

FieldDescription
Chromosome

Either of the following:

  • Numeric vector containing the chromosome number on which each CNV is located.

    Note

    For the sex chromosome, X, use N, where N = number of autosomes + 1. For the sex chromosome, Y, use M, where M = number of autosomes + 2. For example, for Homo sapiens use 23 for X and 24 for Y, and for Mus musculus (lab mouse), use 20 for X and 21 for Y.

  • Character array containing the chromosome number on which each CNV is located.

    Note

    Using a character array lets you use the characters X and Y (instead of numbers) for sex chromosomes. However, all elements in the array must be the same width, which may require you to add spaces to some character vectors. For example:

    [' 1'; ' 2'; '10'; ' X']

    Or you can use the char function with a cell array to create a character array of the chromosome numbers and letters. For example:

    char({'1', '2', '10', 'X'})

CNVType

Numeric vector containing the type of each CNV, either 1 (loss) or 2 (gain).

Start

Numeric vector containing the starting genomic position of each CNV. Units must be in base pairs.

End

Numeric vector containing the ending genomic position of each CNV. Units must be in base pairs.

Examples

collapse all

Read the cytogenetic banding information for Homo sapiens into a structure.

hs_cytobands = cytobandread('hs_cytoBand.txt')
hs_cytobands = struct with fields:
     ChromLabels: {862x1 cell}
    BandStartBPs: [862x1 int32]
      BandEndBPs: [862x1 int32]
      BandLabels: {862x1 cell}
       GieStains: {862x1 cell}

Plot the entire chromosome ideogram.

chromosomeplot(hs_cytobands);
title('Human Karyogram')

Figure contains an axes object. The hidden axes object with title Human Karyogram contains 1088 objects of type patch, line, text.

You can display the ideogram of a specific chromosome by right-clicking it in the plot, then selecting Display in New Figure > Vertical or Horizontal.

You can also programmatically display the ideogram of a specific chromosome, set the orientation, and the units used in the data tip to kilo base pairs.

chromosomeplot(hs_cytobands, 15, 'Orientation', 2, 'Unit', 2);

Figure contains an axes object. The hidden axes object contains 107 objects of type patch, line, text.

Hover over the chromosome to view a data tip. To get more information about a specific band, select the Data Cursor button on the toolbar and click the band in the plot. Use the context menu (right-click) to see more options such as deleting or creating a data tip.

Load the array-based CGH (aCGH) data from the Coriell cell line study (Snijders, A. et al., 2001).

load coriell_baccgh

Use the cghcbs function to analyze chromosome 10 of sample 3 (GM05296) of the aCGH data and return copy number variance (CNV) data in a structure, S. Plot the segment means over the original data for only chromosome 10 of sample 3.

S = cghcbs(coriell_data,'sampleindex',3,'chromosome',10,...
           'showplot',10);
Analyzing: GM05296. Current chromosome 10

Figure contains an axes object. The axes object with title GM05296 - Chr 10, xlabel Genomic Position, ylabel Log2(Ratio) contains 4 objects of type line. One or more of the lines displays its values using only markers

Use the chromosomeplot function with the 'addtoplot' option to add the ideogram of chromosome 10 for Homo sapiens to the plot. Because the plot of the CNV data from the Coriell cell line study is in kb units, use the 'Unit' property to convert the ideogram data to kb units.

set(gcf,'color','w'); % Set the background of the figure to white.
chromosomeplot('hs_cytoBand.txt', 10, 'addtoplot', gca,...
               'Unit', 2);

Figure contains 2 axes objects. Axes object 1 with title GM05296 - Chr 10, xlabel Genomic Position, ylabel Log2(Ratio) contains 4 objects of type line. One or more of the lines displays its values using only markers Hidden axes object 2 contains 134 objects of type patch, line, text.

References

[1] Snijders, A.M., Nowak, N., Segraves, R., Blackwood, S., Brown, N., Conroy, J., Hamilton, G., Hindle, A.K., Huey, B., Kimura, K., Law, S., Myambo, K., Palmer, J., Ylstra, B., Yue, J.P., Gray, J.W., Jain, A.N., Pinkel, D., and Albertson, D.G. (2001). Assembly of microarrays for genome-wide measurement of DNA copy number. Nature Genetics 29, 263–264.

Version History

Introduced in R2007b