/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
import jalview.io.gff.GffHelperFactory;
import jalview.io.gff.GffHelperI;
import jalview.schemes.FeatureColour;
-import jalview.schemes.UserColourScheme;
+import jalview.util.ColorUtils;
import jalview.util.MapList;
import jalview.util.ParseHtmlBodyAndLinks;
import jalview.util.StringUtils;
+import java.awt.Color;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
* Constructor which does not parse the file immediately
*
* @param inFile
- * @param type
+ * @param paste
* @throws IOException
*/
- public FeaturesFile(String inFile, String type) throws IOException
+ public FeaturesFile(String inFile, DataSourceType paste)
+ throws IOException
{
- super(false, inFile, type);
+ super(false, inFile, paste);
}
/**
* @param type
* @throws IOException
*/
- public FeaturesFile(boolean parseImmediately, String inFile, String type)
+ public FeaturesFile(boolean parseImmediately, String inFile,
+ DataSourceType type)
throws IOException
{
super(parseImmediately, inFile, type);
*/
for (SequenceI newseq : newseqs)
{
- if (newseq.getSequenceFeatures() != null)
+ if (newseq.getFeatures().hasFeatures())
{
align.addSequence(newseq);
}
* Perhaps an old style groups file with no colours -
* synthesize a colour from the feature type
*/
- UserColourScheme ucs = new UserColourScheme(ft);
- featureColours.put(ft, new FeatureColour(ucs.findColour('A')));
+ Color colour = ColorUtils.createColourFromName(ft);
+ featureColours.put(ft, new FeatureColour(colour));
}
SequenceFeature sf = new SequenceFeature(ft, desc, "", startPos,
endPos, featureGroup);
dataset = new Alignment(new SequenceI[] {});
}
- boolean parseResult = parse(dataset, null, false, true);
+ Map<String, FeatureColourI> featureColours = new HashMap<String, FeatureColourI>();
+ boolean parseResult = parse(dataset, featureColours, false, true);
if (!parseResult)
{
// pass error up somehow
* @return error message
*/
@Override
- public String print()
+ public String print(SequenceI[] sqs, boolean jvsuffix)
{
- return "Use printGffFormat() or printJalviewFormat()";
+ System.out.println("Use printGffFormat() or printJalviewFormat()");
+ return null;
}
/**