生物资讯程式设计实习

上传人:1537****568 文档编号:242872986 上传时间:2022-01-19 格式:PPT 页数:77 大小:355.50KB
返回 下载 相关 举报
生物资讯程式设计实习_第1页
第1页 / 共77页
生物资讯程式设计实习_第2页
第2页 / 共77页
生物资讯程式设计实习_第3页
第3页 / 共77页
生物资讯程式设计实习_第4页
第4页 / 共77页
生物资讯程式设计实习_第5页
第5页 / 共77页
点击查看更多>>
资源描述

《生物资讯程式设计实习》由会员分享,可在线阅读,更多相关《生物资讯程式设计实习(77页珍藏版)》请在金锄头文库上搜索。

1、*1按一下以編輯母片標題樣式按一下以編輯母片副標題樣式96-Summer生物資訊程式設計實習(二)Bioinformatics with Perl8/138/22 蘇中才8/248/29 張天豪8/31 曾宇鳯ScheduleDateTimeSubjectSpeaker8/13 一 13:3017:30 Perl Basics蘇中才8/15 三 13:3017:30 Programming Basics蘇中才8/17 五 13:3017:30 Regular expression蘇中才8/20 一 13:3017:30 Retrieving Data from Protein Sequence

2、 Database蘇中才8/22 三 13:3017:30 Perl combines with Genbank, BLAST蘇中才8/24 五 13:3017:30 PDB database and structure files張天豪8/27 一8:3012:30Extracting ATOM information張天豪8/27 一 13:3017:30 Mapping of Protein Sequence IDs and Structure IDs張天豪8/31五13:3017:30 Final and Examination曾宇鳳2Reference BooksnLearning

3、Perl(Perl 學習手冊)nBeginning Perl for BioinformaticsnBioinformatics Biocomputing and Perl: An Introduction to Bioinformatics Computing Skills and Practice34*5按一下以編輯母片標題樣式按一下以編輯母片副標題樣式Learning PerlPerlnPractical Extraction and Report LanguagenCreated by Larry Wall in the middle 1980s.nSuitable for “quic

4、k-and-dirty”nSuitable for string-handlingnPowerful regular expression6PreparationnDownloading / nGetting materials for this course: http:/gene.csie.ntu.edu.tw/sbb/summer-course/nServer: sshId : course1 course20Password:7Installing Perl on WindowsnDownload package fromhttp:/nVersions of PerlUnix, Lin

5、ux, Windows (ActivePerl), Mac (MacPerl)http:/8Text EditorsnA convenient (text) editor for programmingnUltraedit: good for menNotepad: just an editornVim: UNIX/Linux lovernJoe : easy to use for Unix beginner9Finding HelpnBest resource finding tool nOn-line Resources, usehttp:/http:/http:/nHTML Help i

6、n ActivePerlnCommand Line (highly recommended)perldoc f # search functionperldoc q # search FAQperldoc # search moduleperldoc perldoc10*11按一下以編輯母片標題樣式按一下以編輯母片副標題樣式Perl BasicStarting$ vi welcome#! /usr/bin/perl -wprint “Hello, worldn”;$ chmod +x welcome$ ./welcomeHello, world$ perl welcomeHello, worl

7、dProgram: run thyself!sbbgene perl$ ls -al-rw-rw-r- 1 sbb sbb 20 Jul 2 15:27 welcomesbbgene perl$ chmod +x welcomesbbgene perl$ ls -al-rwxrwxr-x 1 sbb sbb 20 Jul 2 15:27 welcome12#! /usr/bin/perl -w# The forever program - a (Perl) program,# which does not stop until someone presses Ctrl-C.use consta

8、nt TRUE = 1;use constant FALSE = 0;while ( TRUE ) print Welcome to the Wonderful World of Bioinformatics!n; sleep 1;Using the Perl while construct13$ chmod +x forever$ ./foreverWelcome to the Wonderful World of Bioinformatics!Welcome to the Wonderful World of Bioinformatics!Welcome to the Wonderful

9、World of Bioinformatics!Welcome to the Wonderful World of Bioinformatics!Welcome to the Wonderful World of Bioinformatics!Welcome to the Wonderful World of Bioinformatics!Welcome to the Wonderful World of Bioinformatics!Welcome to the Wonderful World of Bioinformatics!Welcome to the Wonderful World

10、of Bioinformatics!.Running forever . 14*15按一下以編輯母片標題樣式按一下以編輯母片副標題樣式Perl BasicVariablesVariablesnScalar ($)Numbern1; 1.23; 12e34Stringn“abc”; ABC ; “Hello, world!”;nArray / List ()nHash (%)16Introducing variable containersnThe simplest type of variable container is the scalar (純量).nIn Perl, scalars c

11、an hold, for example, a number, a word, a sentence or a disk-file.$name$_address$programming_101$z$abc$swissprot_to_interpro_mapping$SwissProt2InterProMappingVariable naming is ART !17scalar#!/usr/bin/perl -w# lower case for user defined ; upper case for system defaultmy $ARGV = “;my $number = 1.2;m

12、y $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 $abc x 4 . n;print 5 x 4 . n;print 5 * 4 . n;18NumbernFormat (range: 1e-100 1e100 ?)2000-6.5e45 (-6.5*1045)123456789123_4

13、56_789nOther format0377 #octal (decimal 255)0 xFF #hexadecimal0b11111111#binary19number$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-200print integer : $integern;print real : $realn;print oct=$oc

14、t bin=$bin hex=$hexn;#printf(oct=0%o bin=0b%b hex=0 x%xn,$oct,$bin,$hex);20parameters of printf (ref : number)specifierOutputExamplecCharacterad or iSigned decimal integer392eScientific notation (mantise/exponent) using e character3.9265e+2EScientific notation (mantise/exponent) using E character3.9

15、265E+2fDecimal floating point392.65gUse the shorter of %e or %f392.65GUse the shorter of %E or %f392.65oSigned octal610sString of characterssampleuUnsigned decimal integer7235xUnsigned hexadecimal integer7faXUnsigned hexadecimal integer (capital letters)7FApPointer addressB800:0000nNothing printed.

16、The argument must be a pointer to a signed int, where the number of characters written so far is stored.%A % followed by another % character will write % to stdout.21operatorn2 + 3#5n3 * 12#36n14 / 2#7n10.2 / 0.3#34n10 / 3#3.333n10 % 3#122OperatorOperatorFunction+Addition-Subtraction, Negative Numbers, Unary Negation*Multiplication/Division%Modulus*ExponentOperatorFunction=Normal Assignment+=Add and Assign-=Subtract and Assign*=Multiply and Assign/=Divide and Assign%=Modulus and Assign*=Exponent

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 商业/管理/HR > 企业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号