Difference between revisions of "Msaeedi23 Week 3"
(frame +3) |
(invoke template) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 23: | Line 23: | ||
Frame +1: Goal is to seperate the sequence into groups of 3 nucleotides | Frame +1: Goal is to seperate the sequence into groups of 3 nucleotides | ||
− | cat "sequence_file" | sed "s/.../& /g | <!-- & replaces the 3 nucleotides with the same 3 except with a space --> sed "s/t/u/g" | <!-- replace t's with u's --> sed -f genetic-code.sed | <!-- input specific set of rules --> sed "s/ / /g" | <!--deleting any additional spaces between sets of nucleotides --> sed "s/[acgu]/ /g" <!--decoding sequence into specific amino acid --> | + | cat "sequence_file.txt" | sed "s/.../& /g" | <!-- & replaces the 3 nucleotides with the same 3 except with a space --> sed "s/t/u/g" | <!-- replace t's with u's --> sed -f genetic-code.sed | <!-- input specific set of rules --> sed "s/ / /g" | <!--deleting any additional spaces between sets of nucleotides --> sed "s/[acgu]/ /g" <!--decoding sequence into specific amino acid --> |
Frame +2: | Frame +2: | ||
− | cat "sequence_file" | sed "s/^./ /g" | <!-- delete first character of each input line --> sed "s/t/u/g" | sed -f genetic-code.sed | sed "s/ / /g" | sed "s/[acgu]/ /g" | + | cat "sequence_file.txt" | sed "s/^./ /g" | <!-- delete first character of each input line --> sed "s/t/u/g" | sed -f genetic-code.sed | sed "s/ / /g" | sed "s/[acgu]/ /g" |
Frame +3: | Frame +3: | ||
− | cat "sequence_file" | sed "s/^../ /g" | <!-- delete first two characters of each input line --> sed "s/t/u/g" | sed -f genetic-code.sed | sed "s/ / /g" | sed "s/[acgu]/ /g" | + | cat "sequence_file.txt" | sed "s/^../ /g" | <!-- delete first two characters of each input line --> sed "s/t/u/g" | sed -f genetic-code.sed | sed "s/ / /g" | sed "s/[acgu]/ /g" |
+ | |||
+ | Frame -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" <!-- once sequence has been reversed, use same command inputs as + frames --> | ||
+ | |||
+ | Frame -2: | ||
+ | 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" | ||
+ | |||
+ | Frame -3: | ||
+ | cat "sequence_file.txt" | sed "y/actg/tgca/" | rev | sed "s^../ /g" | sed "s/t/u/g" | sed -f genetic-code.sed | sed "s/ / /g" | sed "s/[acgu]/ /g" | ||
==== Check Your Work ==== | ==== Check Your Work ==== | ||
Line 40: | Line 49: | ||
# What Match command tallies the occurrences of the pattern <code>GO:000[567]</code> in the ''493.P_falciparum.xml'' file? | # What Match command tallies the occurrences of the pattern <code>GO:000[567]</code> in the ''493.P_falciparum.xml'' file? | ||
+ | #* <code>java -jar xmlpipedb-match-1.1.1.jar GO:000[567] < 493.P_falciparum.xml</code> | ||
#* How many unique matches are there? | #* How many unique matches are there? | ||
+ | #** 3 | ||
#* How many times does each unique match appear? | #* How many times does each unique match appear? | ||
+ | #**GO:007- 113 | ||
+ | #**GO:006- 1100 | ||
+ | #**GO:008- 1371 | ||
# Try to find one such occurrence “in situ” within that file. Look at the neighboring content around that occurrence. | # Try to find one such occurrence “in situ” within that file. Look at the neighboring content around that occurrence. | ||
+ | #* example: <code><dbreference type ="GO" id="GO:0007264"><code> | ||
#* Describe how you did this. | #* Describe how you did this. | ||
+ | #** using the grep and more commands | ||
#* Based on where you find this occurrence, what kind of information does this pattern represent? | #* Based on where you find this occurrence, what kind of information does this pattern represent? | ||
+ | #** the pattern represents the GO-gene ontology of a gene in this database. | ||
# What Match command tallies the occurrences of the pattern <code>\"Yu.*\"</code> in the ''493.P_falciparum.xml'' file? | # What Match command tallies the occurrences of the pattern <code>\"Yu.*\"</code> in the ''493.P_falciparum.xml'' file? | ||
+ | <code>java -jar xmlpipedb-match-1.1.1.jar\*Yu.*\" < 493.P_falciparum.xml</code> | ||
#* How many unique matches are there? | #* How many unique matches are there? | ||
+ | #** 3 | ||
#* How many times does each unique match appear? | #* How many times does each unique match appear? | ||
+ | #**"Yu b." - 1 | ||
+ | #**"Yu k." - 228 | ||
+ | #**"Yu m." - 1 | ||
#* What information do you think this pattern represents? | #* What information do you think this pattern represents? | ||
+ | #** this pattern represents a title or a name | ||
# Use Match to count the occurrences of the pattern <code>ATG</code> in the ''hs_ref_GRCh37_chr19.fa'' file (this may take a while). Then, use '''grep''' and '''wc''' to do the same thing. | # Use Match to count the occurrences of the pattern <code>ATG</code> in the ''hs_ref_GRCh37_chr19.fa'' file (this may take a while). Then, use '''grep''' and '''wc''' to do the same thing. | ||
#* What answer does Match give you? | #* What answer does Match give you? | ||
+ | #** using <code>java -jar xmlpipedb-match-1.1.1.jar ATG < hs_ref_GRCh37_chr19.fa</code> Match provided the following info: | ||
+ | #** 1 total unique matches | ||
+ | #** 830101 is the number of matches | ||
#* What answer does '''grep''' + '''wc''' give you? | #* What answer does '''grep''' + '''wc''' give you? | ||
+ | #** using grep and wc commands provided this: | ||
+ | #**lines: 502410 | ||
+ | #**words: 502410 | ||
+ | #**characters: 35671048 | ||
#* Explain why the counts are different. (''Hint:'' Make sure you understand what exactly is being counted by each approach.) | #* Explain why the counts are different. (''Hint:'' Make sure you understand what exactly is being counted by each approach.) | ||
+ | #** Using Match searches for the three letter (ATG) and the number of times this sequence appears in the entire file. This showed that ATG appeared 830,101 times. Grep, on the other hand, counts the number of lines in which the sequence appears at least once. Meaning that ATG was found at least once on 502410 lines. The word count is the same due to the fact that there is no space between letters of a single line. Finally, there is a total amount of 35,671,048 characters in all the lines combined. | ||
+ | |||
+ | {{Template:Msaeedi23}} |
Latest revision as of 04:31, 22 September 2015
Contents
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 these exercises, two files are available in the Keck lab system for practice; of course, you can always make your own sequences up. The practice files are ~dondi/xmlpipedb/data/prokaryote.txt and ~dondi/xmlpipedb/data/infA-E.coli-K12.txt.
Complement of a Strand
Write a sequence of piped text processing commands that, when given a nucleotide sequence, returns its complementary strand. In other words, fill in the question marks:
Implemented the command: cat "sequence_file" | sed "y/atcg/tagc/"
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. In other words, fill in the question marks:
cat sequence_file | ?????
You should have 6 different sets of commands, one for each possible reading frame. For example, if sequence_file contains:
agcggtatac
Frame +1: Goal is to seperate the sequence into groups of 3 nucleotides
cat "sequence_file.txt" | sed "s/.../& /g" | sed "s/t/u/g" | sed -f genetic-code.sed | sed "s/ / /g" | sed "s/[acgu]/ /g"
Frame +2:
cat "sequence_file.txt" | sed "s/^./ /g" | sed "s/t/u/g" | sed -f genetic-code.sed | sed "s/ / /g" | sed "s/[acgu]/ /g"
Frame +3:
cat "sequence_file.txt" | sed "s/^../ /g" | sed "s/t/u/g" | sed -f genetic-code.sed | sed "s/ / /g" | sed "s/[acgu]/ /g"
Frame -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"
Frame -2:
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"
Frame -3:
cat "sequence_file.txt" | sed "y/actg/tgca/" | rev | sed "s^../ /g" | sed "s/t/u/g" | sed -f genetic-code.sed | sed "s/ / /g" | sed "s/[acgu]/ /g"
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.
XMLPipeDB Match Practice
For your convenience, the XMLPipeDB Match Utility (xmlpipedb-match-1.1.1.jar) has been installed in the ~dondi/xmlpipedb/data directory alongside the other practice files. Use this utility to answer the following questions:
- What Match command tallies the occurrences of the pattern
GO:000[567]
in the 493.P_falciparum.xml file?-
java -jar xmlpipedb-match-1.1.1.jar GO:000[567] < 493.P_falciparum.xml
- How many unique matches are there?
- 3
- How many times does each unique match appear?
- GO:007- 113
- GO:006- 1100
- GO:008- 1371
-
- Try to find one such occurrence “in situ” within that file. Look at the neighboring content around that occurrence.
- example:
<dbreference type ="GO" id="GO:0007264"><code>
- Describe how you did this.
- using the grep and more commands
- Based on where you find this occurrence, what kind of information does this pattern represent?
- the pattern represents the GO-gene ontology of a gene in this database.
- example:
- What Match command tallies the occurrences of the pattern <code>\"Yu.*\" in the 493.P_falciparum.xml file?
java -jar xmlpipedb-match-1.1.1.jar\*Yu.*\" < 493.P_falciparum.xml
- How many unique matches are there?
- 3
- How many times does each unique match appear?
- "Yu b." - 1
- "Yu k." - 228
- "Yu m." - 1
- What information do you think this pattern represents?
- this pattern represents a title or a name
- How many unique matches are there?
- Use Match to count the occurrences of the pattern
ATG
in the hs_ref_GRCh37_chr19.fa file (this may take a while). Then, use grep and wc to do the same thing.- What answer does Match give you?
- using
java -jar xmlpipedb-match-1.1.1.jar ATG < hs_ref_GRCh37_chr19.fa
Match provided the following info: - 1 total unique matches
- 830101 is the number of matches
- using
- What answer does grep + wc give you?
- using grep and wc commands provided this:
- lines: 502410
- words: 502410
- characters: 35671048
- Explain why the counts are different. (Hint: Make sure you understand what exactly is being counted by each approach.)
- Using Match searches for the three letter (ATG) and the number of times this sequence appears in the entire file. This showed that ATG appeared 830,101 times. Grep, on the other hand, counts the number of lines in which the sequence appears at least once. Meaning that ATG was found at least once on 502410 lines. The word count is the same due to the fact that there is no space between letters of a single line. Finally, there is a total amount of 35,671,048 characters in all the lines combined.
- What answer does Match give you?
Class Whoopers Team Page
Assignment Links
- Week 1 Assignment
- Week 2 Assignment
- Week 3 Assignment
- Week 4 Assignment
- Week 5 Assignment
- Week 6 Assignment
- Week 7 Assignment
- Week 8 Assignment
- Week 9 Assignment
- Week 10 Assignment
- Week 11 Assignment
- Week 12 Assignment
- Week 14 Assignment
- Week 15 Assignment
Individual Journals
- Week 1
- Week 2
- Week 3
- Week 4
- Week 5
- Week 6
- Week 7
- Week 8
- Week 9
- Week 10
- Week 11
- Week 12
- Week 13
- Week 14
- Week 15
- Class Journal Week 1
- Class Journal Week 2
- Class Journal Week 3
- Class Journal Week 4
- Class Journal Week 5
- Class Journal Week 6
- Class Journal Week 7
- Class Journal Week 8
- Class Journal Week 9
- The_Class_Whoopers Week 10
- The_Class_Whoopers Week 11
- The_Class_Whoopers Week 12
- The_Class_Whoopers Week 14
- The_Class_Whoopers 15