sequence logos (序列logo图)

Sequence logos for MATLAB

You are now following this Submission

Basic usage
S = {'ATTATAGCAAACTA';
'AACATGCCAAAGTA';
'ATCATGCAAAAGGA'};
% S = ['ATTATAGCAAACTA';
% 'AACATGCCAAAGTA';
% 'ATCATGCAAAAGGA'];
figure()
% Default: 'Bits' method, 'NT' type, small-sample correction enabled('SSC','on').
seqLogo(S)
figure()
% Disable small-sample correction.
seqLogo(S, 'SSC','off')
figure()
% 'Prob'(Probability) method
seqLogo(S, 'Method', 'Prob')
figure()
% 'Prob' (Probability) method,
% with sequence positions restricted to the range of 2 to 6
seqLogo(S, 'Method', 'Prob', 'Range',[2,6])
Amino acid type
S = readcell("seqlogo_protein_3.txt");
figure()
% 'Bits' method, 'AA' type, disable small-sample correction
seqLogo(S, 'Type','AA', 'SSC','off')
figure()
% 'Prob' method, 'AA' type, disable small-sample correction
seqLogo(S, 'Type','AA', 'SSC','off', 'Method','Prob')
Change color for nucleotide type
S = readcell("seqlogo_DNA.txt");
Color = {'C',[205,255,101]./255, 'A',[104,101,255]./255, 'TU',[164,230,101]./255, 'G',[104,203,254]./255};
% Color = {'C',[127,91,93]./255, 'A',[187,128,110]./255, 'TU',[197,173,143]./255, 'G',[59,71,111]./255};
figure()
seqLogo(S, 'Color',Color)
figure()
seqLogo(S, 'Method','Prob', 'Color',Color)
Change color for amino acid type
S = readcell("seqlogo_protein_3.txt");
Color = {'CDEFH',[205,255,101]./255, 'AIKLM',[104,101,255]./255, 'TUNPQR',[164,230,101]./255, 'GSVWY',[104,203,254]./255};
% Color = {'CDEFH',[127,91,93]./255, 'AIKLM',[187,128,110]./255, 'TUNPQR',[197,173,143]./255, 'GSVWY',[59,71,111]./255};
figure()
seqLogo(S, 'Color',Color, 'Type','AA')
figure()
seqLogo(S, 'Method','Prob', 'Color',Color, 'Type','AA')

Cite As

Zhaoxu Liu / slandarer (2026). sequence logos (序列logo图) (https://se.mathworks.com/matlabcentral/fileexchange/123060-sequence-logos-logo), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
2.0.1

Change cover.

2.0.0

small-sample correction enabled('SSC','on')

1.0.0