featuresmap

Draw linear or circular map of features from GenBank structure

Syntax

featuresmap(GBStructure)
featuresmap(GBStructure, FeatList)
featuresmap(GBStructure, FeatList, Levels)
featuresmap(GBStructure, Levels)
[Handles, OutFeatList] = featuresmap(...)

featuresmap(..., 'FontSize', FontSizeValue, ...)
featuresmap(..., 'ColorMap', ColorMapValue, ...)
featuresmap(..., 'Qualifiers', QualifiersValue, ...)
featuresmap(..., 'ShowPositions', ShowPositionsValue, ...)

Arguments

GBStructure

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

FeatList

Cell array of 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 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 strings 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 featuresparse command to parse all the features into a new structure, and then use the fieldnames command to list the qualifiers for a specific feature. See Determining 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

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

featuresmap(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.

featuresmap(GBStructure, FeatList, Levels) or featuresmap(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] = featuresmap(...) 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.

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


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

featuresmap(..., '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.

featuresmap(..., '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 strings. 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 featuresparse command to parse all the features into a new structure, and then use the fieldnames command to list the qualifiers for a specific feature. See Determining Qualifiers for a Specific Feature.

featuresmap(..., '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

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 featuresmap function as inputs to the legend function to add a legend to the map.

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

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');
featuresmap(herpes,{'gene'},'fontsize',7,'showpositions',true)
title('Genes in Human herpesvirus 3 (strain Dumas)')

Determining Qualifiers for a Specific Feature

The following example uses the getgenbank function to create a GenBank structure, GBStructure. It then uses the featuresparse 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 = featuresparse (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' 
Was this topic helpful?