import static java.awt.Toolkit.*
-def curviewport = Jalview.getAlignframes()[Jalview.getAlignframes().length-1].getViewport();
+def curviewport = Jalview.getAlignFrames()[Jalview.getAlignFrames().length-1].getViewport();
// TSV output by default.
// change "\t" to "," to output CSV file
String csv=""
gaps.eachWithIndex{col,spos -> if (col>=selreg.getStartRes() && col<=selreg.getEndRes()) {
// add sequence for debugging
- if (count>sseq.length()) { sseq+=sep+selreg.getSequenceAt(0).getCharAt(col); count=sseq.length()+1;};
+ if (count>sseq.length()) {
+ sseq+=sep+selreg.getSequenceAt(0).getCharAt(col); count=sseq.length()+1;
+ };
// output height of histogram
- csv+=sep+aa.annotations[col].value;
+ csv+=sep;
+ def annot = aa.annotations[col];
+ if (annot != null) {
+ csv+=aa.annotations[col].value;
+ }
// Uncomment to output string shown in tooltip
// csv+=sep+aa.annotations[col].description;
}}