Compute Position Weight Matrix (PWM) and display SequenceLogo in terms of frequency

Illustrates computation of best match scoring with PWM and constructs sequence logo.
785 Downloads
Updated 11 Nov 2010

View License

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: 1 2 3 4 5 6 7
---------------------------------------------
C : 0.00 0.10 0.05 0.10 0.00 0.05 0.90
T : 0.10 0.85 0.05 0.80 0.80 0.00 0.05
A : 0.05 0.00 0.00 0.05 0.20 0.05 0.05
G : 0.85 0.05 0.90 0.05 0.00 0.90 0.00
---------------------------------------------
H : 0.75 0.75 0.57 1.02 0.72 0.57 0.57
---------------------------------------------
I : 1.25 1.25 1.43 0.98 1.28 1.43 1.43
---------------------------------------------
Total I : 9.05
---------------------------------------------
Mean I : 1.29
---------------------------------------------
The consensus is GTGTTGC.

Note:
The 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.
Email: promethevx@yahoo.com.

Thank you.

Regards,
Michael Chan JT

Cite As

Michael Chan (2024). Compute Position Weight Matrix (PWM) and display SequenceLogo in terms of frequency (https://www.mathworks.com/matlabcentral/fileexchange/29363-compute-position-weight-matrix-pwm-and-display-sequencelogo-in-terms-of-frequency), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Biological and Health Sciences in Help Center and MATLAB Answers
Communities

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0