In this blog we will be creating a dot plot using python and JavaScript for visualizing and getting the common subsequences.
Dot plot are 2D graphs showing a comparison of two sequences where the top X axis and left Y axis are used to represent the two sequences. A dot is plotted at every coordinate where there is similarity between the bases.
Dot Plot Interpretation
For example consider both the sequences (S1 and S2) are same.
S1=ATGATAT S2=ATGATAT
Dot Plot:

Subsequence which are common in both sequence are present diagonally including the principal diagonal, forward and backward diagonals
Interpretation:
- Region of Similarity appears as diagonals with dot
- Multiple diagonals indicate repetitions
- Formation of box indicates the low complexity region
- Reverse diagonal indicates inversion
- Reverse diagonal crossing the principal diagonal indicates palindromes
Principal Diagonal: If a principal diagonal is present, then those sequences are identical.

Backward Diagonals: Sequence of nucleotides that are followed downstream by its reverse complement.

Forward Diagonals: Forward diagonals represents the similar subsequences.
Short diagonals are known as noise as it hinders the capability to recognize the other diagonals and it must be removed. The length of the short diagonals can be obtained by observing the Dot matrix

Python Code: Code output for two random sequence is give below.
The code is available at https://github.com/Prasanth-s-n/Bioinformatics/
Output:


Hope this blog is helpful and feel free to send feedbacks and also to comment on blogs for further improvements in the future.
Thank you.