Skip to content

Commit

Permalink
Mark reads ineligible when they actually have no truth positions
Browse files Browse the repository at this point in the history
  • Loading branch information
adamnovak committed Jan 26, 2024
1 parent a91e8f5 commit 56bc933
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/subcommand/gamcompare_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "subcommand.hpp"

#include "../alignment.hpp"
#include "../annotation.hpp"
#include "../snarl_distance_index.hpp"
#include "../vg.hpp"
#include <vg/io/stream.hpp>
Expand Down Expand Up @@ -267,7 +268,7 @@ int main_gamcompare(int argc, char** argv) {
cout << aln.mapping_quality() << "\t";
cout << aligner_name << "\t";
cout << aln.name() << "\t";
cout << (aln.to_correct().name().empty() ? "0" : "1") << endl;
cout << (has_annotation(aln, "no_truth") ? "0" : "1") << endl;
}
text_buffer.clear();
};
Expand Down Expand Up @@ -342,6 +343,8 @@ int main_gamcompare(int argc, char** argv) {

// Annotate it as such
aln.set_correctly_mapped(correctly_mapped);
// And make sure we say it was possible to get
clear_annotation(aln, "no_truth");

if (correctly_mapped) {
correct_counts.at(omp_get_thread_num()) += 1;
Expand All @@ -359,6 +362,10 @@ int main_gamcompare(int argc, char** argv) {
correct_count_by_mapq_by_thread.at(omp_get_thread_num()).at(mapq) += 1;
}
}
} else if (range != -1) {
// We are flagging reads correct/incorrect, but this read has no truth position.
// Remember that it was impossible to get.
set_annotation(aln, "no_truth", true);
}
#pragma omp critical
{
Expand Down

1 comment on commit 56bc933

@adamnovak
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vg CI tests complete for branch eligible-reads. View the full report here.

10 tests passed, 6 tests failed and 0 tests skipped in 17139 seconds

Failed tests:

  • test_sim_chr21_snp1kg (4031 seconds)
  • test_sim_mhc_cactus (772 seconds)
  • test_sim_mhc_snp1kg (1005 seconds)
  • test_sim_mhc_snp1kg_mpmap (1032 seconds)
  • test_sim_chr21_snp1kg_trained (2763 seconds)
  • test_sim_yeast_cactus (1457 seconds)

Please sign in to comment.