Difference between revisions of "Ajvree Week 4"
(classnotes1) |
(classnotes2) |
||
Line 1: | Line 1: | ||
− | Class Notes: | + | Class Notes:<br> |
[ct] at [at] at | [ct] at [at] at | ||
− | [ct] :this can be c or t | + | [ct] :this can be c or t<br> |
[at] :this can be a or t | [at] :this can be a or t | ||
− | convert week 2 assignment to computer code by "counting" commands | + | convert week 2 assignment to computer code by "counting" commands<br> |
bracket notation means find x "or" x | bracket notation means find x "or" x | ||
-10 | -10 | ||
− | cat infA-E.coli-K12.txt | sed "s/[ct]at[at]at/ HERE /g" | + | cat infA-E.coli-K12.txt | sed "s/[ct]at[at]at/ HERE /g"<br> |
to find 2 HERE's | to find 2 HERE's | ||
!! = rerun the command | !! = rerun the command | ||
− | HERE!! = HERE + rerun command | + | HERE!! = HERE + rerun command<br> |
\ between exclamation points = put no importance to the exclamation points/ignore command | \ between exclamation points = put no importance to the exclamation points/ignore command | ||
to add -35 spot, add another sed command | to add -35 spot, add another sed command | ||
− | to add -10 or -35 box: | + | to add -10 or -35 box:<br> |
− | <minus35box>&</minus35box> etc | + | <minus35box>&</minus35box> etc<br> |
− | sed format doesn't know what slash is, must put another backslash before it | + | sed format doesn't know what slash is, must put another backslash before it<br> |
<minus35box>&<\/minus35box> | <minus35box>&<\/minus35box> | ||
+ | |||
+ | to find the 17 character endpoint, use periods<br> | ||
+ | | sed "s/................. <minus10/<\/minus35box> &/g" | ||
+ | |||
+ | shortcut for repeated pattern: .{17}<br> | ||
+ | if use this, after sed -r to allow shortcut | ||
+ | |||
+ | to mark the beginning<br> | ||
+ | cat infA-E.coli-K12.txt | sed "s/[ct]at[at]at/ <minus10box>&<\/minus10box> /g" | sed "s/................. <minus10/<\/minus35box> &/g" | sed "s/......<\/minus35box>/<minus35box>&/g"<br> | ||
+ | put consensus sequence back in<br> | ||
+ | cat infA-E.coli-K12.txt | sed "s/[ct]at[at]at/ <minus10box>&<\/minus10box> /g" | sed "s/................. <minus10/<\/minus35box> &/g" | sed "s/tt[gt]ac[at]<\/minus35box>/<minus35box>&/g" |
Revision as of 17:19, 17 September 2013
Class Notes:
[ct] at [at] at
[ct] :this can be c or t
[at] :this can be a or t
convert week 2 assignment to computer code by "counting" commands
bracket notation means find x "or" x
-10
cat infA-E.coli-K12.txt | sed "s/[ct]at[at]at/ HERE /g"
to find 2 HERE's
!! = rerun the command
HERE!! = HERE + rerun command
\ between exclamation points = put no importance to the exclamation points/ignore command
to add -35 spot, add another sed command
to add -10 or -35 box:
<minus35box>&</minus35box> etc
sed format doesn't know what slash is, must put another backslash before it
<minus35box>&<\/minus35box>
to find the 17 character endpoint, use periods
| sed "s/................. <minus10/<\/minus35box> &/g"
shortcut for repeated pattern: .{17}
if use this, after sed -r to allow shortcut
to mark the beginning
cat infA-E.coli-K12.txt | sed "s/[ct]at[at]at/ <minus10box>&<\/minus10box> /g" | sed "s/................. <minus10/<\/minus35box> &/g" | sed "s/......<\/minus35box>/<minus35box>&/g"
put consensus sequence back in
cat infA-E.coli-K12.txt | sed "s/[ct]at[at]at/ <minus10box>&<\/minus10box> /g" | sed "s/................. <minus10/<\/minus35box> &/g" | sed "s/tt[gt]ac[at]<\/minus35box>/<minus35box>&/g"