InterfaceVARNASelectionListener, VamsasSource
{
private static final byte[] PAIRS = new byte[] { '(', ')', '[', ']', '{',
- '}', '<', '>' };
+ '}', '<', '>', '_','-' };
private AppVarnaBinding vab;
*/
package jalview.gui;
+import static org.testng.Assert.assertTrue;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertNull;
import static org.testng.AssertJUnit.assertSame;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.Sequence;
+import jalview.ext.varna.RnaModel;
+import jalview.io.DataSourceType;
+import jalview.io.FileFormat;
+import jalview.io.FileLoader;
+import jalview.io.FormatAdapter;
+import jalview.io.StockholmFile;
+
+
public class AppVarnaTest
{
assertEquals("..{B([.<.].}b>)",
AppVarna.replaceOddGaps(" {B([*<-]?}b>)"));
}
+ @Test(groups = "Functional")
+ public void testRnaModel() throws Exception
+ {
+ AlignFrame af = new FileLoader(false).LoadFileWaitTillLoaded("examples/rna_ss_test.stk", DataSourceType.FILE);
+ AlignmentI a = af.getViewport().getAlignment();
+ assertTrue(a.getAlignmentAnnotation()[0].isRNA());
+ AppVarna varnaView = new AppVarna(a.getSequenceAt(0),a.getAlignmentAnnotation()[0], af.alignPanel);
+ assertEquals(varnaView.getModels().size(),2);
+ for (RnaModel mdl: varnaView.getModels()) {
+ assertEquals(mdl.seq.getSequenceAsString(),mdl.rna.getSeq());
+ }
+ }
}