@Test(groups = "Functional")
public void testGetReadableFormats()
{
- String expected = "[Fasta, PFAM, Stockholm, PIR, BLC, AMSA, HTML, RNAML, JSON, PileUp, MSF, Clustal, PHYLIP, GFF or Jalview features, PDB, mmCIF, Jalview]";
+ String expected = "[Fasta, PFAM, Stockholm, PIR, BLC, AMSA, HTML, RNAML, JSON, PileUp, MSF, Clustal, PHYLIP, GFF or Jalview features, PDB, mmCIF, Jalview, HMMER3]";
FileFormats formats = FileFormats.getInstance();
assertEquals(formats.getReadableFormats().toString(), expected);
}
@Test(groups = "Functional")
public void testGetWritableFormats()
{
- String expected = "[Fasta, PFAM, Stockholm, PIR, BLC, AMSA, JSON, PileUp, MSF, Clustal, PHYLIP]";
+ String expected = "[Fasta, PFAM, Stockholm, PIR, BLC, AMSA, JSON, PileUp, MSF, Clustal, PHYLIP, HMMER3]";
FileFormats formats = FileFormats.getInstance();
assertEquals(formats.getWritableFormats(true).toString(), expected);
- expected = "[Fasta, PFAM, Stockholm, PIR, BLC, AMSA, JSON, PileUp, MSF, Clustal, PHYLIP, Jalview]";
+ expected = "[Fasta, PFAM, Stockholm, PIR, BLC, AMSA, JSON, PileUp, MSF, Clustal, PHYLIP, Jalview, HMMER3]";
assertEquals(formats.getWritableFormats(false).toString(), expected);
}
@Test(groups = "Functional")
public void testDeregisterFileFormat()
{
- String writable = "[Fasta, PFAM, Stockholm, PIR, BLC, AMSA, JSON, PileUp, MSF, Clustal, PHYLIP]";
- String readable = "[Fasta, PFAM, Stockholm, PIR, BLC, AMSA, HTML, RNAML, JSON, PileUp, MSF, Clustal, PHYLIP, GFF or Jalview features, PDB, mmCIF, Jalview]";
+ String writable = "[Fasta, PFAM, Stockholm, PIR, BLC, AMSA, JSON, PileUp, MSF, Clustal, PHYLIP, HMMER3]";
+ String readable = "[Fasta, PFAM, Stockholm, PIR, BLC, AMSA, HTML, RNAML, JSON, PileUp, MSF, Clustal, PHYLIP, GFF or Jalview features, PDB, mmCIF, Jalview, HMMER3]";
FileFormats formats = FileFormats.getInstance();
assertEquals(formats.getWritableFormats(true).toString(), writable);
assertEquals(formats.getReadableFormats().toString(), readable);
formats.deregisterFileFormat(FileFormat.Fasta.getName());
- writable = "[PFAM, Stockholm, PIR, BLC, AMSA, JSON, PileUp, MSF, Clustal, PHYLIP]";
- readable = "[PFAM, Stockholm, PIR, BLC, AMSA, HTML, RNAML, JSON, PileUp, MSF, Clustal, PHYLIP, GFF or Jalview features, PDB, mmCIF, Jalview]";
+ writable = "[PFAM, Stockholm, PIR, BLC, AMSA, JSON, PileUp, MSF, Clustal, PHYLIP, HMMER3]";
+ readable = "[PFAM, Stockholm, PIR, BLC, AMSA, HTML, RNAML, JSON, PileUp, MSF, Clustal, PHYLIP, GFF or Jalview features, PDB, mmCIF, Jalview, HMMER3]";
assertEquals(formats.getWritableFormats(true).toString(), writable);
assertEquals(formats.getReadableFormats().toString(), readable);
* re-register the format: it gets added to the end of the list
*/
formats.registerFileFormat(FileFormat.Fasta);
- writable = "[PFAM, Stockholm, PIR, BLC, AMSA, JSON, PileUp, MSF, Clustal, PHYLIP, Fasta]";
- readable = "[PFAM, Stockholm, PIR, BLC, AMSA, HTML, RNAML, JSON, PileUp, MSF, Clustal, PHYLIP, GFF or Jalview features, PDB, mmCIF, Jalview, Fasta]";
+ writable = "[PFAM, Stockholm, PIR, BLC, AMSA, JSON, PileUp, MSF, Clustal, PHYLIP, HMMER3, Fasta]";
+ readable = "[PFAM, Stockholm, PIR, BLC, AMSA, HTML, RNAML, JSON, PileUp, MSF, Clustal, PHYLIP, GFF or Jalview features, PDB, mmCIF, Jalview, HMMER3, Fasta]";
assertEquals(formats.getWritableFormats(true).toString(), writable);
assertEquals(formats.getReadableFormats().toString(), readable);
}
HMMFile file = new HMMFile(new FileParse(
"test/jalview/io/test_PKinase_hmm.txt", DataSourceType.FILE));
- file.parse();
+
scheme.hmm = file.getHMM();
+ Color expected;
Color actual = scheme.findColour('A', 1, null, null, 0);
- Color expected = new Color(1f, 1f - 0.06253430455f, 0f);
- assertEquals(actual, expected);
+ assertEquals(actual, Color.ORANGE);
actual = scheme.findColour('Y', 3, null, null, 0);
- expected = new Color(1f, 1f - 0.02082023351f, 0f);
- assertEquals(actual, expected);
+ assertEquals(actual, Color.ORANGE);
actual = scheme.findColour('M', 109, null, null, 0);
- expected = new Color(1f, 1f, 0);
+ expected = new Color(230, 0, 0);
assertEquals(actual, expected);
- actual = scheme.findColour('I', 128, null, null, 0);
- expected = new Color(1f, 1f - 0.15097062462f, 0);
+ actual = scheme.findColour('I', 6, null, null, 0);
+ expected = new Color(171, 171, 255);
assertEquals(actual, expected);
- actual = scheme.findColour('D', 181, null, null, 0);
- expected = new Color(1f, 1f - 0.08686935114f, 0);
+ actual = scheme.findColour('V', 14, null, null, 0);
+ expected = new Color(129, 129, 255);
assertEquals(actual, expected);
- actual = scheme.findColour('Z', 1, null, null, 0);
- expected = new Color(1f, 1f, 0);
- assertEquals(actual, expected);
+ actual = scheme.findColour('X', 100000000, null, null, 0);
+ assertEquals(actual, Color.WHITE);
- actual = scheme.findColour('A', 4000, null, null, 0);
- expected = new Color(1f, 1f, 0);
- assertEquals(actual, expected);
}