ArrayList<Position> positionsToCheck() {
return sequenceWithSNP.positions_subsequence_overlaps_snp(pwm.length());
}
public RegionAffinityVariantInfo affinityVariantInfo(int allele_number) throws HashOverflowException {
Sequence sequence = sequenceWithSNP.sequence_variants()[allele_number];
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);
}