object.setVersion(jalview.bin.Cache.getDefault("VERSION",
"Development Build"));
- jalview.datamodel.AlignmentI jal = av.getAlignment();
+ /**
+ * rjal is full height alignment, jal is actual alignment with full metadata
+ * but excludes hidden sequences.
+ */
+ jalview.datamodel.AlignmentI rjal = av.getAlignment(), jal = rjal;
if (av.hasHiddenRows())
{
- jal = jal.getHiddenSequences().getFullAlignment();
+ rjal = jal.getHiddenSequences().getFullAlignment();
}
SequenceSet vamsasSet = new SequenceSet();
{
// switch jal and the dataset
jal = jal.getDataset();
+ rjal = jal;
}
}
if (jal.getProperties() != null)
Set<String> calcIdSet = new HashSet<String>();
// SAVE SEQUENCES
- for (int i = 0; i < jal.getHeight(); i++)
+ for (int i = 0; i < rjal.getHeight(); i++)
{
- final SequenceI jds = jal.getSequenceAt(i);
+ final SequenceI jds = rjal.getSequenceAt(i);
final SequenceI jdatasq = jds.getDatasetSequence() == null ? jds
: jds.getDatasetSequence();
String id = seqHash(jds);
// Store any sequences this sequence represents
if (av.hasHiddenRows())
{
+ // use rjal, contains the full height alignment
jseq.setHidden(av.getAlignment().getHiddenSequences()
.isHidden(jds));
- if (av.isHiddenRepSequence(jal.getSequenceAt(i)))
+ if (av.isHiddenRepSequence(rjal.getSequenceAt(i)))
{
jalview.datamodel.SequenceI[] reps = av
- .getRepresentedSequences(jal.getSequenceAt(i))
- .getSequencesInOrder(jal);
+ .getRepresentedSequences(rjal.getSequenceAt(i))
+ .getSequencesInOrder(rjal);
for (int h = 0; h < reps.length; h++)
{
- if (reps[h] != jal.getSequenceAt(i))
+ if (reps[h] != rjal.getSequenceAt(i))
{
- jseq.addHiddenSequences(jal.findIndex(reps[h]));
+ jseq.addHiddenSequences(rjal.findIndex(reps[h]));
}
}
}