Main Content

featureview

Draw linear or circular map of features from GenBank structure

Syntax

featureview(GBStructure)
featureview(GBStructure, FeatList)
featureview(GBStructure, FeatList, Levels)
featureview(GBStructure, Levels)
[Handles, OutFeatList] = featureview(...)
featureview(..., 'FontSize', FontSizeValue, ...)
featureview(..., 'ColorMap', ColorMapValue, ...)
featureview(..., 'Qualifiers', QualifiersValue, ...)
featureview(..., 'ShowPositions', ShowPositionsValue, ...)

Arguments

GBStructure

GenBank® structure, typically created using the getgenbank or the genbankread function.

FeatList

String vector or cell array of character vectors specifying feature names (from the list of all features in the GenBank structure) to include in or exclude from the map.

  • If FeatList is a string vector or cell array of character vectors containing feature names, these features are mapped. Any features in FeatList not found in the GenBank structure are ignored.

  • If FeatList includes '-' as the first element in the cell array or string vector, then the remaining strings (features) are not mapped.

By default, FeatList is the a list of all features in the GenBank structure.

Levels

Vector of N integers, where N is the number of features. Each integer represents the level in the map for the corresponding feature. For example, if Levels = [1, 1, 2, 3, 3], the first two features would appear on level 1, the third feature on level 2, and the fourth and fifth features on level 3. By default, Levels = [1:N].

FontSizeValue

Scalar that sets the font size (points) for the annotations of the features. Default is 9.

ColorMapValue

Three-column matrix, to specify a list of colors to use for each feature. This matrix replaces the default matrix, which specifies the following colors and order: blue, green, red, cyan, magenta, yellow, brown, light green, orange, purple, gold, and silver. In the matrix, each row corresponds to a color, and each column specifies red, green, and blue intensity respectively. Valid values for the RGB intensities are 0.0 to 1.0.

QualifiersValue

Cell array of character vectors or string vector to specify an ordered list of qualifiers to search for in the structure and use as annotations. For each feature, the first matching qualifier found from the list is used for its annotation. If a feature does not include any of the qualifiers, no annotation displays for that feature. By default, QualifiersValue = {'gene', 'product', 'locus_tag', 'note', 'db_xref', 'protein_id'}. Provide your own QualifiersValue to limit or expand the list of qualifiers or change the search order.

Tip

Set QualifiersValue = {} to create a map with no annotations.

Tip

To determine all qualifiers available for a given feature, do either of the following:

  • Create the map, and then click a feature or its annotation to list all qualifiers for that feature.

  • Use the featureparse command to parse all the features into a new structure, and then use the fieldnames command to list the qualifiers for a specific feature.

ShowPositionsValue

Property to add the sequence position to the annotation label for each feature. Enter true to add the sequence position. Default is false.

Description

featureview(GBStructure) creates a linear or circular map of all features from a GenBank structure, typically created using the getgenbank or the genbankread function.

featureview(GBStructure, FeatList) creates a linear or circular map of a subset of features from a GenBank structure. FeatList lets you specify features (from the list of all features in the GenBank structure) to include in or exclude from the map.

  • If FeatList is a cell array of features, these features are mapped. Any features in FeatList not found in the GenBank structure are ignored.

  • If FeatList includes '-' as the first string in the cell array, then the remaining strings (features) are not mapped.

By default, FeatList is a list of all features in the GenBank structure.

featureview(GBStructure, FeatList, Levels) or featureview(GBStructure, Levels) indicates which level on the map each feature is drawn. Level 1 is the left-most (linear map) or inner-most (circular map) level, and level N is the right-most (linear map) or outer-most (circular map) level, where N is the number of features.

Levels is a vector of N integers, where N is the number of features. Each integer represents the level in the map for the corresponding feature. For example, if Levels = [1, 1, 2, 3, 3], the first two features would appear on level 1, the third feature on level 2, and the fourth and fifth features on level 3. By default, Levels = [1:N].

[Handles, OutFeatList] = featureview(...) returns a list of handles for each feature in OutFeatList. It also returns OutFeatList, which is a cell array of the mapped features.

Tip

Use Handles and OutFeatList with the legend command to create a legend of features.

featureview(..., 'PropertyName', PropertyValue, ...) defines optional properties that use property name/value pairs in any order. These property name/value pairs are as follows:

featureview(..., 'FontSize', FontSizeValue, ...) sets the font size (points) for the annotations of the features. Default FontSizeValue is 9.

featureview(..., 'ColorMap', ColorMapValue, ...) specifies a list of colors to use for each feature. This matrix replaces the default matrix, which specifies the following colors and order: blue, green, red, cyan, magenta, yellow, brown, light green, orange, purple, gold, and silver. ColorMapValue is a three-column matrix, where each row corresponds to a color, and each column specifies red, green, and blue intensity respectively. Valid values for the RGB intensities are 0.0 to 1.0.

featureview(..., 'Qualifiers', QualifiersValue, ...) lets you specify an ordered list of qualifiers to search for and use as annotations. For each feature, the first matching qualifier found from the list is used for its annotation. If a feature does not include any of the qualifiers, no annotation displays for that feature. QualifiersValue is a cell array of character vectors or string vector. By default, QualifiersValue = {'gene', 'product', 'locus_tag', 'note', 'db_xref', 'protein_id'}. Provide your own QualifiersValue to limit or expand the list of qualifiers or change the search order.

Tip

Set QualifiersValue = {} to create a map with no annotations.

Tip

To determine all qualifiers available for a given feature, do either of the following:

  • Create the map, and then click a feature or its annotation to list all qualifiers for that feature.

  • Use the featureparse command to parse all the features into a new structure, and then use the fieldnames command to list the qualifiers for a specific feature.

featureview(..., 'ShowPositions', ShowPositionsValue, ...) lets you add the sequence position to the annotation label. If ShowPositionsValue is true, sequence positions are added to the annotation labels. Default is false.

After creating a map:

  • Click a feature or annotation to display a list of all qualifiers for that feature.

  • Zoom the plot by clicking the following buttons:

    or

Examples

Example 9. Creating a Circular Map with a Legend

The following example creates a circular map of five different features mapped on three levels. It also uses outputs from the featureview function as inputs to the legend function to add a legend to the map.

GBStructure = getgenbank('J01415');
[Handles, OutFeatList] = featureview(GBStructure, ...
     {'CDS','D_loop','mRNA','tRNA','rRNA'}, [1 2 2 2 3])
legend(Handles, OutFeatList, 'interpreter', 'none', ...
     'location','bestoutside')
title('Human Mitochondrion, Complete Genome')

Example 10. Creating a Linear Map with Sequence Position Labels and Changed Font Size

The following example creates a linear map showing only the gene feature. It changes the font of the labels to seven points and includes the sequence position in the labels.

herpes = getgenbank('NC_001348');
featureview(herpes,{'gene'},'fontsize',7,'showpositions',true)
title('Genes in Human herpesvirus 3 (strain Dumas)')

Example 11. Determining Qualifiers for a Specific Feature

The following example uses the getgenbank function to create a GenBank structure, GBStructure. It then uses the featureparse function to parse the features in the GenBank structure into a new structure, features. It then uses the fieldnames function to return all qualifiers for one of the features, D_loop.

GenBankStructure = getgenbank('J01415');
features = featureparse (GenBankStructure)
features = 

         source: [1x1 struct]
         D_loop: [1x2 struct]
     rep_origin: [1x3 struct]
    repeat_unit: [1x4 struct]
    misc_signal: [1x1 struct]
       misc_RNA: [1x1 struct]
      variation: [1x17 struct]
           tRNA: [1x22 struct]
           rRNA: [1x2 struct]
           mRNA: [1x10 struct]
            CDS: [1x13 struct]
       conflict: [1x1 struct]

fieldnames(features.D_loop)

ans = 

    'Location'
    'Indices'
    'note'
    'citation' 

Version History

Introduced in R2006b