Skip to content

Commit b6494d1

Browse files
Error messages
1 parent aba4249 commit b6494d1

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/Aligner.cpp

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -630,9 +630,9 @@ void runComponentMappings(const AlignmentGraph& alignmentGraph, moodycamel::Conc
630630
bool necessary = true;
631631
AlignmentResult long_alignments;
632632
size_t long_edit_distance;
633-
cerroutput << "Trying to align long read" << fastq->seq_id << BufferedWriter::Flush;
633+
cerroutput << "Trying to align long read" << fastq->seq_id;
634634
long_alignments = align_fn(fastq->seq_id, fastq->sequence, false);
635-
cerroutput << "Aligned long read" << fastq->seq_id << BufferedWriter::Flush;
635+
cerroutput << " Aligned long read" << fastq->seq_id;
636636

637637
// Getting the best alignment of GA
638638
AlignmentSelection::SelectionOptions gaSelectionOptions = selectionOptions;
@@ -650,7 +650,7 @@ void runComponentMappings(const AlignmentGraph& alignmentGraph, moodycamel::Conc
650650
long_edit_distance = result.editDistance;
651651
}
652652
edlibFreeAlignResult(result);
653-
cerroutput << " with long_edit_distance" << long_edit_distance << BufferedWriter::Flush;
653+
cerroutput << " Aligned long read" << fastq->seq_id << " with long_edit_distance" << long_edit_distance << BufferedWriter::Flush;
654654
}
655655

656656
if (necessary) {
@@ -674,7 +674,7 @@ void runComponentMappings(const AlignmentGraph& alignmentGraph, moodycamel::Conc
674674
sr++;
675675
while (sl < sr && seeds[sl].seqPos < l)
676676
sl++;
677-
cerroutput << short_id << " : " << l << " / " << fastq->sequence.length() << " " << sl << " " << sr << BufferedWriter::Flush;
677+
// cerroutput << short_id << " : " << l << " / " << fastq->sequence.length() << " " << sl << " " << sr << BufferedWriter::Flush;
678678
if (sl >= sr)
679679
continue;
680680
std::string seq = fastq->sequence.substr(l, len);
@@ -730,7 +730,7 @@ void runComponentMappings(const AlignmentGraph& alignmentGraph, moodycamel::Conc
730730
}
731731
auto anchorsEnd = std::chrono::system_clock::now();
732732
auto anchorsms = std::chrono::duration_cast<std::chrono::milliseconds>(anchorsEnd - anchorsStart).count();
733-
cerroutput << short_id << " : chaining " << A.size() << " anchors" << BufferedWriter::Flush;
733+
// cerroutput << short_id << " : chaining " << A.size() << " anchors" << BufferedWriter::Flush;
734734
auto clcStart = std::chrono::system_clock::now();
735735
std::vector<size_t> ids = alignmentGraph.colinearChaining(A, params.colinearGap);
736736
auto clcEnd = std::chrono::system_clock::now();
@@ -743,7 +743,7 @@ void runComponentMappings(const AlignmentGraph& alignmentGraph, moodycamel::Conc
743743
size_t firstNodeOffset, lastNodeOffset;
744744
auto connectStart = std::chrono::system_clock::now();
745745
int ai_idx = 0;
746-
cerroutput << short_id << " : chaining " << ids.size() << " / " << A.size() << " anchors" << BufferedWriter::Flush;
746+
// cerroutput << short_id << " : chaining " << ids.size() << " / " << A.size() << " anchors" << BufferedWriter::Flush;
747747
int one_node_overlaps_tmp = 0, one_node_overlaps_now = 0, one_node_overlaps_all = 0;
748748
for (size_t ai : ids) {
749749
for (size_t j =0 ; j<Apos[ai].size();j++) {
@@ -825,7 +825,7 @@ void runComponentMappings(const AlignmentGraph& alignmentGraph, moodycamel::Conc
825825
std::string pathseq = "";
826826
// not convert back to original node ids, to call alignmentGraph.NodeSequences()
827827
for (AlignmentGraph::MatrixPosition &p : longest) {
828-
cerroutput << p.node << " : " << p.nodeOffset << " bps " << alignmentGraph.NodeLength(p.node) << BufferedWriter::Flush;
828+
// cerroutput << p.node << " : " << p.nodeOffset << " bps " << alignmentGraph.NodeLength(p.node) << BufferedWriter::Flush;
829829

830830
pathseq.push_back(alignmentGraph.NodeSequences(p.node, p.nodeOffset));
831831
}
@@ -871,7 +871,7 @@ void runComponentMappings(const AlignmentGraph& alignmentGraph, moodycamel::Conc
871871
pos_i = std::min(pos_i, longest.size() - 1);
872872

873873
}
874-
cerroutput << "eds " << trace.size() << " " << longest.size() << " : " << pos_i << " / " << seq_i << BufferedWriter::Flush;;
874+
// cerroutput << "eds " << trace.size() << " " << longest.size() << " : " << pos_i << " / " << seq_i << BufferedWriter::Flush;;
875875
longest.swap(trace);
876876
}
877877
edlibFreeAlignResult(result);
@@ -920,7 +920,11 @@ void runComponentMappings(const AlignmentGraph& alignmentGraph, moodycamel::Conc
920920
stats.allAlignmentsCount += alignments.alignments.size();
921921

922922
coutoutput << "Read " << fastq->seq_id << " alignment took " << alntimems << "ms" << BufferedWriter::Flush;
923-
//if (alignments.alignments.size() > 0) alignments.alignments = AlignmentSelection::SelectAlignments(alignments.alignments, selectionOptions);
923+
if (!params.colinearChaining)
924+
{
925+
if (alignments.alignments.size() > 0) alignments.alignments = AlignmentSelection::SelectAlignments(alignments.alignments, selectionOptions);
926+
}
927+
924928

925929
// for (size_t i = 0; i < alignments.alignments.size(); i++) {
926930
// // c++ helloWorld.cpp edlib/src/edlib.cpp -o helloWorld -I edlib/include.

0 commit comments

Comments
 (0)