+ @Test(
+ groups =
+ { "Functional", "testTask3" },
+ dataProvider = "structureImageAnnotationsOutputFiles",
+ singleThreaded = true)
+ public void structureImageAnnotationsOutputTest(String cmdLine,
+ String filename, int height) throws IOException
+ {
+ cleanupFiles(new String[] { filename });
+ String[] args = (cmdLine).split("\\s+");
+ callJalviewMain(args, true); // Create new instance of Jalview each time for
+ // linkedIds
+
+ BufferedImage img = ImageIO.read(new File(filename));
+ Assert.assertEquals(height, img.getHeight(), "Output image '" + filename
+ + "' is not in the expected height range, possibly because of the wrong number of annotations");
+
+ cleanupFiles(new String[] { filename });
+ tearDown();
+ }
+
+ @DataProvider(name = "structureImageAnnotationsOutputFiles")
+ public Object[][] structureImageAnnotationsOutputFiles()
+ {
+ String filename = "test/jalview/bin/argparser/testfiles/test_annotations.png";
+ return new Object[][] {
+ //
+ { "--headless --nonews --nosplash --overwrite --open=./examples/uniref50.fa "
+ + "--structure=examples/AlphaFold/AF-P00221-F1-model_v4.pdb "
+ + "--seqid=FER1_SPIOL --structureviewer=jmol "
+ + "--paematrix examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json "
+ + "--image=" + filename + " " + "--tempfac=plddt "
+ + "--noshowssannotations " + "--noshowannotations", //
+ filename, //
+ 252 }, //
+ { "--headless --nonews --nosplash --overwrite --open=./examples/uniref50.fa "
+ + "--structure=examples/AlphaFold/AF-P00221-F1-model_v4.pdb "
+ + "--seqid=FER1_SPIOL --structureviewer=jmol "
+ + "--paematrix examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json "
+ + "--image=" + filename + " " + "--tempfac=plddt "
+ + "--showssannotations " + "--noshowannotations", //
+ filename, //
+ 368 }, //
+ { "--headless --nonews --nosplash --overwrite --open=./examples/uniref50.fa "
+ + "--structure=examples/AlphaFold/AF-P00221-F1-model_v4.pdb "
+ + "--seqid=FER1_SPIOL --structureviewer=jmol "
+ + "--paematrix examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json "
+ + "--image=" + filename + " " + "--tempfac=plddt "
+ + "--noshowssannotations " + "--showannotations", //
+ filename, //
+ 524 }, //
+ { "--headless --nonews --nosplash --overwrite --open=./examples/uniref50.fa "
+ + "--structure=examples/AlphaFold/AF-P00221-F1-model_v4.pdb "
+ + "--seqid=FER1_SPIOL --structureviewer=jmol "
+ + "--paematrix examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json "
+ + "--image=" + filename + " " + "--tempfac=plddt "
+ + "--showssannotations " + "--showannotations", //
+ filename, //
+ 660 }, //
+ { "--gui --nonews --nosplash --overwrite --open=./examples/uniref50.fa "
+ + "--structure=examples/AlphaFold/AF-P00221-F1-model_v4.pdb "
+ + "--seqid=FER1_SPIOL --structureviewer=jmol "
+ + "--paematrix examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json "
+ + "--image=" + filename + " " + "--tempfac=plddt "
+ + "--noshowssannotations " + "--noshowannotations", //
+ filename, //
+ 252 }, //
+ { "--gui --nonews --nosplash --overwrite --open=./examples/uniref50.fa "
+ + "--structure=examples/AlphaFold/AF-P00221-F1-model_v4.pdb "
+ + "--seqid=FER1_SPIOL --structureviewer=jmol "
+ + "--paematrix examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json "
+ + "--image=" + filename + " " + "--tempfac=plddt "
+ + "--showssannotations " + "--noshowannotations", //
+ filename, //
+ 368 }, //
+ { "--gui --nonews --nosplash --overwrite --open=./examples/uniref50.fa "
+ + "--structure=examples/AlphaFold/AF-P00221-F1-model_v4.pdb "
+ + "--seqid=FER1_SPIOL --structureviewer=jmol "
+ + "--paematrix examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json "
+ + "--image=" + filename + " " + "--tempfac=plddt "
+ + "--noshowssannotations " + "--showannotations", //
+ filename, //
+ 524 }, //
+ { "--gui --nonews --nosplash --overwrite --open=./examples/uniref50.fa "
+ + "--structure=examples/AlphaFold/AF-P00221-F1-model_v4.pdb "
+ + "--seqid=FER1_SPIOL --structureviewer=jmol "
+ + "--paematrix examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json "
+ + "--image=" + filename + " " + "--tempfac=plddt "
+ + "--showssannotations " + "--showannotations", //
+ filename, //
+ 660 }, //
+ };
+ }
+