Code:
$
$ cat f17
4728.983333,AT1G54215,45.76,0,0,11.83,0,0,45.76,0,30.21,0,0,0,11.83,0,0,45.76,0,30.21,0,0,0
4289.164948,AT1G55670,66.73,0,24.76,0,0,0,66.73,0,11.83,0,8.75,24.76,0,0,66.73,0,11.83,0,8.75,0,0
259.141414,AT2G32690,19.93,0,0,0,0,0,19.93,0,0,0,0,0,0,0,0,19.93,0,0,0,0,0
4199.354839,AT1G75550,54.09,54.09,0,11.83,0,0,31.62,0,0,0,0,0,11.83,0,0,31.62,0,0,0,0,0
66.010753,AT2G34430,10.77,0,10.77,0,0,0,3.13,0,0,0,0,0,0,0,3.13,0,0,0,0,0,0
$
$
$ perl -lne '@x = split /,/;
for ($i=0; $i<$#x; $i++) {$x[$i-1]=300 if $x[$i] =~ /^AT/ and $x[$i-1] > 300};
print join ",",@x
' f17
300,AT1G54215,45.76,0,0,11.83,0,0,45.76,0,30.21,0,0,0,11.83,0,0,45.76,0,30.21,0,0,0
300,AT1G55670,66.73,0,24.76,0,0,0,66.73,0,11.83,0,8.75,24.76,0,0,66.73,0,11.83,0,8.75,0,0
259.141414,AT2G32690,19.93,0,0,0,0,0,19.93,0,0,0,0,0,0,0,0,19.93,0,0,0,0,0
300,AT1G75550,54.09,54.09,0,11.83,0,0,31.62,0,0,0,0,0,11.83,0,0,31.62,0,0,0,0,0
66.010753,AT2G34430,10.77,0,10.77,0,0,0,3.13,0,0,0,0,0,0,0,3.13,0,0,0,0,0,0
$
$