Advanced Perl for Bioinformatics.pptVIP

  • 18
  • 0
  • 约5.75千字
  • 约 22页
  • 2017-08-20 发布于江西
  • 举报
Advanced Perl for Bioinformatics.ppt

Advanced Perl for Bioinformatics Lecture 5 Regular expressions - review You can put the pattern you want to match between //, bind the pattern to the variable with =~, then use it within a conditional: if ($dna =~ /CAATTG/) {print “Eco RI\n”;} Square brackets within the match expression allow for alternative characters: if ($dna =~ /CAG[AT]CAG/) A vertical line means “or”; it allows you to look for either of two completely different patterns: if ($dna =~ /GAAT|ATTC/) Reading and writing files, review Open a file for reading: open INPUT,”/home/class30/input.txt”; Or writing open OUT

文档评论(0)

1亿VIP精品文档

相关文档