X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFormatAdapter.java;h=c2a317a01ffaea4da6cb5bb5b943f324bbc96fea;hb=77abb3fac2965a8966410cd77cd749c7c1dc6453;hp=3d33fae87a9e5e9d643943f6130606cf432ac26d;hpb=a8f483d04205bb8273ee311c12968b7e86d205fa;p=jalview.git
diff --git a/src/jalview/io/FormatAdapter.java b/src/jalview/io/FormatAdapter.java
index 3d33fae..c2a317a 100755
--- a/src/jalview/io/FormatAdapter.java
+++ b/src/jalview/io/FormatAdapter.java
@@ -6,18 +6,21 @@
*
* Jalview is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
*
* Jalview is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along with Jalview. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see .
* The Jalview Authors are detailed in the 'AUTHORS' file.
*/
package jalview.io;
+import jalview.api.AlignViewportI;
import jalview.datamodel.*;
/**
@@ -197,7 +200,8 @@ public class FormatAdapter extends AppletFormatAdapter
{
// TODO consider using AlignmentView to prune to visible region
// TODO prune sequence annotation and groups to visible region
- // TODO: JAL-1486 - set start and end for output correctly. basically, AlignmentView.getVisibleContigs does this.
+ // TODO: JAL-1486 - set start and end for output correctly. basically,
+ // AlignmentView.getVisibleContigs does this.
Alignment alv = new Alignment(replaceStrings(
alignment.getSequencesArray(), omitHidden));
AlignmentAnnotation[] ala = alignment.getAlignmentAnnotation();
@@ -244,4 +248,16 @@ public class FormatAdapter extends AppletFormatAdapter
}
return AppletFormatAdapter.isValidFormat(format, forwriting);
}
+
+ /**
+ * Create a flat file representation of a given view or selected region of a view
+ * @param format
+ * @param av
+ * @return String containing flat file
+ */
+ public String formatSequences(String format, AlignViewportI av, boolean selectedOnly)
+ {
+ return formatSequences(format, getCacheSuffixDefault(format), av, selectedOnly);
+ }
+
}