import jalview.datamodel.ColumnSelection;
import jalview.datamodel.HiddenColumns;
import jalview.datamodel.HiddenSequences;
+import jalview.datamodel.ProfileI;
+import jalview.datamodel.Profiles;
import jalview.datamodel.ProfilesI;
import jalview.datamodel.SearchResultsI;
import jalview.datamodel.Sequence;
protected AlignmentAnnotation[] groupConservation;
- protected AlignmentAnnotation[] groupInformation;
+ protected List<AlignmentAnnotation> groupInformation = new ArrayList<>();
- protected AlignmentAnnotation information;
-
- /**
- * results of alignment information analysis for visible portion of view
- */
- protected ProfilesI hinformation = null;
+ protected List<AlignmentAnnotation> information = new ArrayList<>();
/**
* results of alignment consensus analysis for visible portion of view
*/
protected ProfilesI hconsensus = null;
+ protected List<ProfilesI> hinformation = new ArrayList<>();
+
/**
* results of cDNA complement consensus visible portion of view
*/
}
@Override
- public ProfilesI setSequenceInformationHash()
+ public void setSequenceInformationHashes(List<ProfilesI> info)
{
- return hinformation;
+ hinformation = info;
+ }
+
+ @Override
+ public void setSequenceInformationHash(ProfilesI info, int index)
+ {
+ hinformation.set(index, info);
}
@Override
- public ProfilesI getSequenceInformationHash()
+ public List<ProfilesI> getSequenceInformationHashes()
{
return hinformation;
}
@Override
+ public ProfilesI getSequenceInformationHash(int index)
+ {
+ return hinformation.get(index);
+ }
+
+ @Override
public Hashtable[] getComplementConsensusHash()
{
return hcomplementConsensus;
}
@Override
- public AlignmentAnnotation getAlignmentInformationAnnotation()
+ public List<AlignmentAnnotation> getInformationAnnotations()
{
return information;
}
@Override
+ public AlignmentAnnotation getInformationAnnotation(int index)
+ {
+ return information.get(index);
+ }
+
+
+ @Override
public AlignmentAnnotation getAlignmentGapAnnotation()
{
return gapcounts;
*/
public void updateInformation(final AlignmentViewPanel ap)
{
- if (information == null)
- {
- return;
- }
if (calculator
.getRegisteredWorkersOfClass(InformationThread.class) == null)
{
* defensively null out references to large objects in case
* this object is not garbage collected (as if!)
*/
- information = null;
consensus = null;
complementConsensus = null;
strucConsensus = null;
{
updateStrucConsensus(ap);
}
- if (information != null)
+ updateInformation(ap);
+
+ Map<Integer, SequenceI> hmmSequences;
+ hmmSequences = alignment.getHMMConsensusSequences(false);
+
+ for (Map.Entry<Integer, SequenceI> entry : hmmSequences.entrySet())
{
- updateInformation(ap);
+ SequenceI seq = entry.getValue();
+ seq.updateHMMMapping();
}
// Reset endRes of groups if beyond alignment width
rs.alignmentChanged(alignment, hiddenRepSequences);
rs.setConsensus(hconsensus);
- rs.setInformation(hinformation);
if (rs.conservationApplied())
{
rs.setConservation(Conservation.calculateConservation("All",
public void initInformation(SequenceI hmmSequence)
{
- information = new AlignmentAnnotation("Information",
+ AlignmentAnnotation information;
+ information = new AlignmentAnnotation(hmmSequence.getName(),
MessageManager.getString("label.information_description"),
new Annotation[1], 0f, 6.52f, AlignmentAnnotation.BAR_GRAPH);
information.hasText = true;
information.hasText = true;
information.autoCalculated = false;
information.sequenceRef = hmmSequence;
+ this.information.add(information);
+ hinformation.add(new Profiles(new ProfileI[1]));
alignment.addAnnotation(information);
}