




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Liqi Gao,Text Operations,Utilities,C/C+ Library Perl (Active Perl) Regular Expression Edit Plus / Ultra Edit Excel,C/C+ Language,Standard library: Read a line Remove a CR or LF Split a line,C+ Boost Library Case Conversion Trimming Replace Algorithm Finding Algorithm Split,C/C+: Read a Line,Though i
2、ts simple, its useful! Three methods:,C/C+: Remove CR/LF,Get a line under Windows and Linux platform,C/C+: Remove CR/LF (cont.),The noising CR Carriage Return,C/C+: Split a Line,Split a line by a specific character,C/C+: Split a Line (cont.),Split a line,C+ Boost: Case Conversion,to_upper: Convert a
3、 string to upper case to_lower: Convert a string to lower case,C+ Boost: Trimming - variable assignment statement print “Hello world!n”; printf “All %d of you!n”, $x;,- function calls (output statements),perltaste.pl: Greet the entire world.,Scalar Values,Numerical Values integer:5, “3”, 0, -307 flo
4、ating point: 6.2e9, -4022.33 hexadecimal/octal:0 x0d4f, 0477 NOTE: all numerical values stored as floating-point numbers (usu. “double” precision),String Values,Double-quoted: interpolates (replaces variable name/control character with its value) Single-quoted: no interpolation done (as-is) Quoting
5、operators: qq/, qw/, etc.,$day = “Monday”; “Happy Monday!n”Happy Monday! “Happy $date!n”Happy Monday! Happy Monday!nHappy Monday! Happy $date!nHappy $date!n,String Manipulation,Concatenation $dna1 = “ACTGCGTAGC”; $dna2 = “CTTGCTAT”; juxtapose in a string assignment or print statement $new_dna = “$dn
6、a1$dna2”; Use the concatenation operator . $new_dna = $dna1 . $dna2; Add segments serially using incremental concatenation: $new_dna = $dna1; $new_dna .= $dna2; (shorthand for: $new_dna = $new_dna . $dna2;),Substitution,DNA transcription: T U Substitution operator s/: $dna = “GATTACATACACTGTTCA”; $r
7、na = $dna; $rna = s/T/U/;# “GAUUACAUACACUGUUCA” Exercise: Start with $dna =“gattACataCACTgttca”; and do the same as above. Print out $rna to the screen.,transcribe.pl:,$dna =“gattACataCACTgttca”; $rna = $dna; $rna = s/T/U/g; print DNA: $dnan; print RNA: $rnan;,Does it do what you expect? If not, why
8、 not?,Patterns in substitution are case-sensitive! What can we do? Convert all letters to upper (or lower) case (preferred when possible) If we want to retain mixed case, use transliteration operator tr/ $rna = tr/tT/uU/;,Case conversion,$string = “acCGtGcaTGc”; Upper case: $dna = uc($string);# “ACCGTGCATGC” or $dna = uc $string; or $dna = “U$string”; Lower case: $dna = lc($string);# “accgtgcatgc” or $dna = “L$string”; Sentence case: $dna = ucfirst($string) # “Accgtgcatgc” or $dna = “uL$string”;,Per
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 统编高中语文教材性别平等研究-以选文性别形象为例
- 深度教学理念视域下高中古代论说文阅读教学研究
- 含酰亚胺环邻苯二甲腈树脂的合成及胶粘剂的研究
- 医务管理培训课件
- 幼儿园健康安全小知识
- 刀刺伤护理措施及诊断
- 外伤处理健康教育
- 颈椎X线摄影技术课件
- 领域政策解读课件
- 《社会财务共享服务实务》课件-财务共享服务产生与发展
- DGJ08-81-2015 现有建筑抗震鉴定与加固规程
- 房屋租赁合同范本15篇
- 2025至2030年中国飞行控制器行业市场供需态势及未来趋势研判报告
- 2025年汽车维修工职业资格考试试卷及答案
- 安全B证题库-安全生产知识考试用书
- 2025至2030年中国锦氨纶汗布市场分析及竞争策略研究报告
- 2024年江苏地质局所属事业单位招聘考试真题
- 2025年湖北省中考物理试题(含答案及解析)
- 几何画板 培训课件
- 2025年中小学暑假安全教育主题家长会 课件
- 经皮肺动脉瓣置换术(TPVRPPVI)
评论
0/150
提交评论