Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed unused directory

  • Loading branch information...
commit 4f8485d8e76bdebdec4740e922be2174e196c1af 1 parent 009b71a
@jts authored
Showing with 0 additions and 146 deletions.
  1. +0 −16 src/Tests/Makefile.am
  2. +0 −130 src/Tests/Tests.cpp
View
16 src/Tests/Makefile.am
@@ -1,16 +0,0 @@
-bin_PROGRAMS = Tests
-
-Tests_CPPFLAGS = \
- -I$(top_srcdir)/Bigraph \
- -I$(top_srcdir)/SuffixTools \
- -I$(top_srcdir)/Thirdparty \
- -I$(top_srcdir)/Util
-
-
-Tests_LDADD = \
- $(top_builddir)/SuffixTools/libsuffixtools.a \
- $(top_builddir)/Util/libutil.a \
- $(top_builddir)/Thirdparty/libthirdparty.a \
- $(top_builddir)/Bigraph/libbigraph.a
-
-Tests_SOURCES = Tests.cpp
View
130 src/Tests/Tests.cpp
@@ -1,130 +0,0 @@
-#include <iostream>
-#include "Edge.h"
-#include "Vertex.h"
-#include "Bigraph.h"
-#include "SBWT.h"
-#include "RLBWT.h"
-#include "BWTWriter.h"
-
-void dnaStringTests();
-
-int main(int argc, char** argv)
-{
- (void)argc;
- (void)argv;
-
- std::string file = argv[1];
- SBWT* pBWT = new SBWT(file);
- RLBWT* pRLBWT = new RLBWT(file);
-
- std::cout << "Standard BWT info:\n";
- pBWT->printInfo();
-
- std::cout << "\nRun-length BWT info: \n";
- pRLBWT->printInfo();
-
- std::cout << "\nTesting full-occurrence lookup for RLBWT\n";
- for(size_t i = 0; i < pBWT->getBWLen(); ++i)
- {
-
- AlphaCount bAC = pBWT->getFullOcc(i);
- AlphaCount rAC = pRLBWT->getFullOcc(i);
-
- //std::cout << "Test: RLBWT[" << i << "] = " << rAC << " BWT= " << bAC << "\n";
-
- if(bAC != rAC)
- {
- std::cout << "Test failed: RLBWT[" << i << "] = " << rAC << " BWT= " << bAC << "\n";
- assert(false);
- }
- }
-
- std::cout << "Testing pred count\n";
- if(pBWT->getPC('A') != pRLBWT->getPC('A') ||
- pBWT->getPC('C') != pRLBWT->getPC('C') ||
- pBWT->getPC('G') != pRLBWT->getPC('G') ||
- pBWT->getPC('T') != pRLBWT->getPC('T') ||
- pBWT->getPC('$') != pRLBWT->getPC('$'))
- {
- std::cout << "Test fail -- Pred count does not match\n";
- assert(false);
- }
-
- std::cout << "\nTesting occurrence lookup for RLBWT\n";
- for(size_t i = 0; i < pBWT->getBWLen(); ++i)
- {
- size_t bAC = pBWT->getOcc('A', i);
- size_t rAC = pRLBWT->getOcc('A', i);
-
- //std::cout << "Test: RLBWT[" << i << "] = " << rAC << " BWT= " << bAC << "\n";
-
- if(bAC != rAC)
- {
- std::cout << "Test failed: RLBWT[" << i << "] = " << rAC << " BWT= " << bAC << "\n";
- assert(false);
- }
- }
-#if 0
- std::cout << "\nTesting occurrence diff lookup for RLBWT\n";
- size_t prev = 0;
- for(size_t i = 1; i < pBWT->getBWLen(); ++i)
- {
- size_t bAC = pBWT->getOcc('$', i);
- size_t rAC = pRLBWT->getOcc('$', i);
-
- //std::cout << "Test: RLBWT[" << i << "] = " << rAC << " BWT= " << bAC << "\n";
-
- if(bAC != rAC)
- {
- std::cout << "Test failed: RLBWT[" << i << "] = " << rAC << " BWT= " << bAC << "\n";
- assert(false);
- }
- }
-#endif
- std::cout << "\nTesting random access to RLBWT\n";
- for(size_t i = 0; i < pBWT->getBWLen(); ++i)
- {
- char b = pBWT->getChar(i);
- char r = pRLBWT->getChar(i);
-
- // printf("RLBWT[%zu] = %c, BWT[%zu] = %c\n", i, r, i, b);
-
- if(r != b)
- {
- printf("Test failed: RLBWT[%zu] expected %c, got %c\n", i, b, r);
- assert(false);
- }
- }
-
- delete pBWT;
- delete pRLBWT;
-
- return 0;
-}
-
-void dnaStringTests()
-{
- std::string s1 = "GACACT";
- DNAString d1(s1);
- assert(s1 == d1.toString());
- std::cout << "S1: " << s1 << "\n";
- std::cout << "D1: " << d1.toString() << "\n";
- d1.reverse();
- std::cout << "Reversed: " << d1.toString() << "\n";
-
- d1 = "GGGACC";
- std::cout << "d1: " << d1.toString() << "\n";
- DNAString d2(d1);
- std::cout << "d2: " << d2.toString() << "\n";
-
- d1 = d2;
- std::cout << "d1: " << d1.toString() << "\n";
- d1 = d1;
-
- for(size_t i = 0; i < 2*d1.length(); ++i)
- {
- std::cout << i << " suffix: " << d1.getSuffix(i) << "\n";
- std::cout << i << " sufstr: " << d1.getSuffixString(i) << "\n";
- }
-}
-
Please sign in to comment.
Something went wrong with that request. Please try again.