File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 7373 test /globals.cpp
7474 test /polyx_test.cpp
7575 test /sequence_test.cpp
76+ test /stats_test.cpp
7677)
7778include_directories (
7879 # intel mac install location
Original file line number Diff line number Diff line change 1+ #include < gtest/gtest.h>
2+ #include " ../src/stats.h"
3+ #include " ../src/evaluator.h"
4+ #include < algorithm>
5+
6+ TEST (StatsTests, summarise) {
7+ Read* left = new Read (
8+ new string (" @NS500713:64:HFKJJBGXY:1:11101:20469:1097 1:N:0:TATAGCCT+GGTCCCGA" ),
9+ new string (" TTTTTTCTCTTGGACTCTAACACTGTTTTTTCTTATGAAAACACAGGAGTGATGACTAGTTGAGTGCATTCTTATGAGACTCATAGTCATTCTATGATGTAG" ),
10+ new string (" +" ),
11+ new string (" AAAAA6EEEEEEEEEEEEEEEEE#EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAEEEAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE" ));
12+
13+ Options* options = new Options ();
14+ Stats stats (options);
15+ stats.statRead (left);
16+ stats.summarize ();
17+ EXPECT_EQ (stats.getCycles (), 102 );
18+ EXPECT_EQ (stats.getBases (), 102 );
19+ EXPECT_EQ (stats.getReads (), 1 );
20+ EXPECT_EQ (stats.getQ20 (), 101 );
21+ EXPECT_EQ (stats.getQ30 (), 100 );
22+ EXPECT_EQ (stats.getGCNumber (), 35 );
23+ }
You can’t perform that action at this time.
0 commit comments