Difference between revisions of "Talk:Bklein7 Week 4"

From LMU BioDB 2015
Jump to: navigation, search
(Added link to slides presented in 9/22 lecture)
 
m (added note to preliminary code section)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 +
==Notes==
 
*9/22- Slides from lecture can be found [https://mylmuconnect.lmu.edu/bbcswebdav/pid-1146580-dt-content-rid-1944592_1/courses/M_46692.201530/20150922_HGP_IntroBiolDB.pdf here].
 
*9/22- Slides from lecture can be found [https://mylmuconnect.lmu.edu/bbcswebdav/pid-1146580-dt-content-rid-1944592_1/courses/M_46692.201530/20150922_HGP_IntroBiolDB.pdf here].
 +
==Preliminary Code==
 +
  sed "s/tt[gt]ac[at]/<minus35box>&<\/minux35box>\n/1" infA-E.coli-K12.txt | sed -r "2s/^.   
 +
  {17}/&<minus10box>/g" | sed "s/<minus10box>....../&<\/minus10box/g" | sed -r
 +
  "s/<\/minus10box>.{11}/&<tss>/g" | sed "s/<tss>./&<\/tss/g" | sed "s/gagg/<rbs>&<\/rbs>\n/g"
 +
  | sed "3s/atg/<start_codon>&<\/start_codon>\n/1" | sed "s/aaaaggt/\n<terminator>&/g" | sed -
 +
  r "s/aaaaggt.*gcctttt.{4}/&<\/terminator>/g" | sed "4s/.../& /g" | sed -r
 +
  "4s/taa|tag|tga/<stop_codon>&<\/stop_codon>/g" | sed "4s/ //g" | sed ':a;N;$!ba;s/\n//g'
 +
*String together redundant sed commands with ; or find a way to make them more compact
 +
*Verify when the terminator sequence starts
 +
*Is there a way to count backwards in a line with sed? or so replace only the last instance that matches? previous experiments
 +
**sed "s/x.*$/y/g" - does not work, wild card overtakes the last instance
 +
**sed "s/x/y/1$" - does not work
 +
**answer: use rev commands!

Latest revision as of 18:40, 28 September 2015

Notes

  • 9/22- Slides from lecture can be found here.

Preliminary Code

 sed "s/tt[gt]ac[at]/<minus35box>&<\/minux35box>\n/1" infA-E.coli-K12.txt | sed -r "2s/^.    
 {17}/&<minus10box>/g" | sed "s/<minus10box>....../&<\/minus10box/g" | sed -r 
 "s/<\/minus10box>.{11}/&<tss>/g" | sed "s/<tss>./&<\/tss/g" | sed "s/gagg/<rbs>&<\/rbs>\n/g" 
 | sed "3s/atg/<start_codon>&<\/start_codon>\n/1" | sed "s/aaaaggt/\n<terminator>&/g" | sed -
 r "s/aaaaggt.*gcctttt.{4}/&<\/terminator>/g" | sed "4s/.../& /g" | sed -r 
 "4s/taa|tag|tga/<stop_codon>&<\/stop_codon>/g" | sed "4s/ //g" | sed ':a;N;$!ba;s/\n//g'
  • String together redundant sed commands with ; or find a way to make them more compact
  • Verify when the terminator sequence starts
  • Is there a way to count backwards in a line with sed? or so replace only the last instance that matches? previous experiments
    • sed "s/x.*$/y/g" - does not work, wild card overtakes the last instance
    • sed "s/x/y/1$" - does not work
    • answer: use rev commands!