# what does a sequence look like before alignment?

I am confused with Sequence alignment, which is

a way of arranging the sequences of DNA, RNA, or protein to identify regions of similarity that may be a consequence of functional, structural, or evolutionary relationships between the sequences.

to understand this easily, I would like to use this image (image_1)

the image above (image_1) is the primary part of nucleic acid structure (primary, secondary, tertiary, and quaternary), shown below (image_2)

is the sequence gcgc... an aligned sequence? if yes, what does the sequence look like before alignment?

Sequence alignment typically refers to the primary sequence. That is, we ignore the complex 3D structure of the molecule and its spatial arrangement in the cell. Instead, we use a symbolic representation composed of symbols like A, C, G, T, and U. Alignment is a conceptual tool that, as you pointed out, is used to find regions of similarity between sequences. Therefore, it only makes sense in the context of two or more similar sequences.

By way of example, consider a simple case of two sequences X and Y. This is what they would look like before alignment. The similarities between the two sequences are unclear.

X: ATTGACATAGGCACTTCGACTA
Y: GACATCTTCGGCTAA


This is what they would look like after alignment. The similarities (and differences) are now much easier to see.

X: ATTGACATAGGCACTTCCACTA-
|||||     ||||  |||
Y: ---GACAT-----CTTCGGCTAA


This arrangement identifies regions of similarity that may be related through evolution. This doesn't always mean perfect agreement though. As this example shows, sometimes mismatches or gaps are allowed so that long stretches of identical matches are lined up correctly. Sometimes, for very closely related sequences, the optimal alignment doesn't require any gaps at all. This seems to be the case with some of your recent questions about sequence logos.

Note: Sequence alignment is a fundamental concept in bioinformatics, and there is a tremendous amount of research and development on the topic. It's hard to imagine doing any amount of serious DNA sequence analysis responsibly without a basic understanding of sequence alignment. I would recommend searching Google and/or Google Scholar for intro-level reviews of the topic.

• There are a lot of really good materials by Ben Langmead (the guy behind Bowtie and HISAT) on sequence alignment, what it means, and how it's done. I'd also recommend most things written by Heng Li, if you're looking for places to start learning about sequence alignment Jul 31 '19 at 14:01