}
if (tests[0].perform() && sel5 != null) {
//Selector 5' end ligates to 5' end of self
if (isMatch(p, sel5, false, FIVE_PRIME_END)) {
ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(SELECTOR_SELF_LIGATION_5.getDescription(),
SELECTOR_SELF_LIGATION_5, Message.WARNING));
}
}
if (tests[1].perform() && sel3 != null) {
//Selector 3' end ligates to 3' end of self
if (isMatch(p, sel3, false, THREE_PRIME_END)) {
ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(SELECTOR_SELF_LIGATION_3.getDescription(),
SELECTOR_SELF_LIGATION_3, Message.WARNING));
}
}
if (tests[2].perform()) {
//Selector 5' end ligates to 5' end of target
Target t = p.getTarget();
if (t != null) {
if (t instanceof SelectorTarget) {
SelectorTarget it = (SelectorTarget) t;
if (Integer.parseInt(it.getVariant().getName()) > 0) {
if (isMatch(it, sel5, true, FIVE_PRIME_END)) {
ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(SELECTOR_TARGET_LIGATION_5.
getDescription(),
SELECTOR_TARGET_LIGATION_5,
Message.WARNING));
}
}
}
else {
ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(
"Could not perform ligation to target test: Incompatible target", //$NON-NLS-1$
SELECTOR_TARGET_LIGATION_5, Message.ALERT));
}
}
else {
ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(
"Could not perform ligation to target test: No target", //$NON-NLS-1$
SELECTOR_TARGET_LIGATION_5, Message.ALERT));
}
}
for (Iterator<? extends Probe> pi = probes.iterator(); pi.hasNext(); ) {
Probe other = pi.next();
NucleotideSequence other5;
NucleotideSequence other3;
try {
other5 = other.getTSSPair().getSequence(TSSPair.KEY_FIVE_PRIME);
}
catch (ClusterException e) {
other5 = null;
}
try {
other3 = other.getTSSPair().getSequence(TSSPair.KEY_THREE_PRIME);
}
catch (ClusterException e) {
other3 = null;
}
if (!other.equals(p)) {
if (tests[3].perform() && other5 != null) {
//Selector 5' end ligates to 5' end of other
if (isMatch(p, other5, false, FIVE_PRIME_END)) {
ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(SELECTOR_OTHER_LIGATION_5.getDescription() +
": " + other.getName(), //$NON-NLS-1$
SELECTOR_OTHER_LIGATION_5, Message.WARNING));
}
}
if (tests[4].perform() && other3 != null) {
//Selector 3' end ligates to 3' end of other
if (isMatch(p, other3, false, THREE_PRIME_END)) {
ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(SELECTOR_OTHER_LIGATION_3.getDescription() +
": " + other.getName(), //$NON-NLS-1$
SELECTOR_OTHER_LIGATION_3, Message.WARNING));
}
}
if (tests[5].perform() && sel5 != null) {
//Other selector 5' end ligates to 5' end of this
if (isMatch(other, sel5, false, FIVE_PRIME_END)) {
ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(SELECTOR_LIGATION_OTHER_5.getDescription() +
": " + other.getName(), //$NON-NLS-1$
SELECTOR_LIGATION_OTHER_5, Message.WARNING));
}
}
if (tests[6].perform() && sel3 != null) {
//Other selector 3' end ligates to 3' end of this
if (isMatch(other,sel3, false, THREE_PRIME_END)) {
ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(SELECTOR_LIGATION_OTHER_3.getDescription() +
": " + other.getName(), //$NON-NLS-1$
SELECTOR_LIGATION_OTHER_3, Message.WARNING));
}
}
if (tests[7].perform() && sel5 != null) {
ValidatingTarget t = (ValidatingTarget) other.getTarget();
if (t != null) {
if (t instanceof SelectorTarget) {
SelectorTarget it = (SelectorTarget) t;
if (isMatch(it, sel5, true, FIVE_PRIME_END)) {
ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(SELECTOR_TARGET_LIGATION_OTHER_5.
getDescription() + ": " + //$NON-NLS-1$
other.getName(),
SELECTOR_TARGET_LIGATION_OTHER_5,
Message.WARNING));
}
}
else {
ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(
"Could not perform ligation to target test: Incompatible target", //$NON-NLS-1$
SELECTOR_TARGET_LIGATION_OTHER_5, Message.ALERT));
}
}
else {
ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(
"Could not perform ligation to target test: No target", //$NON-NLS-1$
SELECTOR_TARGET_LIGATION_OTHER_5, Message.ALERT));
}
}
if (tests[8].perform() && sel3 != null) {
//Selector 3' end ligates to 3' end of other target
ValidatingTarget t = (ValidatingTarget) other.getTarget();
if (t != null) {
if (t instanceof SelectorTarget) {
SelectorTarget it = (SelectorTarget) t;
if (isMatch(it, sel3, true, THREE_PRIME_END)) {
ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(SELECTOR_TARGET_LIGATION_OTHER_3.
getDescription() + ": " + //$NON-NLS-1$
other.getName(),
SELECTOR_TARGET_LIGATION_OTHER_3,
Message.WARNING));
}
}
else {
ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(
"Could not perform ligation to target test: Incompatible target", //$NON-NLS-1$
SELECTOR_TARGET_LIGATION_OTHER_3, Message.ALERT));
}
}
else {
ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(
"Could not perform ligation to target test: No target", //$NON-NLS-1$
SELECTOR_TARGET_LIGATION_OTHER_3, Message.ALERT));
}
}
}