Difference between revisions of "Malverso Week 3"

From LMU BioDB 2015
Jump to: navigation, search
(answered reading frames for -2 strand.)
(answered reading frames for +3 strand (and fixed the signs of the first two questions))
Line 8: Line 8:
 
===Reading Frames===
 
===Reading Frames===
  
====-1====
+
====+1====
 
Using prokaryote.txt again, I used sed “y/t/u/” to replace all the t's with u's. I then re-read [[Introduction to the Command Line]] to find that sed –f <file with rules> is the technique I should use to use to harness the helpfullness of the genetic_code.sed file.  
 
Using prokaryote.txt again, I used sed “y/t/u/” to replace all the t's with u's. I then re-read [[Introduction to the Command Line]] to find that sed –f <file with rules> is the technique I should use to use to harness the helpfullness of the genetic_code.sed file.  
  
Line 17: Line 17:
 
  STIFQ-VRWPKKTILNLKRCLIPCSAYNPAASSAGGIL
 
  STIFQ-VRWPKKTILNLKRCLIPCSAYNPAASSAGGIL
  
====-2====
+
====+2====
 
For this strand, the only change I had to make in my code was to get rid of the very first character of prokaryote.txt. At first, I added the command sed "s/^[agtc]//g", but realized that it also worked to use sed "s/^.//g". I chose the second choice which looked like:
 
For this strand, the only change I had to make in my code was to get rid of the very first character of prokaryote.txt. At first, I added the command sed "s/^[agtc]//g", but realized that it also worked to use sed "s/^.//g". I chose the second choice which looked like:
 
  cat prokaryote.txt | sed "s/^.//g" | sed "s/.../& /g" | sed "y/t/u/" | sed -f genetic-code.sed | sed "s/[augc]//g" | sed "s/ //g"
 
  cat prokaryote.txt | sed "s/^.//g" | sed "s/.../& /g" | sed "y/t/u/" | sed -f genetic-code.sed | sed "s/[augc]//g" | sed "s/ //g"
Line 23: Line 23:
 
  LLYFNRYDGQRRQY-T-NVA-YHVPRITQPPVPLAAF-  
 
  LLYFNRYDGQRRQY-T-NVA-YHVPRITQPPVPLAAF-  
  
 +
====+3====
 +
All I did was add a "." to the sed command to delete the front two letters instead of just one:
 +
cat prokaryote.txt | sed "s/^..//g" | sed "s/.../& /g" | sed "y/t/u/" | sed -f genetic-code.sed | sed "s/[augc]//g" | sed "s/ //g"
 +
which proved to be successful:
 +
YYISIGTMAKEDNIELETLPNTMFRV-PSRQFRWRHFN
  
  
 
{{Template:Malverso}}
 
{{Template:Malverso}}

Revision as of 00:54, 22 September 2015

The Genetic Code, By Computer

I used putty.exe and logged in to my account on my.cs.lmu.edu in order to access prokaryote.txt.

Complement of a Strand

At first, I tried using the command cat prokaryote.txt | sed “s/atcg/tagc/g”, which was incorrect. I revisited my notes to see that it is actually:

cat prokaryote.txt | sed "y/atgc/tacg/" 

Reading Frames

+1

Using prokaryote.txt again, I used sed “y/t/u/” to replace all the t's with u's. I then re-read Introduction to the Command Line to find that sed –f <file with rules> is the technique I should use to use to harness the helpfullness of the genetic_code.sed file.

I tried cat prokaryote.txt | sed “y/t/u/” | sed –f genetic-code.sed, but when I checked that answer on the ExPASy Translate Tool it was wrong. Then I tried adding a space between each set of three letters with sed “s/…/& /g” which produced the correct answer but with some left over bases on the end.I added sed “s/[augc]//” to get rid of the left over bases, and then sed "s/ //g" to get rid of the spaces between the letters. This looked like:

cat prokaryote.txt | sed "s/.../& /g" | sed "y/t/u/" | sed -f genetic-code.sed | sed "s/[atgc]//g" | sed "s/ //g"

which had the output:

STIFQ-VRWPKKTILNLKRCLIPCSAYNPAASSAGGIL

+2

For this strand, the only change I had to make in my code was to get rid of the very first character of prokaryote.txt. At first, I added the command sed "s/^[agtc]//g", but realized that it also worked to use sed "s/^.//g". I chose the second choice which looked like:

cat prokaryote.txt | sed "s/^.//g" | sed "s/.../& /g" | sed "y/t/u/" | sed -f genetic-code.sed | sed "s/[augc]//g" | sed "s/ //g"

which had the output:

LLYFNRYDGQRRQY-T-NVA-YHVPRITQPPVPLAAF- 

+3

All I did was add a "." to the sed command to delete the front two letters instead of just one:

cat prokaryote.txt | sed "s/^..//g" | sed "s/.../& /g" | sed "y/t/u/" | sed -f genetic-code.sed | sed "s/[augc]//g" | sed "s/ //g"

which proved to be successful:

YYISIGTMAKEDNIELETLPNTMFRV-PSRQFRWRHFN


Team Page

Heavy Metal HaterZ

Assignments

Individual Journal Entries

Shared Journal Entries