Difference between revisions of "Troque Week 3"

From LMU BioDB 2015
Jump to: navigation, search
m (XMLPipeDB Match Practice: Added more info on part 3)
(XMLPipeDB Match Practice: Added more info on part 3)
Line 61: Line 61:
 
=== XMLPipeDB Match Practice ===
 
=== XMLPipeDB Match Practice ===
  
The Match command that tallies occurrences of the pattern is the following:
+
The Match command that tallies occurrences of the pattern <code>GO:000[567]</code>is the following:
  java -jar xmlpipedb-match-1.1.1.jar "GO:000[567]" < 493.P_falciparum.xml  
+
  java -jar xmlpipedb-match-1.1.1.jar "GO:000[567]" < 493.P_falciparum.xml
 
* There are 3 unique matches
 
* There are 3 unique matches
 
* The occurrences of each unique match is as follows:
 
* The occurrences of each unique match is as follows:
** The pattern ''go:0007'' occurs 113 times
+
** The pattern ''go:0007'' occurs 113 times.
** The pattern ''go:0006'' occurs 1100 times
+
** The pattern ''go:0006'' occurs 1100 times.
** The pattern ''go:0005'' occurs 1371 times
+
** The pattern ''go:0005'' occurs 1371 times.
<!-- This is just a divider -->
+
 
 +
Trying to find one of the matches (using ''GO:0005'' in this case) we use the ''grep'' command:
 +
grep "GO:0005" 493.P_falciparum.xml
 +
* This gives us all occurrences of the pattern ''GO:0005''. Observing this list of occurrences, the pattern ''GO:0005'' is actually a part of the id's used in the .xml file. From speculation, I would say that each individual ''GO:0005'' corresponds to a gene in the gene ontology page and each number after ''GO:'' is the individual identifier for each of the genes. This would mean that there are 113 genes that have the id that start with 0007, 1100 genes that have id's that start with 0006, and 1371 genes with identifier beginning with 0005.
 +
 
 +
The Match command that tallies occurrences of the pattern <code>\"Yu.*\"</code> is the following:
 +
java -jar xmlpipedb-match-1.1.1.jar \"Yu.*\" < 493.P_falciparum.xml
 +
* There are 3 unique matches
 +
* The occurrences of each unique match is as follows:
 +
** The pattern ''yu b.'' occurs 1 time.
 +
** The pattern ''yu k.'' occurs 228 times.
 +
** The pattern ''yu m.'' occurs 1 time.
 +
* I believe this pattern represents the names of certain authors/contributors to the Gene Ontology database; more specifically, I think they are people whose last names are "Yu"
  
  
  
 
{{Template:Troque_Journal}}
 
{{Template:Troque_Journal}}

Revision as of 04:06, 22 September 2015

User Page        Bio Databases Main Page       


The Genetic Code, by computer

Complement of DNA

To find the complementary strand when given a standard 5' to 3' DNA strand, match each of the four base pairs A,T,C, and G with T, A, G, and C, respectively. Done in the computer, we use the sed command for replacing the bases with the ones they correspond to. To find the complement of the DNA strand, the following command is used:

Command: sed "y/actg/tgac/" prokaryote.txt
Yields:  agatgatataaagttatccatgctaccggtttcttctgttataacttgaactttgcaacggattatggtacaaggcgcatattgggtcggcggtcaaggcgaccgccgtaaaattg

where "prokaryote.txt" is the file that contains the original DNA strand. Similarly, we can use this command for a file with a longer DNA strand:

Command: sed "y/actg/tgac/" infA-E.coli-K12.txt
(The resulting strand is not shown since it is too long).

Reading Frames

For each of the reading frames for the mRNA strand, we first have to convert the DNA strand into mRNA. We use the sed command again in order to change all the T's into U's:

sed "s/t/u/g"

Then we divide the strand into its codons so we use the wildcard "." (in this case, since we want 3 characters, we use "...") since we do not care which letters we look to replace. Then, we use "& " because we want to keep those same letters, but we want to add a space between them. This would result in the same string of letters, but with the space character every 3 letters.

sed "s/.../& /g"

Next, we use the existing file genetic-code.sed, which already has all the codons and their corresponding amino acids. We use the following command:

sed -f genetic-code.sed

Then, we will get something that looks like this (using the prokaryote.txt file as an example):

S T I F Q - V R W P K K T I L N L K R C L I P C S A Y N P A A S S A G G I L ac

Since this strand still has the residual bases at the end that are not converted to codons, we want to remove these bases. We use the command:

sed "y/acug/    /"

So that each of the residual bases is replaced with a space character. We can then remove ALL space characters with the following command:

sed "s/ //g"

For the +1 reading frame, the above commands would suffice and when we combine them into a pipeline of commands, we get the following:

+1:     cat prokaryote.txt | sed "s/t/u/g" | sed "s/.../& /g" | sed -f genetic-code.sed | sed "y/acug/    /" | sed "s/ //g"
Yields: STIFQ-VRWPKKTILNLKRCLIPCSAYNPAASSAGGIL

However, for the +2 and +3 reading frames, we have to shift reading the codons by 1 and 2 letters, respectively. The same commands from above are still used, but we add another sed command so that we shift by a certain number of letters. For +2, we add the command:

sed "s/^.//g"

so that we shift by 1 letter from the very first letter (the symbol "^" means that we only want the beginning character(s)).

+2:     cat prokaryote.txt | sed "s/t/u/g" | sed "s/^.//g" | sed "s/.../& /g" | sed -f genetic-code.sed |
        sed "y/acug/    /" | sed "s/ //g"
Yields: LLYFNRYDGQRRQY-T-NVA-YHVPRITQPPVPLAAF-

For +3, similar to +2, we use the command:

sed "s/^..//g" 

for shifting by 2 letters in the strand. So we get the following pipeline of commands:

+3:     cat prokaryote.txt | sed "s/t/u/g" | sed "s/^..//g" | sed "s/.../& /g" | sed -f genetic-code.sed | 
        sed "y/acug/    /" | sed "s/ //g"
Yields: YYISIGTMAKEDNIELETLPNTMFRV-PSRQFRWRHFN

For the -1, -2, and -3 reading frames, 2 additional commands are needed: the commands rev, to reverse the strand, and sed "y/acug/ugac/", to find the complementary mRNA strand. By doing this, we do not have to deviate much from our previous commands shown above. Instead, we are only adding 2 additional steps. The resulting reading frames are as follows:

-1:     rev prokaryote.txt | sed "s/t/u/g" | sed "y/acug/ugac/" | sed "s/.../& /g" | sed -f genetic-code.sed |
        sed "y/acug/    /" | sed "s/ //g"
Yields: VKMPPAELAAGLYAEHGIRQRFKFNIVFFGHRTY-NIV
-2:     rev prokaryote.txt | sed "s/t/u/g" | sed "y/acug/ugac/" | sed "s/^.//g" | sed "s/.../& /g" | sed -f genetic-code.sed | 
        sed "y/acug/    /" | sed "s/ //g"
Yields: LKCRQRNWRLGYTRNMVLGNVSSSILSSLAIVPIEI--
-3:     rev prokaryote.txt | sed "s/t/u/g" | sed "y/acug/ugac/" | sed "s/^..//g" | sed "s/.../& /g" | sed -f genetic-code.sed | 
        sed "y/acug/    /" | sed "s/ //g"
Yields: -NAASGTGGWVIRGTWY-ATFQVQYCLLWPSYLLKYSR

For the other file, we need only replace the command "cat prokaryote.txt" with "cat infA-E.coli-K12.txt".

XMLPipeDB Match Practice

The Match command that tallies occurrences of the pattern GO:000[567]is the following:

java -jar xmlpipedb-match-1.1.1.jar "GO:000[567]" < 493.P_falciparum.xml
  • There are 3 unique matches
  • The occurrences of each unique match is as follows:
    • The pattern go:0007 occurs 113 times.
    • The pattern go:0006 occurs 1100 times.
    • The pattern go:0005 occurs 1371 times.

Trying to find one of the matches (using GO:0005 in this case) we use the grep command:

grep "GO:0005" 493.P_falciparum.xml
  • This gives us all occurrences of the pattern GO:0005. Observing this list of occurrences, the pattern GO:0005 is actually a part of the id's used in the .xml file. From speculation, I would say that each individual GO:0005 corresponds to a gene in the gene ontology page and each number after GO: is the individual identifier for each of the genes. This would mean that there are 113 genes that have the id that start with 0007, 1100 genes that have id's that start with 0006, and 1371 genes with identifier beginning with 0005.

The Match command that tallies occurrences of the pattern \"Yu.*\" is the following:

java -jar xmlpipedb-match-1.1.1.jar \"Yu.*\" < 493.P_falciparum.xml 
  • There are 3 unique matches
  • The occurrences of each unique match is as follows:
    • The pattern yu b. occurs 1 time.
    • The pattern yu k. occurs 228 times.
    • The pattern yu m. occurs 1 time.
  • I believe this pattern represents the names of certain authors/contributors to the Gene Ontology database; more specifically, I think they are people whose last names are "Yu"


Assignment Links

Weekly Assignments

Individual Journal Entries

Shared Journal Entries