Character allele = sequenceWithSNP.mid[allele_number];
EstimateAffinityMinPvalue affinity_calculator = new EstimateAffinityMinPvalue(pwm,
sequence,
pvalueCalculator,
positionsToCheck());
Position pos = affinity_calculator.bestPosition();
double pvalue = affinity_calculator.affinity();
Sequence word = sequence.substring(pos, pwm.length());
Position pos_centered = new Position(pos.position - sequenceWithSNP.left.length(), pos.directStrand);
return new RegionAffinityVariantInfo(pos_centered, allele, pvalue, word);
}