emarkis2,wepresenteachline
#ofthesequence,untilthelinebeginswith//#issuchcasewebrokethewhile}elsif($signal_good==2){lastif(
LINUX - 凯旋网络
本站关键字:凯旋网络 网站建设 网页设计 编程 Asp Php Css Html Xml .Net Access Mssql Mysql 脚本 代码本站内刊登的所有文章及图片信息 版权归原作所有 如有侵害您的版权 请联系凯旋网络删除
=~/^\/\//);print"
LINUX - 凯旋网络
本站关键字:凯旋网络 网站建设 网页设计 编程 Asp Php Css Html Xml .Net Access Mssql Mysql 脚本 代码本站内刊登的所有文章及图片信息 版权归原作所有 如有侵害您的版权 请联系凯旋网络删除
\n";}}#Whenweleftthewhileinstructionwecheckthemark
#ifnegativethatmeansthatwedon''tfindthechosensequence
#thatwillgiveusanerror
if(!$signal_good){print"ERROR:"."Sequencenotfound\n";}#Finally,weclosethefile#thatstillsiopen
close(db);exit;
查找氨基酸的模式(Searchforaminoacidpatterns) #!/usr/bin/perl#Searcherforaminoacidpatterns#Asktheuserthepatternsforsearchprint"Please,introducethepatterntosearchinquery.seq:";$patron=<STDIN>;chomp$patron;#Openthedatabasefile#butifitcan''titendstheprogramopen(query,"query_seq.txt")||die"problemopeningthefilequery_seq.txt\n";#LooklinebylinetheSWISS-PROTsequencewhile(<query>){chomp
LINUX - 凯旋网络
本站关键字:凯旋网络 网站建设 网页设计 编程 Asp Php Css Html Xml .Net Access Mssql Mysql 脚本 代码本站内刊登的所有文章及图片信息 版权归原作所有 如有侵害您的版权 请联系凯旋网络删除
;#WhenarrivestotheSQfield,putthemarkin1 if(
LINUX - 凯旋网络
本站关键字:凯旋网络 网站建设 网页设计 编程 Asp Php Css Html Xml .Net Access Mssql Mysql 脚本 代码本站内刊登的所有文章及图片信息 版权归原作所有 如有侵害您的版权 请联系凯旋网络删除
=~/^SQ/){ $signal_seq=1;#Whenarrivetotheendofsequence,leavethecurl #Checkthatthisexpressionisputbeforetocheck #themark=1,becausethislinedoesn''tbelongtotheaminoacidsequence }elsif(
LINUX - 凯旋网络
本站关键字:凯旋网络 网站建设 网页设计 编程 Asp Php Css Html Xml .Net Access Mssql Mysql 脚本 代码本站内刊登的所有文章及图片信息 版权归原作所有 如有侵害您的版权 请联系凯旋网络删除
=~/^\/\//){ last;#Checkthemarkifitisequalto1,ifpossitive #eliminatetheblankspacesinthesequenceline #andjoineverylineinanewvariable #Toconcatenate,wealsocando: #$secuencia_total.=
LINUX - 凯旋网络
本站关键字:凯旋网络 网站建设 网页设计 编程 Asp Php Css Html Xml .Net Access Mssql Mysql 脚本 代码本站内刊登的所有文章及图片信息 版权归原作所有 如有侵害您的版权 请联系凯旋网络删除
; }elsif($signal_seq==1){
LINUX - 凯旋网络
本站关键字:凯旋网络 网站建设 网页设计 编程 Asp Php Css Html Xml .Net Access Mssql Mysql 脚本 代码本站内刊登的所有文章及图片信息 版权归原作所有 如有侵害您的版权 请联系凯旋网络删除
=~s///g; $secuencia_total=$secuencia_total.
LINUX - 凯旋网络
本站关键字:凯旋网络 网站建设 网页设计 编程 Asp Php Css Html Xml .Net Access Mssql Mysql 脚本 代码本站内刊登的所有文章及图片信息 版权归原作所有 如有侵害您的版权 请联系凯旋网络删除
; } }#Nowcheckthesequence,collectedinitsentirety, #forthegivenpattern if($secuencia_total=~/$patron/){ print"Thesequencequery.seqcontainsthepattern$patron\n"; }else{ print"Thesequencequery.seqdoesn''tcontainsthepattern$patron\n"; }#Finallyweclosethefile #andleavetheprogram close(query); exit;如果想知道数据库里模式的具体位置,我们必须使用特殊变量`contentamp;'',这个变量在对正则表达式求值后仍然保存着找到的模式(应该将它放在`if($secuencia_total>=~/$patron>/一句的后面)。另外,可以将变量`
LINUX - 凯旋网络
LINUX
作者: 凯旋网络来源: 凯旋网络
''和`contentacute;''组合起来使用,它们会将找到的模式的左右位置的信息保存。将这些变量正确的加入前面的程序中,我们就可以给出模式的确切位置。注意:
length 也是非常有用的,它会给出一串数据的长度。
#Onlyweneedtochangetheifwherethepatternwasfound#Nowcheckthesequence,collectedinitsentirety, #forthegivenpattern #andcheckitspositioninthesequence if($secuencia_total=~/$patron/){ $posicion=length(
LINUX - 凯旋网络
LINUX
作者: 凯旋网络来源: 凯旋网络
) 1;
print"Thesequencequery_seq.txtcontainsthepattern$patroninthe
followingposition$posicion\n";}else{
print"Thesequencequery_seq.txtdoesn''tcontainsthepattern$patron\n";
}
计算氨基酸的频度(Calculusofaminoacidfrequences): 不同蛋白质里,特定的氨基酸出现的频度是不同的,这是因为他们处在不同的环境里面、并且功能不同。下面,我们给出一个例子来展示如何计算给定氨基酸序列里某种氨基酸频度。
#!/usr/bin/perl#Calculatesthefrequencyofaminoacidinaproteinicsequence#Getsthefilenamefromthecommandline#(SWISS-PROTformatted)#Alsocanbeaskedwithprintfromthe<STDIN>if(!$ARGV[0]){print"Theexecutionlineshallbe:program.plfile_swissprot\n";}$fichero=$ARGV[0];#Initializethevariable$erroresmy$errores=0;#Openthefileforreadingopen(FICHA,"$fichero")||die"problemopeningthefile$fichero\n";#Firstwecheckthesequenceasdidintheexample2while(<FICHA>){chomp
LINUX - 凯旋网络
本站关键字:凯旋网络 网站建设 网页设计 编程 Asp Php Css Html Xml .Net Access Mssql Mysql 脚本 代码本站内刊登的所有文章及图片信息 版权归原作所有 如有侵害您的版权 请联系凯旋网络删除
;if(
LINUX - 凯旋网络
本站关键字:凯旋网络 网站建设 网页设计 编程 Asp Php Css Html Xml .Net Access Mssql Mysql 脚本 代码本站内刊登的所有文章及图片信息 版权归原作所有 如有侵害您的版权 请联系凯旋网络删除
=~/^SQ/){$signal_good=1;}elsif($signal_good==1){lastif(
LINUX - 凯旋网络
本站关键字:凯旋网络 网站建设 网页设计 编程 Asp Php Css Html Xml .Net Access Mssql Mysql 脚本 代码本站内刊登的所有文章及图片信息 版权归原作所有 如有侵害您的版权 请联系凯旋网络删除
=~/^\/\//);
LINUX - 凯旋网络
本站关键字:凯旋网络 网站建设 网页设计 编程 Asp Php Css Html Xml .Net Access Mssql Mysql 脚本 代码本站内刊登的所有文章及图片信息 版权归原作所有 如有侵害您的版权 请联系凯旋网络删除
=~s/\s//g;$secuencia.=
LINUX - 凯旋网络
本站关键字:凯旋网络 网站建设 网页设计 编程 Asp Php Css Html Xml .Net Access Mssql Mysql 脚本 代码本站内刊登的所有文章及图片信息 版权归原作所有 如有侵害您的版权 请联系凯旋网络删除
;}}close(FICHA);#Nowuseacurlthatcheckseverypositionoftheaminoacid#inthesequence(fromafuncionofitsown,thatcanbeusedafterinother#programs)comprueba_aa($secuencia);#Printtheresultstothescreen#Firstthe20aminoacidsandthenthearraywiththeirfrequencies#Inthiscase''sort''can''tbeusedinforeach,#becausethearraycontainsthefrequencies(numbers)print"A\tC\tD\tE\tF\tG\tH\tI\tK\tL\tM\tN\tP\tQ\tR\tS\tT\tV\tW\tY\n";foreach$each_aa(@aa){print"$each_aa\t";}#Tenitgivesthepossibleerrors#andendstheprogramprint"\nerrores=$errores\n";exit;#Functions#Thisonecalculateseachaminoacidfrequency#fromaproteinicsequencesubcomprueba_aa{#Getsthesequencemy($secuencia)=@_;#andrunsaminoacidbyaminoacid,usingaforrunning#from0untilthesequencelengthfor($posicion=0;$posicion<length$secuencia;$posicion ){#Getstheaminoacid$aa=substr($secuencia,$posicion,1);#andcheckswhichoneisusingif#whenitischeckeditaggregates1tothecorrespondantfrequency#inanarrayusingapointerforeachone#orderedinalphabeticwayif($aaeq''A''){$aa[0] ;}elsif($aaeq''C''){$aa[1] ;}elsif($aaeq''D''){$aa[2] ;}elsif($aaeq''E''){$aa[3] ;}elsif($aaeq''F''){$aa[4] ;}elsif($aaeq''G''){$aa[5] ;}elsif($aaeq''H''){$aa[6] ;}elsif($aaeq''I''){$aa[7] ;}elsif($aaeq''K''){$aa[8] ;}elsif($aaeq''L''){$aa[9] ;}elsif($aaeq''M''){$aa[10] ;}elsif($aaeq''N''){$aa[11] ;}elsif($aaeq''P''){$aa[12] ;}elsif($aaeq''Q''){$aa[13] ;}elsif($aaeq''R''){$aa[14] ;}elsif($aaeq''S''){$aa[15] ;}elsif($aaeq''T''){$aa[16] ;}elsif($aaeq''V''){$aa[17] ;}elsif($aaeq''W''){$aa[18] ;}elsif($aaeq''Y''){$aa[19] ;#Iftheaminoacidisnotfound#itaggregates1totheerrors}else{print"ERROR:Aminoacidnotfound:$aa\n";$errores ;}}#Finallyreturnstothefrequencyarrayreturn@aa;}下面就让我们跟着大自然的步伐,看看细胞中的信息流向了何方。其中之一就是转录,RNA从DNA(基因)中复制出遗传信息,然后又将这些信息传递给蛋白质或者氨基酸序列。为此,我们必须使用与氨基酸对应的基因密码--所谓的RNA/DNA三联密码子。我们要提取Escherichiacoli(一种埃[舍利]希氏杆菌属的大肠杆菌) 的基因所对应的氨基酸序列,而这些信息都是以EMBL(EuropeanMolecularBiologyLaboratory)要求的格式。做完这些转换之后,我们将与已有的转录信息校验。对这个例子,非常有必要引进数组的关联变量(associativevariablesofarrays)和哈希表。
#!/usr/bin/perl#TranslatesanADNsequencefromanEMBLfiche#totheaminoacidcorrespondant#Getsthefilenamefromthecommandline#(SWISS-PROTformatted)#Alsocanbeaskedwithprintfromthe<STDIN>if(!$ARGV[0]){print"Theprogramlineshallbe:program.plficha_embl\n";}$fichero=$ARGV[0];#Openthefileforreadingopen(FICHA,"$fichero")||die"problemopeningthefile$fichero\n";#Firstwecheckthesequenceasdidintheexample2while(<FICHA>){chomp
LINUX - 凯旋网络
本站关键字:凯旋网络 网站建设 网页设计 编程 Asp Php Css Html Xml .Net Access Mssql Mysql 脚本 代码本站内刊登的所有文章及图片信息 版权归原作所有 如有侵害您的版权 请联系凯旋网络删除
;if(
LINUX - 凯旋网络
本站关键字:凯旋网络 网站建设 网页设计 编程 Asp Php Css Html Xml .Net Access Mssql Mysql 脚本 代码本站内刊登的所有文章及图片信息 版权归原作所有 如有侵害您的版权 请联系凯旋网络删除
=~/^FTCDS/){
LINUX - 凯旋网络
本站关键字:凯旋网络 网站建设 网页设计 编程 Asp Php Css Html Xml .Net Access Mssql Mysql 脚本 代码本站内刊登的所有文章及图片信息 版权归原作所有 如有侵害您的版权 请联系凯旋网络删除
=~tr/..//;($a1,$a2,$a3,$a4)=split("",