What is "aligned sequences" and "consensus sequence" in the context of sequence logo? How to compute these? In bioinformatics, a sequence logo is a graphical representation of the sequence conservation of nucleotides (in a strand of DNA/RNA) or amino acids (in protein sequences).

so, What is "aligned sequences" and "consensus sequence"?

how can I get these sequences based on following data?



Figure 2.5 from the book "Machine Learning - A Probabilistic Perspective"

more info about this figure at here
Panel (a) shows a sequence gap-free alignment. Each row corresponds to a contiguous 15 base pair sequence of DNA (e.g. row 1 could be a human sequence, row 2 could be the equivalent mouse sequence etc.). Each column corresponds to a particular position/residue (e.g. column 1 is the 1st position of the alignment etc.).

Panel (b) shows the sequence logo. As noted in the comments, this does not correspond to the alignment in (a). Instead, here is the corresponding logo:



From this you can intuitively understand that at the 1st sequence position you have only As and Ts and their frequency corresponds to the y-axis. For the 3rd position, you have only As, so only A is represented here in the logo etc.

The consensus sequence is the most frequent letter at each position in the alignment, i.e. [AT]TAGC etc. where [AT] means A or T since they are jointly high in frequency (5 each).