0
,因爲需要根據長度差異(693至 712)進行打印,如同在所有序列中提到的一樣。如果我輸入的長度爲 20應該只打印不同的序列20,如果我輸入的文本框的值爲20,並且下拉選擇大於它應該打印的長度匹配大於二十的匹配的長度。如何在文本框中打印指定輸入的長度爲
example.txt中
GGATCACGAGGTCAGGAGAT (693 TO 712) ATCTCCTGACCTCGTGATCC (3223 TO 3242)
CAAAAAAAAAAAAAAAAAAA (917 TO 936) TTTTTTTTTTTTTTTTTTTG (2998 TO 3017)
GAAACCCCGTCTCTACTAAAAATACAAAAAA (737 TO 767) TTTTTTGTATTTTTAGTAGAGACGGGGTTTC (3168 TO 3198)
perl的
#!usr/local/bin/perl
open(IN,"/home/httpd/cgi-bin/r/example.txt")|| die("Cannot open file");
while(<IN>)
{
if($_ =~ /^\w+\s+\((\d+)\s+[to]+\s+(\d+)\)/i)
{
$data=$_;
$num1=$1;
$num2=$2;
$diff=($num2-$num1)+1;
$str="a".$diff;
#print $str;
push(@$str,$data);
}
}