In DNA, the reverse complement is the sequence that is created by reversing the order of the nucleotides and then replacing each nucleotide with its complementary base. Bases A and T are each other’s complements, and so are bases G and C. For example, the reverse complement of the DNA sequence ATCG is CGAT.
The reverse complement is important in many biological processes, including DNA replication and RNA transcription. During DNA replication, the two strands of DNA are separated, and each strand serves as a template for the synthesis of a new complementary strand. During RNA transcription, the DNA template is read in a 5’ to 3’ direction, and the RNA polymerase synthesizes an RNA molecule in the opposite direction, from 3’ to 5’. The RNA molecule is then used as a template for protein synthesis.
Write a UNIX pipeline that combines multiple commands to transform a list of DNA sequences
into their reverse complement. Tip: you will need the rev command; check its manual page.
Only submit a solution for what is missing in place of the three dots:
cat dna.txt | ...