in reply to weighting regex patterns

Your question isn't clear but it seems like what you want is something like:
while(<>) { /(\d+) (\d+) (\d+) (\d+).*/ and $dna= ($1>0?"a":"") . ($2>0?"t":"") . ($3>0?"g":"") . ($4>0?"c":""); }
You can of course replace the >0 with another decision, such as >($1+$2+$3+$4)/10.