String output = f.formatSequences(
format,
(Alignment) viewport.alignment, // class cast exceptions will occur in the distant future
- omitHidden, f.getCacheSuffixDefault(format));
+ omitHidden, f.getCacheSuffixDefault(format), viewport.colSel);
if (output == null)
{
cap.setText(new FormatAdapter().formatSequences(
e.getActionCommand(),
viewport.alignment,
- omitHidden));
+ omitHidden, viewport.colSel));
}
/**
return jalview.bin.Cache.getDefault(format.toUpperCase()+"_JVSUFFIX", true);
return false;
}
- public String formatSequences(String format, AlignmentI alignment, String[] omitHidden)
+ public String formatSequences(String format, AlignmentI alignment, String[] omitHidden, ColumnSelection colSel)
{
- return formatSequences(format, alignment, omitHidden, getCacheSuffixDefault(format));
+ return formatSequences(format, alignment, omitHidden, getCacheSuffixDefault(format), colSel);
}
/**
* hack function to replace seuqences with visible sequence strings before generating a
* string of the alignment in the given format.
* @param format
- * @param alignment
- * @param omitHidden sequence strings to write out in order of sequences in alignment
+ * @param alignment
+ * @param omitHidden sequence strings to write out in order of sequences in alignment
+ * @param colSel defines hidden columns that are edited out of annotation
* @return string representation of the alignment formatted as format
*/
- public String formatSequences(String format, AlignmentI alignment, String[] omitHidden, boolean suffix)
+ public String formatSequences(String format, AlignmentI alignment, String[] omitHidden, boolean suffix, ColumnSelection colSel)
{
AlignFile afile = null;
if (omitHidden!=null)
AlignmentAnnotation[] ala = alignment.getAlignmentAnnotation();
for (int i=0; i<ala.length; i++)
{
- alv.addAnnotation(new AlignmentAnnotation(ala[i]));
+ AlignmentAnnotation na = new AlignmentAnnotation(ala[i]);
+ colSel.makeVisibleAnnotation(na);
+ alv.addAnnotation(na);
}
return this.formatSequences(format, alv, suffix);
}