Compute Position Weight Matrix, display SequenceLogo freq
Version 1.0.0.1 (96.8 KB) by
Michael Chan
Illustrates computation of best match scoring with PWM and constructs sequence logo.
main executing reference usage: operationMain.m
---------------------------------------------------------------
main executing reference usage: usage_PWM.m
[Demo 1]: PWM (Position Weight Matrix) and Information Content
usage_PWM.m
The objective is to compute the PWM, and report the consensus.
Sample output:
---------------------------------------------
String index:ssss 1ssss 2ssss 3ssss 4ssss 5ssss 6ssss 7
---------------------------------------------
C :ssssssss 0.00ss 0.10ss 0.05ss 0.10ss 0.00ss 0.05ss 0.90
T :ssssssss 0.10ss 0.85ss 0.05ss 0.80ss 0.80ss 0.00ss 0.05
A :ssssssss 0.05ss 0.00ss 0.00ss 0.05ss 0.20ss 0.05ss 0.05
G :ssssssss 0.85ss 0.05ss 0.90ss 0.05ss 0.00ss 0.90ss 0.00
---------------------------------------------
H :ssssssss 0.75ss 0.75ss 0.57ss 1.02ss 0.72ss 0.57ss 0.57
---------------------------------------------
I :ssssssss 1.25ss 1.25ss 1.43ss 0.98ss 1.28ss 1.43ss 1.43
---------------------------------------------
Total I :ssssssss 9.05
---------------------------------------------
Mean I :ssssssss 1.29
---------------------------------------------
The consensus is GTGTTGC.
Note:
ssThe sequencelogo feature does not use the bioinformatics toolbox.
Caveat: The y-axis of the sequencelogo is in terms of frequency. It is not perfect, but it serves as a basic visual guide in the absence of having the seqlogo inbuilt.
---------------------------------------------------------------------------------
main executing reference usage: usage_computeProbabilityOfSequenceGivenPWM.m
[Demo 2]: Best Matches on PWM
usage_computeProbabilityOfSequenceGivenPWM.m
The objective is to illustrate Best Matches on PWM with determination of locations.
* To verify results, save results in targetFile and run usage_PWM.m with
targetFile = 'inputFromBestMatchFromDemo2.txt';
---------------------------------------------------------------------------------
* Caveat: For educational reference only.
If the reference demo has a more elegant presentation, please do not hesitate to suggest and send feedback to author.
Thank you.
Regards,
Michael Chan JT
Cite As
Michael Chan (2025). Compute Position Weight Matrix, display SequenceLogo freq (https://uk.mathworks.com/matlabcentral/fileexchange/29363-compute-position-weight-matrix-display-sequencelogo-freq), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2010a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Biological and Health Sciences in Help Center and MATLAB Answers
Tags
Communities
More Files in the Power Electronics Control Community
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.