Annotation[] annotations=new Annotation[al.getWidth()];
for (int j=0;j<jSize;j++) {
byte val = srow[j];
- annotations[j]=new Annotation(s==null ? ""+val:null,s==null ? ""+val:null,(char) val,val*1f,val >= 0 && val < colors.length ? colors[val] : Color.white);
+ if (s!=null && jalview.util.Comparison.isGap(s.getCharAt(j)))
+ {
+ annotations[j]=null;
+ if (val>0)
+ {
+ System.err.println("Warning: non-zero value for positional T-COFFEE score for gap at "+j+" in sequence "+s.getName());
+ }
+ } else {
+ annotations[j]=new Annotation(s==null ? ""+val:null,s==null ? ""+val:null,'\0',val*1f,val >= 0 && val < colors.length ? colors[val] : Color.white);
+ }
}
// this will overwrite any existing t-coffee scores for the alignment
AlignmentAnnotation aa=al.findOrCreateAnnotation(TCOFFEE_SCORE,false,s,null);
if (s!=null)
{
aa.label="T-COFFEE";
- aa.description="Score for "+id.getKey();
+ aa.description=""+id.getKey();
aa.annotations=annotations;
aa.visible=false;
aa.belowAlignment=false;
+ aa.createSequenceMapping(s, s.getStart(),true);
+ s.addAlignmentAnnotation(aa);
+ aa.adjustForAlignment();
} else {
aa.graph=AlignmentAnnotation.NO_GRAPH;
aa.label="T-COFFEE";
aa.visible=true;
}
aa.showAllColLabels=true;
- aa.setSequenceRef(s);
aa.validateRangeAndDisplay();
added=true;
}