X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFormatAdapter.java;h=3cbd73b7dcddc0c75b007f6c899988a808d09b03;hb=ce886100c1eae01eac7d59c961e694f4493d4bcb;hp=6c40696a6310902d14c9a754cdc6c581ca4527e0;hpb=3ffe37a03a353140f7bf2b34e4617860aca28f22;p=jalview.git diff --git a/src/jalview/io/FormatAdapter.java b/src/jalview/io/FormatAdapter.java index 6c40696..3cbd73b 100755 --- a/src/jalview/io/FormatAdapter.java +++ b/src/jalview/io/FormatAdapter.java @@ -119,6 +119,13 @@ public class FormatAdapter afile.addJVSuffix( jalview.bin.Cache.getDefault("PFAM_JVSUFFIX", true)); } + /* amsa is not supported by this function - it requires an alignment rather than a sequence vector + else if (format.equalsIgnoreCase("AMSA")) + { + afile = new AMSAFile(); + afile.addJVSuffix( + jalview.bin.Cache.getDefault("AMSA_JVSUFFIX", true)); + }*/ afile.setSeqs(seqs); @@ -139,21 +146,31 @@ public class FormatAdapter 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), colSel, null); + } + public String formatSequences(String format, AlignmentI alignment, String[] omitHidden, ColumnSelection colSel, SequenceGroup sgp) { - return formatSequences(format, alignment, omitHidden, getCacheSuffixDefault(format)); + return formatSequences(format, alignment, omitHidden, getCacheSuffixDefault(format), colSel, sgp); } /** * 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) + { + return formatSequences(format, alignment, omitHidden, suffix, colSel, null); + } + + public String formatSequences(String format, AlignmentI alignment, String[] omitHidden, boolean suffix, + ColumnSelection colSel, jalview.datamodel.SequenceGroup selgp) { - AlignFile afile = null; if (omitHidden!=null) { // @@ -161,7 +178,14 @@ public class FormatAdapter AlignmentAnnotation[] ala = alignment.getAlignmentAnnotation(); for (int i=0; i