Difference between revisions of "Nanguiano Week 3"

From LMU BioDB 2015
Jump to: navigation, search
(Added the +1, +2, and +3 frames)
(added -1, -2, and -3)
Line 32: Line 32:
  
 
+1  
 
+1  
  cat sequence_file.txt | sed "s/.../& /g" | sed "s/t/u/g" | sed -f genetic-code.sed | sed "s/ //g" | sed "s/[acgt]//g"
+
  cat sequence_file.txt | sed "s/.../& /g" | sed "s/t/u/g" | sed -f genetic-code.sed | sed "s/ //g" | sed "s/[acgu]//g"
 
  SGI
 
  SGI
  
 
+2   
 
+2   
  cat sequence_file.txt | sed "s/^.//g" | sed "s/.../& /g" | sed "s/t/u/g" | sed -f genetic-code.sed | sed "s/ //g" | sed "s/[acgt]//g"
+
  cat sequence_file.txt | sed "s/^.//g" | sed "s/.../& /g" | sed "s/t/u/g" | sed -f genetic-code.sed | sed "s/ //g" | sed "s/[acgu]//g"
 
  AVY
 
  AVY
  
 
+3  
 
+3  
  cat sequence_file.txt | sed "s/^..//g" | sed "s/.../& /g" | sed "s/t/u/g" | sed -f genetic-code.sed | sed "s/ //g" | sed "s/[acgt]//g"
+
  cat sequence_file.txt | sed "s/^..//g" | sed "s/.../& /g" | sed "s/t/u/g" | sed -f genetic-code.sed | sed "s/ //g" | sed "s/[acgu]//g"
 
  RY
 
  RY
 +
 +
The remaining three were divided onto two lines because they could not fit onto one.
  
 
-1
 
-1
  cat sequence_file.txt | sed
+
  cat sequence_file.txt | sed "y/acgt/tgca/" | rev | sed "s/.../& /g" | sed "s/t/u/g" | sed -f genetic-code.sed |
 +
sed "s/ //g" | sed "s/[acgu]//g"
 +
VYR
  
 
-2  
 
-2  
  cat sequence_file.txt | sed
+
  cat sequence_file.txt | sed "y/acgt/tgca/" | rev | sedsed "s/^.//g" | sed "s/.../& /g" | sed "s/t/u/g" | sed -f genetic-code.sed |
 +
sed "s/ //g" | sed "s/[acgu]//g"
 +
YTA
  
 
-3  
 
-3  
  cat sequence_file.txt | sed
+
  cat sequence_file.txt | sed "y/acgt/tgca/" | rev | sedsed "s/^..//g" | sed "s/.../& /g" | sed "s/t/u/g" | sed -f genetic-code.sed |
 +
sed "s/ //g" | sed "s/[acgu]//g"
 +
IP
  
 
==== Check Your Work ====
 
==== Check Your Work ====

Revision as of 21:40, 15 September 2015

The Genetic Code, by Computer

Connect to the my.cs.lmu.edu workstation as shown in class and do the following exercises from there.

For this exercise, I performed the following series of commands to prepare for the assignment.

ssh my.cs.lmu.edu -l nanguia1 
mkdir biodb
cat >"sequence_file.txt" 
agcggtatac 
cd biodb 
mkdir week3
mv sequence_file.txt biodb/week3
cd ~dondi/xmlpipedb/data
cp genetic-code.sed ~nanguia1/biodb/week3
cd ~nanguia1/biodb/week3

Complement of a Strand

Write a sequence of piped text processing commands that, when given a nucleotide sequence, returns its complementary strand.

On a sequence_file.txt file containing the sequence "agcggtatac", the command and output was as follows:

cat sequence_file.txt | sed "y/atgc/tacg/"
tcgccatatg

Reading Frames

Write 6 sets of text processing commands that, when given a nucleotide sequence, returns the resulting amino acid sequence, one for each possible reading frame for the nucleotide sequence. You should have 6 different sets of commands, one for each possible reading frame.

On a sequence_file.txt containing the sequence "agcggtatac", the command and output was as follows:

+1

cat sequence_file.txt | sed "s/.../& /g" | sed "s/t/u/g" | sed -f genetic-code.sed | sed "s/ //g" | sed "s/[acgu]//g"
SGI

+2

cat sequence_file.txt | sed "s/^.//g" | sed "s/.../& /g" | sed "s/t/u/g" | sed -f genetic-code.sed | sed "s/ //g" | sed "s/[acgu]//g"
AVY

+3

cat sequence_file.txt | sed "s/^..//g" | sed "s/.../& /g" | sed "s/t/u/g" | sed -f genetic-code.sed | sed "s/ //g" | sed "s/[acgu]//g"
RY

The remaining three were divided onto two lines because they could not fit onto one.

-1

cat sequence_file.txt | sed "y/acgt/tgca/" | rev | sed "s/.../& /g" | sed "s/t/u/g" | sed -f genetic-code.sed | 
sed "s/ //g" | sed "s/[acgu]//g"
VYR

-2

cat sequence_file.txt | sed "y/acgt/tgca/" | rev | sedsed "s/^.//g" | sed "s/.../& /g" | sed "s/t/u/g" | sed -f genetic-code.sed | 
sed "s/ //g" | sed "s/[acgu]//g"
YTA

-3

cat sequence_file.txt | sed "y/acgt/tgca/" | rev | sedsed "s/^..//g" | sed "s/.../& /g" | sed "s/t/u/g" | sed -f genetic-code.sed | 
sed "s/ //g" | sed "s/[acgu]//g"
IP

Check Your Work

Fortunately, online tools are available for checking your work; we recommend the ExPASy Translate Tool, sponsored by the same people who run SwissProt. You’re free to use this tool to see if your text processing commands produce the same results.

Links

Nicole Anguiano
BIOL 367, Fall 2015

Assignment Links
Individual Journals
Shared Journals