Kzebrows Week 3

From LMU BioDB 2015
Revision as of 23:03, 21 September 2015 by Kzebrows (Talk | contribs) (Finding the complement of a strand.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Complement of a Strand

I decided to use the E. coli file for practice in the first part of the assignment. Initially, my instinct was to use SED as the command to replace the letters in the sequence. I needed to replace A with T, T with A, C with G, and G with C; however, I realized that SED only replaces things in a sequence, and if I used SED then every letter that changed would immediately change back to the original, defeating the purpose of the command. I then remembered that I can use sed “y”/<original characters>/<new characters>/ to replace everything in one go.

I opened the prokaryote file using cat infA-E.coli-K12.txt, which gave me the DNA sequence of the mRNA-like strand. If this is read from 5’ to 3’, I needed to create the complementary strand. I then typed in the sed rule indicating what I wanted to replace, which gave me the complementary strand. The complete command was

cat infA-E.coli-K12.txt | sed “y/atcg/tagc/”.