Difference between revisions of "Class Notes"
From LMU BioDB 2013
				
								
				
				
																
				
				
								
				|  (→History:  removed changes permission) |  (→Assignment Notes:  expanded previous answer a bit) | ||
| (9 intermediate revisions by one user not shown) | |||
| Line 9: | Line 9: | ||
| *Hitting tab twice will auto show all options to select from | *Hitting tab twice will auto show all options to select from | ||
| + | |||
| + | ==Other Commands== | ||
| + | *grep "ACTG" will look for typed letters ACTG in a string of text | ||
| + | **if typed letters are present in a file, letters will appear red | ||
| + | ***grep "letters" file_name will search for letters in a file and open it | ||
| + | ** "." is a wildcard | ||
| + | "^" is the caret line, which only searches at the beginning of the line | ||
| + | **"$" searches only at the end of the line | ||
| + | *"\"text.*\"" | ||
| + | ** "*" matches any number of characters after text | ||
| + | |||
| + | *"wc" shows word count | ||
| + | **Hit Ctrl D to finish typing text after wc command | ||
| + | ***first number tells # of lines | ||
| + | ***second number tells # of words | ||
| + | ***third number tells # of characters | ||
| + | **combine commands with this notation: command | command | ||
| + | ****you can string multiple commands together in one string | ||
| + | |||
| + | *"java -jar" opens java applications | ||
| + | |||
| + | *"&" repeats what you found (doesn't replace text, but adds to it) | ||
| + | **E.g. sed "s/Ind.* /Wisconsin is still better than &/g" | ||
| + | |||
| + | ==Goals for Genetic Code== | ||
| + | *break into 3s = s/.../ /g | ||
| + | *convert via genetic code = s/cgu/L/g; s/aug/M/g; (rest of genetic code letter assignments) | ||
| + | *drop 0-2 characters = s/^.//g | ||
| + | *reverse sequence = rev | ||
| + | |||
| + | s/aug/M/g | ||
| + | |||
| + | *Structure of command line | ||
| + | ** file > command | command > file | ||
| + | |||
| + | |||
| + | ==Assignment Notes== | ||
| + | |||
| + | ===Week 3=== | ||
| + | # Question | ||
| + | :*java -jar xmlpipedb-match-1.1.1.jar "GO:000916." < 493.P_falciparum.xml | ||
| + | *Unique Matches = 2 | ||
| + | *Appears twice in first line, once in second line | ||
| + | |||
| + | #James yields 2 unique matches. First line james k.d. has 8238 matches, second line james a.a. has 1 match | ||
| + | **"James" may refer to the person who sequenced all or a portion of falciparum. | ||
| + | |||
| + | #Match ATG results in 1 unique match appearing 830101 times | ||
| + | #*grep and wc result in 502410 lines, 502410 words, and 35671048 characters | ||
| + | #*Answers make sense because Match is only looking for a specific instance when ATG appears, which would make its value lower than the grep | wc combo. grep | wc cannot differentiate specific pieces of text and yields any occurrence when the pattern ATG comes up. | ||
Latest revision as of 21:55, 12 September 2013
| Contents | 
[edit] History
- Type history to view past commands
- !#### will copy and execute commands
 
- Ctrl+R does most recent command
- chmod changes permission
- e.g. "chmod 644 genetic-code.sed"
 
- Hitting tab twice will auto show all options to select from
[edit] Other Commands
- grep "ACTG" will look for typed letters ACTG in a string of text
- if typed letters are present in a file, letters will appear red
- grep "letters" file_name will search for letters in a file and open it
 
- "." is a wildcard
 
- if typed letters are present in a file, letters will appear red
"^" is the caret line, which only searches at the beginning of the line
- "$" searches only at the end of the line
 
- "\"text.*\""
- "*" matches any number of characters after text
 
- "wc" shows word count
- Hit Ctrl D to finish typing text after wc command
- first number tells # of lines
- second number tells # of words
- third number tells # of characters
 
- combine commands with this notation: command | command
- you can string multiple commands together in one string
 
 
 
- Hit Ctrl D to finish typing text after wc command
- "java -jar" opens java applications
- "&" repeats what you found (doesn't replace text, but adds to it)
- E.g. sed "s/Ind.* /Wisconsin is still better than &/g"
 
[edit] Goals for Genetic Code
- break into 3s = s/.../ /g
- convert via genetic code = s/cgu/L/g; s/aug/M/g; (rest of genetic code letter assignments)
- drop 0-2 characters = s/^.//g
- reverse sequence = rev
s/aug/M/g
- Structure of command line
- file > command | command > file
 
[edit] Assignment Notes
[edit] Week 3
- Question
- java -jar xmlpipedb-match-1.1.1.jar "GO:000916." < 493.P_falciparum.xml
 
- Unique Matches = 2
- Appears twice in first line, once in second line
- James yields 2 unique matches. First line james k.d. has 8238 matches, second line james a.a. has 1 match
- "James" may refer to the person who sequenced all or a portion of falciparum.
 
- Match ATG results in 1 unique match appearing 830101 times
- grep and wc result in 502410 lines, 502410 words, and 35671048 characters
- Answers make sense because Match is only looking for a specific instance when ATG appears, which would make its value lower than the grep | wc combo. grep | wc cannot differentiate specific pieces of text and yields any occurrence when the pattern ATG comes up.
 

