*/
package jalview.io;
-import java.io.*;
-import java.net.*;
-import java.util.*;
-
-import jalview.analysis.*;
-import jalview.datamodel.*;
-import jalview.schemes.*;
+import jalview.analysis.Conservation;
+import jalview.api.AlignViewportI;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.Annotation;
+import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.GraphLine;
+import jalview.datamodel.HiddenSequences;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
+import jalview.schemes.ColourSchemeI;
+import jalview.schemes.ColourSchemeProperty;
+import jalview.schemes.ResidueProperties;
+import jalview.schemes.UserColourScheme;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.InputStreamReader;
+import java.io.StringReader;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.BitSet;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+import java.util.Vector;
public class AnnotationFile
{
}
/**
- * convenience method for pre-2.4 feature files which have no view, hidden
+ * convenience method for pre-2.9 annotation files which have no view, hidden
* columns or hidden row keywords.
*
* @param annotations
* @param list
* @param properties
- * @return feature file as a string.
+ * @return annotation file as a string.
*/
public String printAnnotations(AlignmentAnnotation[] annotations,
List<SequenceGroup> list, Hashtable properties)
{
// TODO: resolve views issue : annotationFile could contain visible region,
// or full data + hidden region specifications for a view.
+ if (views != null)
+ {
+ // are views defined and then annotation added to alignment or the other
+ // way around ?
+
+ }
if (annotations != null)
{
boolean oneColour = true;
}
if (row.hasScore())
+ {
text.append("\t" + row.score);
+ }
text.append(newline);
}
if (in != null)
{
- return parseAnnotationFrom(al, in);
+ return parseAnnotationFrom(al, colSel, in);
}
} catch (Exception ex)
private static String GRAPHLINE = "GRAPHLINE", COMBINE = "COMBINE";
- public boolean parseAnnotationFrom(AlignmentI al, BufferedReader in)
+ public boolean parseAnnotationFrom(AlignmentI al, ColumnSelection colSel,
+ BufferedReader in)
throws Exception
{
nlinesread = 0;
{
description = line;
if (st.hasMoreTokens())
+ {
line = st.nextToken();
+ }
}
if (st.hasMoreTokens())
(StringTokenizer) _deferred_args[1], // st
(SequenceI) _deferred_args[2], // refSeq
(_deferred_args[3] == null) ? null : groupRefLookup
- .get((String) _deferred_args[3]) // the reference
+ .get(_deferred_args[3]) // the reference
// group, or null
);
}
(StringTokenizer) _combine_args[0], // st
(SequenceI) _combine_args[1], // refSeq
(_combine_args[2] == null) ? null : groupRefLookup
- .get((String) _combine_args[2]) // the reference group,
+ .get(_combine_args[2]) // the reference group,
// or null
);
}