// look for other sequences represented by this hit and create rep groups
// could be in "pdbs", or ..
addRedundantSeqGroup(firsthit, alisqfrom, alisqto,
- (JSONArray) hmmrhit.get("seqs"));
+ (JSONArray) hmmrhit.get("seqs"), true);
}
}
}
private void addRedundantSeqGroup(final SequenceI firsthit,
- long alisqfrom,
- long alisqto, JSONArray others)
+ long alisqfrom, long alisqto, JSONArray others, boolean justDelete)
{
if (others != null)
{
SequenceI[] other = resultAl.findSequenceMatch(repseq);
if (other != null && other.length > 0)
{
- int ofound = 0;
- for (SequenceI oth : other)
+ if (justDelete)
{
- if (oth.getStart() == alisqfrom && oth.getEnd() == alisqto)
+ for (SequenceI oth : other)
{
- ofound++;
- repgroup.addSequence(oth, false);
+ resultAl.deleteSequence(oth);
}
+ ;
}
- if (ofound == 0)
+ else
{
- System.err.println("Warn - no match for redundant hit "
- + repseq + "/" + alisqfrom + "-" + alisqto);
- }
- if (ofound > 1)
- {
- System.err.println("Warn - multiple matches for redundant hit "
- + repseq + "/" + alisqfrom + "-" + alisqto);
+ int ofound = 0;
+ for (SequenceI oth : other)
+ {
+ if (oth.getStart() == alisqfrom && oth.getEnd() == alisqto)
+ {
+ ofound++;
+ repgroup.addSequence(oth, false);
+ }
+ }
+ if (ofound == 0)
+ {
+ System.err.println("Warn - no match for redundant hit "
+ + repseq + "/" + alisqfrom + "-" + alisqto);
+ }
+ if (ofound > 1)
+ {
+ System.err
+ .println("Warn - multiple matches for redundant hit "
+ + repseq + "/" + alisqfrom + "-" + alisqto);
+ }
}
}
}