public void SetUp() { alpha = DnaAlphabet.Instance(); symbols = new SymbolArray(alpha, "actgactg"); this.indexer = new IndexerDirect(2); accessor = new AccessorLinear(indexer, 4, symbols); }
public void SetUp() { alpha = DnaAlphabet.Instance(); symbols = new SymbolArray(alpha, "tatgacgt"); this.indexer = new IndexerDirect(2); accessor = new AccessorTransparent(indexer, 4, symbols); }
public void SetUp() { alpha = DnaAlphabet.Instance(); symbols = new SymbolArray(alpha, "actgactg"); indexer = new IndexerDirect(2); indexerReverse = new IndexerReverse(2,symbols.Length); accessor = new AccessorCircular(this.indexer, 4, symbols); }
/** Tests the construction of symbol arrays */ public void TestConstructor() { Symbol[] symbols = {alpha['A'], alpha['G']}; SymbolArray symbolArray; symbolArray = new SymbolArray(alpha, symbols); Assert.AreEqual(2, symbolArray.Length); Assert.AreEqual(alpha, symbolArray.Alphabet); symbolArray = new SymbolArray(alpha, "AG"); Assert.AreEqual(2, symbolArray.Length); Assert.AreEqual(alpha, symbolArray.Alphabet); //Query for alphabet type; }
/** Tests the Getter for symbols */ public void TestSymbolAt() { SymbolArray symbolArray; Symbol[] symbols = { alpha['A'], alpha['C'], null }; symbolArray = new SymbolArray(alpha, symbols); Assert.AreEqual(alpha['A'], symbolArray.SymbolAt(0)); Assert.AreEqual(alpha['C'], symbolArray.SymbolAt(1)); Assert.AreEqual(null, symbolArray.SymbolAt(2)); symbolArray = new SymbolArray(alpha, "ACü"); Assert.AreEqual(alpha['A'], symbolArray.SymbolAt(0)); Assert.AreEqual(alpha['C'], symbolArray.SymbolAt(1)); Assert.AreEqual(alpha['N'], symbolArray.SymbolAt(2)); // default letter }
public void TestInstance() { SymbolArray symbols = new SymbolArray(DnaAlphabet.Instance(), "ACTG"); Assert.AreEqual (true, AccessorFactory.Instance (AccessorFactory.LIN_DIR, 0, 0, 0, symbols) is AccessorLinear); Assert.AreEqual (true, AccessorFactory.Instance (AccessorFactory.CIRC_DIR, 0, 0, 0, symbols) is AccessorCircular); Assert.AreEqual (true, AccessorFactory.Instance (AccessorFactory.TRANS_DIR, 0, 0, 0, symbols) is AccessorTransparent); Assert.AreEqual (true, AccessorFactory.Instance (AccessorFactory.LIN_REV_COMP, 0, 0, 0, symbols) is AccessorComplement); }
public void SetUp() { alpha = DnaAlphabet.Instance(); symbols = new SymbolArray(alpha, "actg"); accessor = new AccessorComplement(symbols); }