You can of course replace the >0 with another decision, such as >($1+$2+$3+$4)/10.while(<>) { /(\d+) (\d+) (\d+) (\d+).*/ and $dna= ($1>0?"a":"") . ($2>0?"t":"") . ($3>0?"g":"") . ($4>0?"c":""); }
In reply to Re: weighting regex patterns
by fundflow
in thread weighting regex patterns
by MadraghRua
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |