git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into bug/JAL-2255_seq-fetcher-broken-on-linux
[jalview.git]
/
src
/
jalview
/
io
/
FeaturesFile.java
diff --git
a/src/jalview/io/FeaturesFile.java
b/src/jalview/io/FeaturesFile.java
index
73783e5
..
48eeee3
100755
(executable)
--- a/
src/jalview/io/FeaturesFile.java
+++ b/
src/jalview/io/FeaturesFile.java
@@
-35,11
+35,12
@@
import jalview.io.gff.GffHelperBase;
import jalview.io.gff.GffHelperFactory;
import jalview.io.gff.GffHelperI;
import jalview.schemes.FeatureColour;
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 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;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
@@
-94,12
+95,13
@@
public class FeaturesFile extends AlignFile implements FeaturesSourceI
* Constructor which does not parse the file immediately
*
* @param inFile
* Constructor which does not parse the file immediately
*
* @param inFile
- * @param type
+ * @param paste
* @throws IOException
*/
* @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);
}
/**
}
/**
@@
-119,7
+121,8
@@
public class FeaturesFile extends AlignFile implements FeaturesSourceI
* @param type
* @throws IOException
*/
* @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);
throws IOException
{
super(parseImmediately, inFile, type);
@@
-353,8
+356,8
@@
public class FeaturesFile extends AlignFile implements FeaturesSourceI
* Perhaps an old style groups file with no colours -
* synthesize a colour from the feature type
*/
* 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);
}
SequenceFeature sf = new SequenceFeature(ft, desc, "", startPos,
endPos, featureGroup);
@@
-710,7
+713,8
@@
public class FeaturesFile extends AlignFile implements FeaturesSourceI
dataset = new Alignment(new SequenceI[] {});
}
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
if (!parseResult)
{
// pass error up somehow
@@
-731,9
+735,10
@@
public class FeaturesFile extends AlignFile implements FeaturesSourceI
* @return error message
*/
@Override
* @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;
}
/**
}
/**