$FILE_NAME = $ARGV[0];
open(SearchFile,"<$FILE_NAME");
while(<SearchFile>){
chop $_;
@ary=split("=",$_);
if ($ary[0] eq "CD_p4_t7") {
$CD7 = $ary[1] ;
$CD7f = 1;
}
if ($ary[0] eq "CD_p4_t8") {
$CD8 = $ary[1] ;
$CD8f = 1;
}
if ($ary[0] eq "RETN_p11_t7") {
$RETN7 = $ary[1] ;
$RETN7f = 1;
}
if ($ary[0] eq "RETN_p11_t8") {
$RETN8 = $ary[1] ;
$RETN8f = 1;
}
if ($CD7f eq "1" && $CD8f eq "1" && $RETN7f eq "1" && $RETN8f eq "1") {
$CDtp = (($CD8 + $CD7)/2);
$RETNtp = (($RETN8 + $RETN7)/2);
$Constraint = ($CDtp -$RETNtp);
print "CD time point is $CDtp \n";
print "RETN time point is $RETNtp \n";
print "Alignment time is $Constraint \n";
$CD7f =0; $CD8f =0; $RETN7f=0; $RETN8f=0;
}
}
## Raw data
CD_p4_t7=1.5240779e-08
CD_p4_t8=1.5240939e-08
RETN_p11_t7=4.1999999e-10
RETN_p11_t8=4.9999999e-10
RETN_p11_t7=8.3999996e-13
RETN_p11_t8=9.9999995e-13
CD_p4_t7=1.5555811e-08
CD_p4_t8=1.5635811e-08
RETN_p11_t7=4.1999999e-10
RETN_p11_t8=4.9999999e-10
CD_p4_t7=2.6843051e-10
CD_p4_t8=2.6859051e-10
RETN_p11_t7=1.4861649e-10
RETN_p11_t8=1.4877649e-10
CD_p4_t7=4.1999999e-10
CD_p4_t8=4.9999999e-10
......
## Results
CD time point is 1.5240859e-08
RETN time point is 4.5999999e-10
Alignment time is 1.478085901e-08
CD time point is 1.5595811e-08
RETN time point is 9.19999955e-13
Alignment time is 1.5594891000045e-08
CD time point is 2.6851051e-10
RETN time point is 4.5999999e-10
Alignment time is -1.9148948e-10
沒有留言:
張貼留言