Skip to content

Commit

Permalink
Jul 29, 2024: Test summary pt2
Browse files Browse the repository at this point in the history
  • Loading branch information
AldhairMedico committed Jul 29, 2024
1 parent 19ea831 commit 3f25087
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 18 deletions.
8 changes: 4 additions & 4 deletions include/teloscope.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ class Teloscope {
allWindows.push_back(std::make_tuple(seqPos, header, pathWindows)); // Giulio: cleaner with struct
}


void sortWindowsBySeqPos() {
std::sort(allWindows.begin(), allWindows.end(), [](const auto& one, const auto& two) {
return std::get<0>(one) < std::get<0>(two);
Expand Down Expand Up @@ -204,10 +203,11 @@ class Teloscope {
}

void printSummary() {
std::cout << "Total windows analyzed: " << totalNWindows << "\n";
std::cout << "Total input patterns found: " << std::endl;
std::cout << "\n" << "+++Summary Report+++" << "\n";
std::cout << "Total windows analyzed:" << "\t" << totalNWindows << "\n";
std::cout << "Total input patterns found:" << "\n";
for (const auto& [pattern, count] : patternCounts) {
std::cout << "Pattern: " << pattern << " Count: " << count << std::endl;
std::cout << "Pattern:" << "\t" << pattern << "\t" << count << "\n";
}
}
};
Expand Down
8 changes: 4 additions & 4 deletions testFiles/random1.fasta
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
>Header1 5bp sequence with no gaps and 2 lowercase bases
CGacT
CGaTT

>Header2 5bp sequence with internal 1bp non-canonical gap
CGAXT

>Header3 10bp sequence with internal 4bp and 1bp terminal canonical gap
TGANATNCTN
TAANATNCTN

>Header4 15bp sequence with start 3bp canonical gap and 3 lowercase bases
NNNTTCCTcgCACtC
NNNTTCCTcgCACtT

>Header5 15bp sequence with terminal 3bp canonical gap
AACTCGATCACGNNN
AACTCGATCATTNNN
6 changes: 3 additions & 3 deletions testFiles/random2.fasta
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ CTTCAGGCTTAAAGC
CTTAGGGCTTAGGGC

>Header3_no_gap_2_patterns
CCCTTACCTTAGGGC
CCCTAACCTTAGGGC

>Header4_initial_gap_1_pattern
NNNTCCCTTAcgCtC
NNNTCCCTAAcgCtC

>Header5_terminal_gap_1_pattern
ATCTTAGGGACGNNN
Expand All @@ -17,4 +17,4 @@ ATCTTAGGGACGNNN
TTAGGgNNCTTAGGGACNNTTaggg

>Header7_multiple_gaps_2_patterns
AAACNNNGCCCTTATGNNNTTAGGG
AAACNNNGCCCTAATGNNNTTAGGG
2 changes: 1 addition & 1 deletion testFiles/random3.fasta
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
>Header1_low_entropy
TTTTTTTTTAAGGGGGGGGG
TTTTTTTTTAGGGGGGGGGG

>Header2_fully_compressible
TTTTTTTTTTAAAAAAAAAA
Expand Down
14 changes: 12 additions & 2 deletions validateFiles/random1.fasta.1.tst
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
testFiles/random1.fasta -w 3 -s 1
embedded
testFiles/random1.fasta -w 3 -s 1 -p TT
embedded
/// Teloscope v0.0.1
Waiting for jobs to complete
All jobs completed
Reporting window matches and metrics in BED/BEDgraphs...

+++Summary Report+++
Total windows analyzed: 40
Total input patterns found:
Pattern: AA 2
Pattern: TT 4
14 changes: 12 additions & 2 deletions validateFiles/random2.fasta.1.tst
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
testFiles/random2.fasta -w 10 -s 5
embedded
testFiles/random2.fasta -w 10 -s 5 -p TTAGGG
embedded
/// Teloscope v0.0.1
Waiting for jobs to complete
All jobs completed
Reporting window matches and metrics in BED/BEDgraphs...

+++Summary Report+++
Total windows analyzed: 21
Total input patterns found:
Pattern: CCCTAA 3
Pattern: TTAGGG 8
14 changes: 12 additions & 2 deletions validateFiles/random3.fasta.1.tst
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
testFiles/random3.fasta -w 10 -s 5
embedded
testFiles/random3.fasta -w 10 -s 5 -p TTAGGG
embedded
/// Teloscope v0.0.1
Waiting for jobs to complete
All jobs completed
Reporting window matches and metrics in BED/BEDgraphs...

+++Summary Report+++
Total windows analyzed:
Total input patterns found:
Pattern: CCCTAA 0
Pattern: TTAGGG 1

0 comments on commit 3f25087

Please sign in to comment.