+ "GAMMA-TURN\tred|0,255,255|20.0|95.0|below|66.0\n"
+ "Pfam\tred\n"
+ "STARTGROUP\tuniprot\n"
+ + "Cath\tFER_CAPAA\t-1\t0\t0\tDomain\n" // non-positional feature
+ "Iron\tFER_CAPAA\t-1\t39\t39\tMETAL\n"
+ "Turn\tFER_CAPAA\t-1\t36\t38\tGAMMA-TURN\n"
+ "<html>Pfam domain<a href=\"http://pfam.xfam.org/family/PF00111\">Pfam_3_4</a></html>\tFER_CAPAA\t-1\t20\t20\tPfam\n"
featuresFile.parse(al.getDataset(), colours, false);
/*
- * first with no features displayed
+ * first with no features displayed, exclude non-positional features
*/
FeatureRenderer fr = af.alignPanel.getFeatureRenderer();
Map<String, FeatureColourI> visible = fr.getDisplayedFeatureCols();
String exported = featuresFile.printJalviewFormat(
- al.getSequencesArray(), visible);
+ al.getSequencesArray(), visible, true, false);
String expected = "No Features Visible";
assertEquals(expected, exported);
/*
+ * include non-positional features
+ */
+ af.getViewport().setShowNPFeats(true);
+ exported = featuresFile.printJalviewFormat(al.getSequencesArray(),
+ visible, true, true);
+ expected = "\nSTARTGROUP\tuniprot\nCath\tFER_CAPAA\t-1\t0\t0\tDomain\t0.0\nENDGROUP\tuniprot\n";
+ assertEquals(expected, exported);
+
+ /*
* set METAL (in uniprot group) and GAMMA-TURN visible, but not Pfam
*/
+ af.getViewport().setShowNPFeats(false);
fr.setVisible("METAL");
fr.setVisible("GAMMA-TURN");
visible = fr.getDisplayedFeatureCols();
exported = featuresFile.printJalviewFormat(al.getSequencesArray(),
- visible);
+ visible, true, false);
expected = "METAL\tcc9900\n"
+ "GAMMA-TURN\tff0000|00ffff|20.0|95.0|below|66.0\n"
+ "\nSTARTGROUP\tuniprot\n"
fr.setVisible("Pfam");
visible = fr.getDisplayedFeatureCols();
exported = featuresFile.printJalviewFormat(al.getSequencesArray(),
- visible);
+ visible, true, false);
/*
* note the order of feature types is uncontrolled - derives from
* FeaturesDisplayed.featuresDisplayed which is a HashSet