List<FeatureStore> types = new ArrayList<>();
for (String theType : type)
{
- if (featureStore.containsKey(theType))
+ if (theType != null && featureStore.containsKey(theType))
{
types.add(featureStore.get(theType));
}
*/
boolean noFeaturesDisplayed()
{
+ if (featureRenderer == null)
+ {
+ return true;
+ }
AlignViewportI av = featureRenderer.getViewport();
if (av.isShowComplementFeatures())
{
return false;
}
- if (featureRenderer == null || !av.isShowSequenceFeatures())
+ if (!av.isShowSequenceFeatures())
{
return true;
}
setShowNPFeats(vs.isShowNPFeats());
setShowSequenceFeaturesHeight(vs.isShowSequenceFeaturesHeight());
setShowSequenceFeatures(vs.isShowSequenceFeatures());
+ setShowComplementFeatures(vs.isShowComplementFeatures());
setShowText(vs.getShowText());
setShowUnconserved(vs.getShowUnconserved());
setTextColour(vs.getTextColour());
&& isShowSequenceFeaturesHeight() == vs
.isShowSequenceFeaturesHeight()
&& isShowSequenceFeatures() == vs.isShowSequenceFeatures()
+ && isShowComplementFeatures() == vs.isShowComplementFeatures()
&& getShowText() == vs.getShowText()
&& getShowUnconserved() == vs.getShowUnconserved()
&& getThreshold() == vs.getThreshold()
assertFalse(iterator.hasNext());
/*
- * two types specified - get sorted alphabetically
+ * two types specified - order is preserved
*/
types = sf.varargToTypes("Metal", "Cath");
iterator = types.iterator();
assertTrue(iterator.hasNext());
- assertSame(iterator.next(), featureStores.get("Cath"));
- assertTrue(iterator.hasNext());
assertSame(iterator.next(), featureStores.get("Metal"));
+ assertTrue(iterator.hasNext());
+ assertSame(iterator.next(), featureStores.get("Cath"));
assertFalse(iterator.hasNext());
/*
expected = "METAL\tcc9900\n"
+ "GAMMA-TURN\tscore|ff0000|00ffff|noValueMin|20.0|95.0|below|66.0\n"
+ "\nSTARTGROUP\tuniprot\n"
- + "Turn\tFER_CAPAA\t-1\t36\t38\tGAMMA-TURN\t0.0\n"
+ "Iron\tFER_CAPAA\t-1\t39\t39\tMETAL\t0.0\n"
+ + "Turn\tFER_CAPAA\t-1\t36\t38\tGAMMA-TURN\t0.0\n"
+ "ENDGROUP\tuniprot\n";
assertEquals(expected, exported);
+ "Pfam\tff0000\n"
+ "GAMMA-TURN\tscore|ff0000|00ffff|noValueMin|20.0|95.0|below|66.0\n"
+ "\nSTARTGROUP\tuniprot\n"
- + "Turn\tFER_CAPAA\t-1\t36\t38\tGAMMA-TURN\t0.0\n"
+ "Iron\tFER_CAPAA\t-1\t39\t39\tMETAL\t0.0\n"
+ "<html>Pfam domain<a href=\"http://pfam.xfam.org/family/PF00111\">Pfam_3_4</a></html>\tFER_CAPAA\t-1\t20\t20\tPfam\t0.0\n"
+ + "Turn\tFER_CAPAA\t-1\t36\t38\tGAMMA-TURN\t0.0\n"
+ "ENDGROUP\tuniprot\n"
// null / empty group features output after features in named
// groups:
// Pfam feature columns include strand(+), phase(2), attributes
expected = gffHeader
+ "FER_CAPAA\tCath\tMETAL\t39\t39\t1.2\t.\t.\n"
- + "FER_CAPAN\ts3dm\tGAMMA-TURN\t36\t38\t2.1\t.\t.\n"
- + "FER_CAPAN\tUniprot\tPfam\t20\t20\t0.0\t+\t2\tx=y;black=white\n";
+ + "FER_CAPAN\tUniprot\tPfam\t20\t20\t0.0\t+\t2\tx=y;black=white\n"
+ + "FER_CAPAN\ts3dm\tGAMMA-TURN\t36\t38\t2.1\t.\t.\n";
assertEquals(expected, exported);
}