Hauptinhalt

ntdensity

Plot density of nucleotides along sequence

    Description

    ntdensity(SeqNT) plots the density of nucleotides A, C, G, and T in sequence SeqNT.

    example

    Density = ntdensity(SeqNT) returns a MATLAB® structure with the density of nucleotides A, C, G, and T.

    ntdensity(SeqNT,Window=WindowValue) and Density = ntdensity(SeqNT,Window=WindowValue) uses a window of length WindowValue for the density calculation.

    [Density,HighCG] = ntdensity(___,CGThreshold=CGThresholdValue) returns indices for regions where the CG content of SeqNT is greater than CGThresholdValue.

    Examples

    collapse all

    Create a random character vector to represent a nucleotide sequence.

    s = randseq(1000,alphabet="dna"); 

    Plot the density of nucleotides along the sequence.

    ntdensity(s)

    Figure contains 2 axes objects. Axes object 1 with title Nucleotide density contains 4 objects of type line. These objects represent A, C, G, T. Axes object 2 with title A-T C-G density contains 2 objects of type line. These objects represent A-T, C-G.

    Input Arguments

    collapse all

    Nucleotide sequence, specified as one of these values:

    Note

    Although you can submit a sequence with nucleotides other than A, C, G, and T, ntdensity plots only A, C, G, and T.

    Data Types: double | char | string | struct

    Window length for the density calculation, specified as a positive number.

    Data Types: double

    Threshold for CG content of SeqNT, specified as a positive number. When you use this argument, ntdensity returns indices for regions where the CG content of SeqNT is greater than CGThresholdValue.

    Data Types: double

    Output Arguments

    collapse all

    Density of nucleotides A, C, G, and T, returned as a structure array.

    Indices for regions with high CG content, returned as a row vector. The ntdensity function returns indices for regions where the CG content of SeqNT is greater than CGThresholdValue.

    Version History

    Introduced before R2006a