import jalview.structure.StructureSelectionManager;
import jalview.structure.VamsasSource;
import jalview.util.Comparison;
+import jalview.util.MapList;
import jalview.util.MappingUtils;
import jalview.viewmodel.styles.ViewStyle;
import jalview.workers.AlignCalcManager;
*/
AlignedCodonFrame mapping = al.getCodonFrames().iterator().next();
// TODO hold mapping type e.g. dna-to-protein in AlignedCodonFrame?
- if (mapping.getdnaToProt()[0].getFromRatio() == 3)
+ MapList[] mapLists = mapping.getdnaToProt();
+ // mapLists can be empty if project load has not finished resolving seqs
+ if (mapLists.length > 0 && mapLists[0].getFromRatio() == 3)
{
if (calculator
.getRegisteredWorkersOfClass(ComplementConsensusThread.class) == null)
}
else
{
- iSize = alignment.getHeight();
- seqs = alignment.getSequencesArray();
- end = alignment.getWidth();
+ if (hasHiddenRows())
+ {
+ iSize = alignment.getHiddenSequences().getFullAlignment()
+ .getHeight();
+ seqs = alignment.getHiddenSequences().getFullAlignment()
+ .getSequencesArray();
+ end = alignment.getHiddenSequences().getFullAlignment().getWidth();
+ }
+ else
+ {
+ iSize = alignment.getHeight();
+ seqs = alignment.getSequencesArray();
+ end = alignment.getWidth();
+ }
}
selection = new String[iSize];
// fudge: check mappings are not protein-to-protein
// TODO: nicer
AlignedCodonFrame mapping = codonMappings.iterator().next();
- if (mapping.getdnaToProt()[0].getFromRatio() == 3)
+ MapList[] mapLists = mapping.getdnaToProt();
+ // mapLists can be empty if project load has not finished resolving seqs
+ if (mapLists.length > 0 && mapLists[0].getFromRatio() == 3)
{
complementConsensus = new AlignmentAnnotation("cDNA Consensus",
"PID for cDNA", new Annotation[1], 0f, 100f,
public boolean areFeaturesDisplayed()
{
return featuresDisplayed != null
- && featuresDisplayed.getRegisterdFeaturesCount() > 0;
+ && featuresDisplayed.getRegisteredFeaturesCount() > 0;
}
/**