Pfam dc206a
PHOSPHORYLATION (S) b974a5
PHOSPHORYLATION (Y) 7d3881
-Cath 93b1d2
+Cath 93b1d1
ASX-TURN-IR 4ccc6e
BETA-BULGE-LOOP-5 4066da
CATMAT-4 4dc465
ST-MOTIF ac25a1
STARTGROUP uniprot
-Iron-sulfur (2Fe-2S) FER_CAPAA -1 39 39 METAL
-Iron-sulfur (2Fe-2S) FER_CAPAA -1 44 44 METAL
-Iron-sulfur (2Fe-2S) FER_CAPAA -1 47 47 METAL
-Iron-sulfur (2Fe-2S) FER_CAPAA -1 77 77 METAL
+Iron-sulfur (2Fe-2S) FER_CAPAA -1 39 39 METAL
+Iron-sulfur (2Fe-2S) FER_CAPAA -1 44 44 METAL
+Iron-sulfur (2Fe-2S) FER_CAPAA -1 47 47 METAL
+Iron-sulfur (2Fe-2S) FER_CAPAA -1 77 77 METAL
<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 8_8</a></html> FER_CAPAA -1 8 83 Pfam
Ferredoxin_fold Status: True Positive FER_CAPAA -1 3 93 Cath
-Iron-sulfur (2Fe-2S) FER_CAPAN -1 86 86 METAL
-Iron-sulfur (2Fe-2S) FER_CAPAN -1 91 91 METAL
-Iron-sulfur (2Fe-2S) FER_CAPAN -1 94 94 METAL
-Iron-sulfur (2Fe-2S) FER_CAPAN -1 124 124 METAL
+Iron-sulfur (2Fe-2S) FER_CAPAN -1 86 86 METAL
+Iron-sulfur (2Fe-2S) FER_CAPAN -1 91 91 METAL
+Iron-sulfur (2Fe-2S) FER_CAPAN -1 94 94 METAL
+Iron-sulfur (2Fe-2S) FER_CAPAN -1 124 124 METAL
<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 55_13</a></html> FER_CAPAN -1 55 130 Pfam
Ferredoxin_fold Status: True Positive FER_CAPAN -1 45 140 Cath
-Iron-sulfur (2Fe-2S) FER1_SOLLC -1 86 86 METAL
-Iron-sulfur (2Fe-2S) FER1_SOLLC -1 91 91 METAL
-Iron-sulfur (2Fe-2S) FER1_SOLLC -1 94 94 METAL
-Iron-sulfur (2Fe-2S) FER1_SOLLC -1 124 124 METAL
+Iron-sulfur (2Fe-2S) FER1_SOLLC -1 86 86 METAL
+Iron-sulfur (2Fe-2S) FER1_SOLLC -1 91 91 METAL
+Iron-sulfur (2Fe-2S) FER1_SOLLC -1 94 94 METAL
+Iron-sulfur (2Fe-2S) FER1_SOLLC -1 124 124 METAL
<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 55_13</a></html> FER1_SOLLC -1 55 130 Pfam
Ferredoxin_fold Status: True Positive FER1_SOLLC -1 45 140 Cath
<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 55_13</a></html> Q93XJ9_SOLTU -1 55 130 Pfam
Ferredoxin_fold Status: True Positive Q93XJ9_SOLTU -1 45 140 Cath
-Iron-sulfur (2Fe-2S) FER1_PEA -1 91 91 METAL
-Iron-sulfur (2Fe-2S) FER1_PEA -1 96 96 METAL
-Iron-sulfur (2Fe-2S) FER1_PEA -1 99 99 METAL
-Iron-sulfur (2Fe-2S) FER1_PEA -1 129 129 METAL
+Iron-sulfur (2Fe-2S) FER1_PEA -1 91 91 METAL
+Iron-sulfur (2Fe-2S) FER1_PEA -1 96 96 METAL
+Iron-sulfur (2Fe-2S) FER1_PEA -1 99 99 METAL
+Iron-sulfur (2Fe-2S) FER1_PEA -1 129 129 METAL
<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 60_13</a></html> FER1_PEA -1 60 135 Pfam
Ferredoxin_fold Status: True Positive FER1_PEA -1 50 145 Cath
<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 63_13</a></html> Q7XA98_TRIPR -1 63 138 Pfam
Ferredoxin_fold Status: True Positive Q7XA98_TRIPR -1 53 148 Cath
-Iron-sulfur (2Fe-2S) FER1_MESCR -1 90 90 METAL
-Iron-sulfur (2Fe-2S) FER1_MESCR -1 95 95 METAL
-Iron-sulfur (2Fe-2S) FER1_MESCR -1 98 98 METAL
-Iron-sulfur (2Fe-2S) FER1_MESCR -1 128 128 METAL
+Iron-sulfur (2Fe-2S) FER1_MESCR -1 90 90 METAL
+Iron-sulfur (2Fe-2S) FER1_MESCR -1 95 95 METAL
+Iron-sulfur (2Fe-2S) FER1_MESCR -1 98 98 METAL
+Iron-sulfur (2Fe-2S) FER1_MESCR -1 128 128 METAL
<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 59_13</a></html> FER1_MESCR -1 59 134 Pfam
Ferredoxin_fold Status: True Positive FER1_MESCR -1 49 144 Cath
-Iron-sulfur (2Fe-2S) FER1_SPIOL -1 89 89 METAL
-Iron-sulfur (2Fe-2S) FER1_SPIOL -1 94 94 METAL
-Iron-sulfur (2Fe-2S) FER1_SPIOL -1 97 97 METAL
-Iron-sulfur (2Fe-2S) FER1_SPIOL -1 127 127 METAL
+Iron-sulfur (2Fe-2S) FER1_SPIOL -1 89 89 METAL
+Iron-sulfur (2Fe-2S) FER1_SPIOL -1 94 94 METAL
+Iron-sulfur (2Fe-2S) FER1_SPIOL -1 97 97 METAL
+Iron-sulfur (2Fe-2S) FER1_SPIOL -1 127 127 METAL
<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 58_13</a></html> FER1_SPIOL -1 58 133 Pfam
Ferredoxin_fold Status: True Positive FER1_SPIOL -1 48 143 Cath
-Iron-sulfur (2Fe-2S) FER3_RAPSA -1 39 39 METAL
-Iron-sulfur (2Fe-2S) FER3_RAPSA -1 44 44 METAL
-Iron-sulfur (2Fe-2S) FER3_RAPSA -1 47 47 METAL
-Iron-sulfur (2Fe-2S) FER3_RAPSA -1 77 77 METAL
+Iron-sulfur (2Fe-2S) FER3_RAPSA -1 39 39 METAL
+Iron-sulfur (2Fe-2S) FER3_RAPSA -1 44 44 METAL
+Iron-sulfur (2Fe-2S) FER3_RAPSA -1 47 47 METAL
+Iron-sulfur (2Fe-2S) FER3_RAPSA -1 77 77 METAL
<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 8_8</a></html> FER3_RAPSA -1 8 83 Pfam
Ferredoxin_fold Status: True Positive FER3_RAPSA -1 3 93 Cath
-Iron-sulfur (2Fe-2S) FER_BRANA -1 39 39 METAL
-Iron-sulfur (2Fe-2S) FER_BRANA -1 44 44 METAL
-Iron-sulfur (2Fe-2S) FER_BRANA -1 47 47 METAL
-Iron-sulfur (2Fe-2S) FER_BRANA -1 77 77 METAL
+Iron-sulfur (2Fe-2S) FER_BRANA -1 39 39 METAL
+Iron-sulfur (2Fe-2S) FER_BRANA -1 44 44 METAL
+Iron-sulfur (2Fe-2S) FER_BRANA -1 47 47 METAL
+Iron-sulfur (2Fe-2S) FER_BRANA -1 77 77 METAL
<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 8_8</a></html> FER_BRANA -1 8 83 Pfam
Ferredoxin_fold Status: True Positive FER_BRANA -1 2 96 Cath
-Iron-sulfur (2Fe-2S) FER2_ARATH -1 91 91 METAL
-Iron-sulfur (2Fe-2S) FER2_ARATH -1 96 96 METAL
-Iron-sulfur (2Fe-2S) FER2_ARATH -1 99 99 METAL
-Iron-sulfur (2Fe-2S) FER2_ARATH -1 129 129 METAL
+Iron-sulfur (2Fe-2S) FER2_ARATH -1 91 91 METAL
+Iron-sulfur (2Fe-2S) FER2_ARATH -1 96 96 METAL
+Iron-sulfur (2Fe-2S) FER2_ARATH -1 99 99 METAL
+Iron-sulfur (2Fe-2S) FER2_ARATH -1 129 129 METAL
<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 60_13</a></html> FER2_ARATH -1 60 135 Pfam
Ferredoxin_fold Status: True Positive FER2_ARATH -1 50 145 Cath
<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 60_11</a></html> Q93Z60_ARATH -1 60 118 Pfam
Ferredoxin_fold Status: True Positive Q93Z60_ARATH -1 52 118 Cath
-Iron-sulfur (2Fe-2S) FER1_MAIZE -1 91 91 METAL
-Iron-sulfur (2Fe-2S) FER1_MAIZE -1 96 96 METAL
-Iron-sulfur (2Fe-2S) FER1_MAIZE -1 99 99 METAL
-Iron-sulfur (2Fe-2S) FER1_MAIZE -1 129 129 METAL
+Iron-sulfur (2Fe-2S) FER1_MAIZE -1 91 91 METAL
+Iron-sulfur (2Fe-2S) FER1_MAIZE -1 96 96 METAL
+Iron-sulfur (2Fe-2S) FER1_MAIZE -1 99 99 METAL
+Iron-sulfur (2Fe-2S) FER1_MAIZE -1 129 129 METAL
<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 60_13</a></html> FER1_MAIZE -1 60 135 Pfam
Ferredoxin_fold Status: True Positive FER1_MAIZE -1 50 145 Cath
<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 52_12</a></html> O80429_MAIZE -1 52 127 Pfam
* - process html strings into plain text
* @return true if features were added
*/
- public boolean parse(AlignmentI align, Hashtable colours,
+ public boolean parse(AlignmentI align, Map colours,
boolean removeHTML)
{
return parse(align, colours, null, removeHTML, false);
@Override
public Map<String, Object> getFeatureColours()
{
- return new ConcurrentHashMap<String, Object>(featureColours);
+ return featureColours;
}
/**
import jalview.ws.JobStateSummary;
import jalview.ws.WSClientI;
+import java.util.HashMap;
import java.util.Hashtable;
+import java.util.Map;
import java.util.Vector;
import vamsas.objects.simple.MsaResult;
*
* @return null or { Alignment(+features and annotation), NewickFile)}
*/
- public Object[] getAlignment(Alignment dataset, Hashtable featureColours)
+ public Object[] getAlignment(Alignment dataset, Map featureColours)
{
if (result != null && result.isFinished())
// NewickFile nf[] = new NewickFile[jobs.length];
for (int j = 0; j < jobs.length; j++)
{
- Hashtable featureColours = new Hashtable();
+ Map featureColours = new HashMap();
Alignment al = null;
NewickFile nf = null;
if (jobs[j].hasResults())
--- /dev/null
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
+package jalview.io;
+
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
+
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.SequenceFeature;
+import jalview.gui.AlignFrame;
+
+import java.awt.Color;
+import java.io.File;
+import java.io.IOException;
+import java.util.Map;
+
+import org.testng.annotations.Test;
+
+public class FeaturesFileTest
+{
+
+ static String TestFiles[][] = {
+ { "Test example features import/export",
+ "examples/uniref50.fa", "examples/exampleFeatures.txt" } };
+
+ @Test(groups = { "Functional" })
+ public void testParse() throws Exception
+ {
+ testFeaturesFileIO("Features file test");
+ }
+
+ public static AlignmentI readAlignmentFile(File f) throws IOException
+ {
+ System.out.println("Reading file: " + f);
+ String ff = f.getPath();
+ FormatAdapter rf = new FormatAdapter();
+
+ AlignmentI al = rf.readFile(ff, AppletFormatAdapter.FILE,
+ new IdentifyFile().Identify(ff, AppletFormatAdapter.FILE));
+
+ al.setDataset(null); // creates dataset sequences
+ assertNotNull("Couldn't read supplied alignment data.", al);
+ return al;
+ }
+
+ /**
+ * Helper method for testing
+ *
+ * @param testname
+ * @param f
+ * alignment file
+ * @param featFile
+ * features file to load on to the alignment
+ * @throws IOException
+ */
+ public static void testFeaturesFileIO(String testname) throws IOException
+ {
+ File f = new File("examples/uniref50.fa");
+ AlignmentI al = readAlignmentFile(f);
+ AlignFrame af = new AlignFrame(al, 500, 500);
+ Map<String, Object> colours = af.getFeatureRenderer()
+ .getFeatureColours();
+ FeaturesFile featuresFile = new FeaturesFile(
+ "examples/exampleFeatures.txt", FormatAdapter.FILE);
+ assertTrue("Test " + testname + "\nFailed to parse features file.",
+ featuresFile.parse(al.getDataset(), colours, true));
+
+ /*
+ * Refetch the colour map from the FeatureRenderer (to confirm it has been
+ * updated - JAL-1904), and verify (some) feature group colours
+ */
+ colours = af.getFeatureRenderer().getFeatureColours();
+ assertEquals("26 feature group colours not found", 26, colours.size());
+ assertEquals(colours.get("Cath"), new Color(0x93b1d1));
+ assertEquals(colours.get("ASX-MOTIF"), new Color(0x6addbb));
+
+ /*
+ * verify (some) features on sequences
+ */
+ SequenceFeature[] sfs = al.getSequenceAt(0).getDatasetSequence()
+ .getSequenceFeatures(); // FER_CAPAA
+ assertEquals(7, sfs.length);
+ SequenceFeature sf = sfs[0];
+ assertEquals("Iron-sulfur (2Fe-2S)", sf.description);
+ assertEquals(39, sf.begin);
+ assertEquals(39, sf.end);
+ assertEquals("uniprot", sf.featureGroup);
+ assertEquals("METAL", sf.type);
+ sf = sfs[1];
+ assertEquals("Iron-sulfur (2Fe-2S)", sf.description);
+ assertEquals(44, sf.begin);
+ assertEquals(44, sf.end);
+ assertEquals("uniprot", sf.featureGroup);
+ assertEquals("METAL", sf.type);
+ sf = sfs[2];
+ assertEquals("Iron-sulfur (2Fe-2S)", sf.description);
+ assertEquals(47, sf.begin);
+ assertEquals(47, sf.end);
+ assertEquals("uniprot", sf.featureGroup);
+ assertEquals("METAL", sf.type);
+ sf = sfs[3];
+ assertEquals("Iron-sulfur (2Fe-2S)", sf.description);
+ assertEquals(77, sf.begin);
+ assertEquals(77, sf.end);
+ assertEquals("uniprot", sf.featureGroup);
+ assertEquals("METAL", sf.type);
+ sf = sfs[4];
+ assertEquals("Fer2 Status: True Positive Pfam 8_8%LINK%",
+ sf.description);
+ assertEquals("Pfam 8_8|http://pfam.sanger.ac.uk/family/PF00111",
+ sf.links.get(0).toString());
+ assertEquals(8, sf.begin);
+ assertEquals(83, sf.end);
+ assertEquals("uniprot", sf.featureGroup);
+ assertEquals("Pfam", sf.type);
+ sf = sfs[5];
+ assertEquals("Ferredoxin_fold Status: True Positive ", sf.description);
+ assertEquals(3, sf.begin);
+ assertEquals(93, sf.end);
+ assertEquals("uniprot", sf.featureGroup);
+ assertEquals("Cath", sf.type);
+ sf = sfs[6];
+ assertEquals(
+ "High confidence server. Only hits with scores over 0.8 are reported. PHOSPHORYLATION (T) 89_8%LINK%",
+ sf.description);
+ assertEquals(
+ "PHOSPHORYLATION (T) 89_8|http://www.cbs.dtu.dk/cgi-bin/proview/webface-link?seqid=P83527&service=NetPhos-2.0",
+ sf.links.get(0).toString());
+ assertEquals(89, sf.begin);
+ assertEquals(89, sf.end);
+ assertEquals("netphos", sf.featureGroup);
+ assertEquals("PHOSPHORYLATION (T)", sf.type);
+ }
+}