From 5b3d1cf1e78adbeeedf14eec91b6a0be75ca21e4 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 9 May 2017 17:57:20 +0100 Subject: [PATCH] JAL-2507 JAL-2509 extend test to cover round trip of full range of WUSS RNA secondary structure --- test/jalview/io/StockholmFileTest.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/jalview/io/StockholmFileTest.java b/test/jalview/io/StockholmFileTest.java index 185eedf..bd1400b 100644 --- a/test/jalview/io/StockholmFileTest.java +++ b/test/jalview/io/StockholmFileTest.java @@ -37,6 +37,7 @@ import java.util.BitSet; import java.util.HashMap; import java.util.Map; +import org.testng.Assert; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -443,9 +444,26 @@ public class StockholmFileTest + "(|(|(|(|, .|, .|, .|, .|)|)|)|)|\t0.0\nROWPROPERTIES\t" + "secondary structure\tscaletofit=true\tshowalllabs=true\tcentrelabs=false"; + String annFileFullWuss = "JALVIEW_ANNOTATION\n# Created: Thu May 04 11:16:52 BST 2017\n\n" + + "SEQUENCE_REF\tDm\nNO_GRAPH\tsecondary structure\tsecondary structure\t" + + "(|(|(|(||{|{||[|[||)|)|)|)||}|}|]|]\t0.0\nROWPROPERTIES\t" + + "secondary structure\tscaletofit=true\tshowalllabs=true\tcentrelabs=false"; + @Test(groups = { "Functional" }) public void secondaryStructureForRNASequence() throws Exception { + roundTripSSForRNA(aliFile, annFile); + } + + @Test(groups = { "Functional" }) + public void fullWUSSsecondaryStructureForRNASequence() throws Exception + { + roundTripSSForRNA(aliFile, annFileFullWuss); + } + + private static void roundTripSSForRNA(String aliFile, String annFile) + throws Exception + { AlignmentI al = new AppletFormatAdapter().readFile(aliFile, DataSourceType.PASTE, jalview.io.FileFormat.Fasta); AnnotationFile aaf = new AnnotationFile(); -- 1.7.10.2