生物资讯程式设计实习(二)ppt课件_第1页
生物资讯程式设计实习(二)ppt课件_第2页
生物资讯程式设计实习(二)ppt课件_第3页
生物资讯程式设计实习(二)ppt课件_第4页
生物资讯程式设计实习(二)ppt课件_第5页
已阅读5页,还剩72页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

.,1,96-Summer生物資訊程式設計實習(二),BioinformaticswithPerl8/138/22蘇中才8/248/29張天豪8/31曾宇鳯,.,2,Schedule,.,3,ReferenceBooks,LearningPerl(Perl學習手冊)BeginningPerlforBioinformaticsBioinformaticsBiocomputingandPerl:AnIntroductiontoBioinformaticsComputingSkillsandPractice,.,4,.,5,LearningPerl,.,6,Perl,PracticalExtractionandReportLanguageCreatedbyLarryWallinthemiddle1980s.Suitablefor“quick-and-dirty”Suitableforstring-handlingPowerfulregularexpression,.,7,Preparation,Downloadingputty.exe/pietty.exeGettingmaterialsforthiscourse:.tw/sbb/summer-course/Server:ssh86Id:course1course20Password:,.,8,InstallingPerlonWindows,Downloadpackagefrom,.,9,TextEditors,Aconvenient(text)editorforprogrammingUltraedit:goodformeNotepad:justaneditorVim:UNIX/Linuxloverhttp:/lpi.indicator-.tw/u9106240/page_main/vim_menu.htmlJoe:easytouseforUnixbeginner,.,10,FindingHelp,BestresourcefindingtoolOn-lineResources,use//HTMLHelpinActivePerlCommandLine(highlyrecommended)perldocf#searchfunctionperldocq#searchFAQperldoc#searchmoduleperldocperldoc,.,11,PerlBasic,Starting,.,12,$viwelcome#!/usr/bin/perl-wprint“Hello,worldn”;$chmod+xwelcome$./welcomeHello,world$perlwelcomeHello,world,Program:runthyself!,.,13,#!/usr/bin/perl-w#Theforeverprogram-a(Perl)program,#whichdoesnotstopuntilsomeonepressesCtrl-C.useconstantTRUE=1;useconstantFALSE=0;while(TRUE)printWelcometotheWonderfulWorldofBioinformatics!n;sleep1;,UsingthePerlwhileconstruct,.,14,$chmod+xforever$./foreverWelcometotheWonderfulWorldofBioinformatics!WelcometotheWonderfulWorldofBioinformatics!WelcometotheWonderfulWorldofBioinformatics!WelcometotheWonderfulWorldofBioinformatics!WelcometotheWonderfulWorldofBioinformatics!WelcometotheWonderfulWorldofBioinformatics!WelcometotheWonderfulWorldofBioinformatics!WelcometotheWonderfulWorldofBioinformatics!WelcometotheWonderfulWorldofBioinformatics!.,Runningforever.,.,15,PerlBasic,Variables,.,16,Variables,Scalar($)Number1;1.23;12e34String“abc”;ABC;“Hello,world!”;Array/List()Hash(%),.,17,Introducingvariablecontainers,Thesimplesttypeofvariablecontaineristhescalar(純量).InPerl,scalarscanhold,forexample,anumber,aword,asentenceoradisk-file.,$name$_address$programming_101$z$abc$swissprot_to_interpro_mapping$SwissProt2InterProMapping,VariablenamingisART!,.,18,scalar,#!/usr/bin/perl-w#lowercaseforuserdefined;uppercaseforsystemdefaultmy$ARGV=“example.pl;my$number=1.2;my$string=Hello,world!;my$123=123;#errormy$abc=123;my$_123=123;my$O000OoO00=1;my$OO00Oo000=2;my$OO00OoOOO=3;$abc=$O000OoO00*$OO00Oo000-$OO00OoOOO;print$abcx4.n;print5x4.n;print5*4.n;,.,19,Number,Format(range:1e-1001e100?)20001.25-6.5e45(-6.5*1045)123456789123_456_789Otherformat0377#octal(decimal255)0 xFF#hexadecimal0b11111111#binary,.,20,number,$integer=12;$real=12.34;$oct=0377;$bin=0b11111111;$hex=0 xff;$long=123456789;$long_=123_456_789;$large=1E100;#1E200$small=1E-100;#1E-200printinteger:$integern;printreal:$realn;printoct=$octbin=$binhex=$hexn;#printf(oct=0%obin=0b%bhex=0 x%xn,$oct,$bin,$hex);,.,21,parametersofprintf(ref:number),.,22,operator,2+3#55.12.4#2.73*12#3614/2#710.2/0.3#3410/3#3.33310%3#1,.,23,Operator,$number=$number+100;,$number+=100;,.,24,Takeabreak,modulus10.5%3.2=?exponentiation23=?,.,25,string,FormatSinglequoteshellohellonhellohello,$nameDoublequotes“hello”“hellonhello”“hello,$name”Exceptions“”,#!/usr/bin/perlwprinthello;print“hello”;,.,26,Backslashescapes,.,27,conversionbetweenStringandnumber,$answer=“Hello”.“.“worldn”;$answer=“12”.“3”;$answer=“12”*“3”;$answer=“12Hello34”*“3”;#warning!$answer=“A”.3*5;$answer=“A”x(3*5);,$answer=“12”x”3”;,.,28,#!/usr/bin/perl-w#Thetentimesprogram-a(Perl)program,#whichstopsafterteniterations.useconstantHOWMANY=10;$count=0;while($count1;useconstantFALSE=0;useconstantHOWMANY=5;$count=0;while(TRUE)$count+;printWelcometotheWonderfulWorldofBioinformatics!n;if($count=HOWMANY)last;,UsingthePerlifconstruct,.,31,#!/usr/bin/perl-w#Theoddevenprogram.useconstantHOWMANY=4;$count=0;while($countThymine);,key,value,.,61,printTheexpandednameforAis$nucleotide_basesAn;TheexpandednameforAisAdenine,Workingwithhashentries,.,62,%nucleotide_bases=(A,Adenine,T,Thymine);hash_names=keys%nucleotide_bases;printThenamesinthe%nucleotide_baseshashare:hash_namesn;Thenamesinthe%nucleotide_baseshashare:AT%nucleotide_bases=(A,Adenine,T,Thymine);$hash_size=keys%nucleotide_bases;printThesizeofthe%nucleotide_baseshashis:$hash_sizen;Thesizeofthe%nucleotide_baseshashis:2,Howbigisthehash?,.,63,$nucleotide_basesG=Guanine;$nucleotide_basesC=Cytosine;%nucleotide_bases=(A=Adenine,T=Thymine,G=Guanine,C=Cytosine);,Addingentriestoahash,.,64,TheGrown%nucleotide_basesHash,.,65,delete$nucleotide_basesC;$nucleotide_basesC=undef;,Removingentriesfromahash,.,66,#!/usr/bin/perl-w#Theslicing_hashesprogramextractacertainsubsetamongahash%gene_counts=(Human=31000,Thalecress=26000,Nematodeworm=18000,Fruitfly=13000,Yeast=6000,Tuberculosismicrobe=4000);counts=gene_countsHuman,“Fruitfly”,Tuberculosismicrobe;printcountsn;,Slicinghashes,31000130004000,.,67,#!/usr/bin/perl-w#Thebasesprogram-ahashofthenucleotidebases.%nucleotide_bases=(A=Adenine,T=Thymine,G=Guanine,C=Cytosine);$sequence=CTATGCGGTA;printnThesequenceis$sequence,whichexpandsto:nn;while($sequence=/(.)/g)printt$nucleotide_bases$1n;,Workingwithhashentries:acompleteexample,.,68,ThesequenceisCTATGCGGTA,whichexpandsto:CytosineThymineAdenineThymineGuanineCytosineGuanineGuanineThymineAdenine,Resultsfrombases.,.,69,#!/usr/bin/perl-w#Thegenesprogram-ahashofgenecounts.useconstantLINE_LENGTH=60;%gene_counts=(Human=31000,Thalecress=26000,Nematodeworm=18000,Fruitfly=13000,Yeast=6000,Tuberculosismicrobe=4000);,Processingeveryentryinahash,.,70,print-xLINE_LENGTH,n;while($genome,$count)=each%gene_counts)print$genomehasagenecountof$countn;print-xLINE_LENGTH,n;foreach$genome(sortkeys%gene_counts)print$genomehasagenecountof$gene_counts$genomen;print-xLINE_LENGTH,n;,Thegenesprogram,cont.,.,71,-Humanhasagenecountof31000Tuberculosismicrobehasagenecountof4000Fruitflyhasagenecountof13000Nematodewormhasagenecountof18000Yeasthasagenecountof6000Thalecresshasagenecountof26000-Fruitflyhasagenecountof13000Humanhasagenecountof31000Nematodewormhasagenecountof18000Thalecresshasagenecountof26000Tuberculosismicrobehasagenecountof4000Yeasthasagenecountof6000-,Resultsfromgenes.,.,72,Howtosortbythevalues,?,.,73,Exercise,Proteinsequences,.,74,FASTAformat,P53_HUMAN(P04637)Cellulartumorantigenp53(Tumorsuppressorp53)(Phosphoproteinp53)(AntigenNY-CO-13)-Homosapiens(Human).MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEAPRMPEAAPPVAPAPAAPTPAAPAPAPSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRA

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论