seqdisp

Format long sequence output for easy viewing

Syntax

seqdisp(Seq, 'PropertyName', PropertyValue ...)

seqdisp(..., 'Row', RowValue)
seqdisp(..., 'Column', ColumnValue)
seqdisp(..., 'ShowNumbers', ShownumbersValue)

Arguments

Seq

Nucleotide or amino acid sequence. Enter a character array, a FASTA filename, or a MATLAB structure with the field Sequence. Multiply aligned sequences are allowed.

FASTA files can have the file extension fa, fasta, fas, fsa, or fst.

RowProperty to select the length of each row. Enter an integer. The default length is 60.
ColumnProperty to select the column width or number of symbols before displaying a space. Enter an integer. The default column width is 10.
ShowNumbersProperty to control displaying numbers at the start of each row. Enter either true or false. The default value is true to show numbers.

Description

seqdisp(Seq, 'PropertyName', PropertyValue ...) displays a sequence (Seq) in rows with a default row length of 60 and a default column width of 10.

seqdisp(..., 'Row', RowValue) specifies the length of each row for the displayed sequence.

seqdisp(..., 'Column', ColumnValue) specifies the number of letters to display before adding a space. Row must be larger than and evenly divisible by Column.

seqdisp(..., 'ShowNumbers', ShowNumbersValue) when ShowNumbers is false, turns off the position numbers at the start of each row off.

Examples

Read sequence information from the GenBank database. Display the sequence in rows with 50 letters, and within a row, separate every 10 letters with a space.

mouseHEXA = getgenbank('AK080777');
seqdisp(mouseHEXA, 'Row', 50, 'Column', 10)

Create and save a FASTA file with two sequences, and then display it.

hdr = ['Sequence A'; 'Sequence B'];
seq = ['TAGCTGRCCAAGGCCAAGCGAGCTTN';'ATCGACYGGTTCCGGTTCGCTCGAAN']
fastawrite('local.fa', hdr, seq);
seqdisp('local.fa', 'ShowNumbers', false')

ans =
>Sequence A
 1  TAGCTGRCCA AGGCCAAGCG AGCTTN
>Sequence B
 1  ATCGACYGGT TCCGGTTCGC TCGAAN

See Also

Bioinformatics Toolbox function getgenbank


© 1994-2005 The MathWorks, Inc.