Skip to content

Commit

Permalink
Simpler and more accurate alignment extender (#296)
Browse files Browse the repository at this point in the history
* generate a new aligner core for each read

* better traceback information

* update xdrop dynamically

* fixed alignment unit test

* move some helpers to simd_utils

* collect forward alignments first, then extend backwards

* change default param

* fix while condition order

* clear out old seeds when min_seed_length updated

* cleanup. ensure that Cigar has trivial move constructors. better job of preventing double move

* Extender now returns full alignments

* only add column to table if it scores well
  • Loading branch information
hmusta authored Feb 28, 2021
1 parent ef9804f commit 9004644
Show file tree
Hide file tree
Showing 22 changed files with 1,117 additions and 1,859 deletions.
52 changes: 17 additions & 35 deletions metagraph/integration_tests/test_align.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,37 +41,7 @@ def test_simple_align_all_graphs(self, representation):
self.assertEqual('nodes (k): 16438', params_str[1])
self.assertEqual('mode: basic', params_str[2])

stats_command = '{exe} align -i {graph} --align-vertical-bandwidth 1000000 --align-min-exact-match 0.0 {reads}'.format(
exe=METAGRAPH,
graph=self.tempdir.name + '/genome.MT' + graph_file_extension[representation],
reads=TEST_DATA_DIR + '/genome_MT1.fq',
)
res = subprocess.run(stats_command.split(), stdout=PIPE)
self.assertEqual(res.returncode, 0)
params_str = res.stdout.decode().rstrip().split('\n')
self.assertEqual(len(params_str), 6)
self.assertEqual(params_str[0], 'MT-10/1\tAACAGAGAATAGTTTAAATTAGAATCTTAGCTTTGGGTGCTAATGGTGGAGTTAAAGACTTTTTCTCTGATTTGTCCTTGGAAAAAGGTTTTCATCTCCGGTTTACAAGACTGGTGTATTAGTTTATACTACAAGGACAGGCCCATTTGA\t+\tTAGAATCTTAG\t22\t11\t19S11=120S\t0')
self.assertEqual(params_str[1], 'MT-8/1\tAAAACTAACCCCCTAATAAAATTAATTAACCACTCATTCATCGACCTCCCCACCCCATCCAACATCTCCGCATGATGAAACTTCGGCTCACTCCTTGGCGCCTGCCTGATCCTCCAAATCACCACAGGACTATTCCTAGCCATGCACTAC\t+\tAAAACTAACCCCCTAATAAAATTAATTAACCACTCATTCATCGACCTCCCCACCCCATCCAACATCTCCGCATGATGAAACTTCGGCTCACTCCTTGGCGCCTGCCTGATCCTCCAAATCACCACAGGACTATTCCTAGCCATGCACTAC\t300\t150\t150=\t0')
self.assertEqual(params_str[2], 'MT-6/1\tATATGACTAGCTTACACAATAGCTTTTATAGTAAAGATACCTCTTTACGGACTCCACTTATGACTCCCTAAAGCCCATGTCGAAGCCCCCATCGCTGGGTCAATAGTACTTGCCGCAGTACTCTTAAAACTAGGCGGCTATGGTATAATA\t+\tATATGACTAGCTTACACAATAGCTTTTATAGTAAAGATACCTCTTTACGGACTCCACTTATGACTCCCTAAAGCCCATGTCGAAGCCCCCATCGCTGGGTCAATAGTACTTGCCGCAGTACTCTTAAAACTAGGCGGCTATGGTATAATA\t300\t150\t150=\t0')
self.assertEqual(params_str[3], 'MT-4/1\tAGTATAGTAGTTCGCTTTGACTGGTGAAGTCTTAGCATGTACTGCTCGGAGGTTCGGTTCTGCTCCGAGGTCGCCCCAACCGAAATTTTTAATGCAGGTTTGGTAGTTTAGGACCTGTGGGTTTGTTAGGTACTGTTTGCATTAATAAAT\t*\t*\t0\t*\t*\t*')
self.assertEqual(params_str[4], 'MT-2/1\tTGTGTTAATTAATTAATGCTTGTAGGACATAATAATAACAATTGAATGTCTGCACAGCCACTTTCCACACAGACATCATAACAAAAAATTTCCACCAAACCCCCCCTCCCCCGCTTCTGGCCACAGCACTTAAACACATCTCTGCCAAAC\t+\tTGTGTTAATTAATTAATGCTTGTAGGACATAATAATAACAATTGAATGTCTGCACAGCCACTTTCCACACAGACATCATAACAAAAAATTTCCACCAAACCCCCCCTCCCCCGCTTCTGGCCACAGCACTTAAACACATCTCTGCCAAAC\t300\t150\t150=\t0')
self.assertEqual(params_str[5], 'MT-11/1\tAACAGAGAATTGTTTAAATTACAATCTTAGCTATGGGTGCTAAAGGTGGAGTTATAGACTTTTTCACTGATTTGTCGTTGGAAAAAGCTTTTCATCTCGGGTTTACAAGTCTGGTGTATTTGTTTATACTAGAAGGACAGGCGCATTTGA\t+\tTTCACTGATTT\t22\t11\t62S11=77S\t0')

@parameterized.expand(GRAPH_TYPES)
def test_simple_align_banded_all_graphs(self, representation):

self._build_graph(input=TEST_DATA_DIR + '/genome.MT.fa',
output=self.tempdir.name + '/genome.MT',
k=11, repr=representation,
extra_params="--mask-dummy")

res = self._get_stats(self.tempdir.name + '/genome.MT' + graph_file_extension[representation])
params_str = res.stdout.decode().split('\n')[2:]
self.assertEqual('k: 11', params_str[0])
self.assertEqual('nodes (k): 16438', params_str[1])
self.assertEqual('mode: basic', params_str[2])

stats_command = '{exe} align -i {graph} --align-vertical-bandwidth 10 --align-min-exact-match 0.0 {reads}'.format(
stats_command = '{exe} align -i {graph} --align-min-exact-match 0.0 {reads}'.format(
exe=METAGRAPH,
graph=self.tempdir.name + '/genome.MT' + graph_file_extension[representation],
reads=TEST_DATA_DIR + '/genome_MT1.fq',
Expand All @@ -85,7 +55,10 @@ def test_simple_align_banded_all_graphs(self, representation):
self.assertEqual(params_str[2], 'MT-6/1\tATATGACTAGCTTACACAATAGCTTTTATAGTAAAGATACCTCTTTACGGACTCCACTTATGACTCCCTAAAGCCCATGTCGAAGCCCCCATCGCTGGGTCAATAGTACTTGCCGCAGTACTCTTAAAACTAGGCGGCTATGGTATAATA\t+\tATATGACTAGCTTACACAATAGCTTTTATAGTAAAGATACCTCTTTACGGACTCCACTTATGACTCCCTAAAGCCCATGTCGAAGCCCCCATCGCTGGGTCAATAGTACTTGCCGCAGTACTCTTAAAACTAGGCGGCTATGGTATAATA\t300\t150\t150=\t0')
self.assertEqual(params_str[3], 'MT-4/1\tAGTATAGTAGTTCGCTTTGACTGGTGAAGTCTTAGCATGTACTGCTCGGAGGTTCGGTTCTGCTCCGAGGTCGCCCCAACCGAAATTTTTAATGCAGGTTTGGTAGTTTAGGACCTGTGGGTTTGTTAGGTACTGTTTGCATTAATAAAT\t*\t*\t0\t*\t*\t*')
self.assertEqual(params_str[4], 'MT-2/1\tTGTGTTAATTAATTAATGCTTGTAGGACATAATAATAACAATTGAATGTCTGCACAGCCACTTTCCACACAGACATCATAACAAAAAATTTCCACCAAACCCCCCCTCCCCCGCTTCTGGCCACAGCACTTAAACACATCTCTGCCAAAC\t+\tTGTGTTAATTAATTAATGCTTGTAGGACATAATAATAACAATTGAATGTCTGCACAGCCACTTTCCACACAGACATCATAACAAAAAATTTCCACCAAACCCCCCCTCCCCCGCTTCTGGCCACAGCACTTAAACACATCTCTGCCAAAC\t300\t150\t150=\t0')
self.assertEqual(params_str[5], 'MT-11/1\tAACAGAGAATTGTTTAAATTACAATCTTAGCTATGGGTGCTAAAGGTGGAGTTATAGACTTTTTCACTGATTTGTCGTTGGAAAAAGCTTTTCATCTCGGGTTTACAAGTCTGGTGTATTTGTTTATACTAGAAGGACAGGCGCATTTGA\t+\tTTCACTGATTT\t22\t11\t62S11=77S\t0')
last_split = params_str[5].split("\t");
self.assertEqual(last_split[0], "MT-11/1")
self.assertEqual(last_split[1], "AACAGAGAATTGTTTAAATTACAATCTTAGCTATGGGTGCTAAAGGTGGAGTTATAGACTTTTTCACTGATTTGTCGTTGGAAAAAGCTTTTCATCTCGGGTTTACAAGTCTGGTGTATTTGTTTATACTAGAAGGACAGGCGCATTTGA")
self.assertEqual(last_split[4], "22")

@parameterized.expand(['succinct'])
def test_simple_align_json_all_graphs(self, representation):
Expand Down Expand Up @@ -139,7 +112,10 @@ def test_simple_align_fwd_rev_comp_all_graphs(self, representation):
self.assertEqual(params_str[2], 'MT-6/1\tATATGACTAGCTTACACAATAGCTTTTATAGTAAAGATACCTCTTTACGGACTCCACTTATGACTCCCTAAAGCCCATGTCGAAGCCCCCATCGCTGGGTCAATAGTACTTGCCGCAGTACTCTTAAAACTAGGCGGCTATGGTATAATA\t+\tATATGACTAGCTTACACAATAGCTTTTATAGTAAAGATACCTCTTTACGGACTCCACTTATGACTCCCTAAAGCCCATGTCGAAGCCCCCATCGCTGGGTCAATAGTACTTGCCGCAGTACTCTTAAAACTAGGCGGCTATGGTATAATA\t300\t150\t150=\t0')
self.assertEqual(params_str[3], 'MT-4/1\tAGTATAGTAGTTCGCTTTGACTGGTGAAGTCTTAGCATGTACTGCTCGGAGGTTCGGTTCTGCTCCGAGGTCGCCCCAACCGAAATTTTTAATGCAGGTTTGGTAGTTTAGGACCTGTGGGTTTGTTAGGTACTGTTTGCATTAATAAAT\t-\tATTTATTAATGCAAACAGTACCTAACAAACCCACAGGTCCTAAACTACCAAACCTGCATTAAAAATTTCGGTTGGGGCGACCTCGGAGCAGAACCCAACCTCCGAGCAGTACATGCTAAGACTTCACCAGTCAAAGCGAACTACTATACT\t295\t149\t95=1X54=\t0')
self.assertEqual(params_str[4], 'MT-2/1\tTGTGTTAATTAATTAATGCTTGTAGGACATAATAATAACAATTGAATGTCTGCACAGCCACTTTCCACACAGACATCATAACAAAAAATTTCCACCAAACCCCCCCTCCCCCGCTTCTGGCCACAGCACTTAAACACATCTCTGCCAAAC\t+\tTGTGTTAATTAATTAATGCTTGTAGGACATAATAATAACAATTGAATGTCTGCACAGCCACTTTCCACACAGACATCATAACAAAAAATTTCCACCAAACCCCCCCTCCCCCGCTTCTGGCCACAGCACTTAAACACATCTCTGCCAAAC\t300\t150\t150=\t0')
self.assertEqual(params_str[5], 'MT-11/1\tAACAGAGAATTGTTTAAATTACAATCTTAGCTATGGGTGCTAAAGGTGGAGTTATAGACTTTTTCACTGATTTGTCGTTGGAAAAAGCTTTTCATCTCGGGTTTACAAGTCTGGTGTATTTGTTTATACTAGAAGGACAGGCGCATTTGA\t+\tTTCACTGATTT\t22\t11\t62S11=77S\t0')
last_split = params_str[5].split("\t");
self.assertEqual(last_split[0], "MT-11/1")
self.assertEqual(last_split[1], "AACAGAGAATTGTTTAAATTACAATCTTAGCTATGGGTGCTAAAGGTGGAGTTATAGACTTTTTCACTGATTTGTCGTTGGAAAAAGCTTTTCATCTCGGGTTTACAAGTCTGGTGTATTTGTTTATACTAGAAGGACAGGCGCATTTGA")
self.assertEqual(last_split[4], "22")

@parameterized.expand(GRAPH_TYPES)
def test_simple_align_canonical_all_graphs(self, representation):
Expand Down Expand Up @@ -170,7 +146,10 @@ def test_simple_align_canonical_all_graphs(self, representation):
self.assertEqual(params_str[2], 'MT-6/1\tATATGACTAGCTTACACAATAGCTTTTATAGTAAAGATACCTCTTTACGGACTCCACTTATGACTCCCTAAAGCCCATGTCGAAGCCCCCATCGCTGGGTCAATAGTACTTGCCGCAGTACTCTTAAAACTAGGCGGCTATGGTATAATA\t+\tATATGACTAGCTTACACAATAGCTTTTATAGTAAAGATACCTCTTTACGGACTCCACTTATGACTCCCTAAAGCCCATGTCGAAGCCCCCATCGCTGGGTCAATAGTACTTGCCGCAGTACTCTTAAAACTAGGCGGCTATGGTATAATA\t300\t150\t150=\t0')
self.assertEqual(params_str[3], 'MT-4/1\tAGTATAGTAGTTCGCTTTGACTGGTGAAGTCTTAGCATGTACTGCTCGGAGGTTCGGTTCTGCTCCGAGGTCGCCCCAACCGAAATTTTTAATGCAGGTTTGGTAGTTTAGGACCTGTGGGTTTGTTAGGTACTGTTTGCATTAATAAAT\t+\tAGTATAGTAGTTCGCTTTGACTGGTGAAGTCTTAGCATGTACTGCTCGGAGGTTGGGTTCTGCTCCGAGGTCGCCCCAACCGAAATTTTTAATGCAGGTTTGGTAGTTTAGGACCTGTGGGTTTGTTAGGTACTGTTTGCATTAATAAAT\t295\t149\t54=1X95=\t0')
self.assertEqual(params_str[4], 'MT-2/1\tTGTGTTAATTAATTAATGCTTGTAGGACATAATAATAACAATTGAATGTCTGCACAGCCACTTTCCACACAGACATCATAACAAAAAATTTCCACCAAACCCCCCCTCCCCCGCTTCTGGCCACAGCACTTAAACACATCTCTGCCAAAC\t+\tTGTGTTAATTAATTAATGCTTGTAGGACATAATAATAACAATTGAATGTCTGCACAGCCACTTTCCACACAGACATCATAACAAAAAATTTCCACCAAACCCCCCCTCCCCCGCTTCTGGCCACAGCACTTAAACACATCTCTGCCAAAC\t300\t150\t150=\t0')
self.assertEqual(params_str[5], 'MT-11/1\tAACAGAGAATTGTTTAAATTACAATCTTAGCTATGGGTGCTAAAGGTGGAGTTATAGACTTTTTCACTGATTTGTCGTTGGAAAAAGCTTTTCATCTCGGGTTTACAAGTCTGGTGTATTTGTTTATACTAGAAGGACAGGCGCATTTGA\t+\tTTCACTGATTT\t22\t11\t62S11=77S\t0')
last_split = params_str[5].split("\t");
self.assertEqual(last_split[0], "MT-11/1")
self.assertEqual(last_split[1], "AACAGAGAATTGTTTAAATTACAATCTTAGCTATGGGTGCTAAAGGTGGAGTTATAGACTTTTTCACTGATTTGTCGTTGGAAAAAGCTTTTCATCTCGGGTTTACAAGTCTGGTGTATTTGTTTATACTAGAAGGACAGGCGCATTTGA")
self.assertEqual(last_split[4], "22")

@parameterized.expand(['succinct'])
def test_simple_align_canonical_subk_succinct(self, representation):
Expand Down Expand Up @@ -230,7 +209,10 @@ def test_simple_align_primary_all_graphs(self, representation):
self.assertEqual(params_str[2], 'MT-6/1\tATATGACTAGCTTACACAATAGCTTTTATAGTAAAGATACCTCTTTACGGACTCCACTTATGACTCCCTAAAGCCCATGTCGAAGCCCCCATCGCTGGGTCAATAGTACTTGCCGCAGTACTCTTAAAACTAGGCGGCTATGGTATAATA\t+\tATATGACTAGCTTACACAATAGCTTTTATAGTAAAGATACCTCTTTACGGACTCCACTTATGACTCCCTAAAGCCCATGTCGAAGCCCCCATCGCTGGGTCAATAGTACTTGCCGCAGTACTCTTAAAACTAGGCGGCTATGGTATAATA\t300\t150\t150=\t0')
self.assertEqual(params_str[3], 'MT-4/1\tAGTATAGTAGTTCGCTTTGACTGGTGAAGTCTTAGCATGTACTGCTCGGAGGTTCGGTTCTGCTCCGAGGTCGCCCCAACCGAAATTTTTAATGCAGGTTTGGTAGTTTAGGACCTGTGGGTTTGTTAGGTACTGTTTGCATTAATAAAT\t+\tAGTATAGTAGTTCGCTTTGACTGGTGAAGTCTTAGCATGTACTGCTCGGAGGTTGGGTTCTGCTCCGAGGTCGCCCCAACCGAAATTTTTAATGCAGGTTTGGTAGTTTAGGACCTGTGGGTTTGTTAGGTACTGTTTGCATTAATAAAT\t295\t149\t54=1X95=\t0')
self.assertEqual(params_str[4], 'MT-2/1\tTGTGTTAATTAATTAATGCTTGTAGGACATAATAATAACAATTGAATGTCTGCACAGCCACTTTCCACACAGACATCATAACAAAAAATTTCCACCAAACCCCCCCTCCCCCGCTTCTGGCCACAGCACTTAAACACATCTCTGCCAAAC\t+\tTGTGTTAATTAATTAATGCTTGTAGGACATAATAATAACAATTGAATGTCTGCACAGCCACTTTCCACACAGACATCATAACAAAAAATTTCCACCAAACCCCCCCTCCCCCGCTTCTGGCCACAGCACTTAAACACATCTCTGCCAAAC\t300\t150\t150=\t0')
self.assertEqual(params_str[5], 'MT-11/1\tAACAGAGAATTGTTTAAATTACAATCTTAGCTATGGGTGCTAAAGGTGGAGTTATAGACTTTTTCACTGATTTGTCGTTGGAAAAAGCTTTTCATCTCGGGTTTACAAGTCTGGTGTATTTGTTTATACTAGAAGGACAGGCGCATTTGA\t+\tTTCACTGATTT\t22\t11\t62S11=77S\t0')
last_split = params_str[5].split("\t");
self.assertEqual(last_split[0], "MT-11/1")
self.assertEqual(last_split[1], "AACAGAGAATTGTTTAAATTACAATCTTAGCTATGGGTGCTAAAGGTGGAGTTATAGACTTTTTCACTGATTTGTCGTTGGAAAAAGCTTTTCATCTCGGGTTTACAAGTCTGGTGTATTTGTTTATACTAGAAGGACAGGCGCATTTGA")
self.assertEqual(last_split[4], "22")

@parameterized.expand(['succinct'])
def test_simple_align_primary_subk_succinct(self, representation):
Expand Down
4 changes: 0 additions & 4 deletions metagraph/src/cli/align.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ DBGAlignerConfig initialize_aligner_config(size_t k, const Config &config) {

DBGAlignerConfig aligner_config;

aligner_config.queue_size = config.alignment_queue_size;
aligner_config.bandwidth = config.alignment_vertical_bandwidth;
aligner_config.num_alternative_paths = config.alignment_num_alternative_paths;
aligner_config.min_seed_length = config.alignment_min_seed_length;
aligner_config.max_seed_length = config.alignment_max_seed_length;
Expand All @@ -57,7 +55,6 @@ DBGAlignerConfig initialize_aligner_config(size_t k, const Config &config) {

logger->trace("Alignment settings:");
logger->trace("\t Alignments to report: {}", aligner_config.num_alternative_paths);
logger->trace("\t Priority queue size: {}", aligner_config.queue_size);
logger->trace("\t Min seed length: {}", aligner_config.min_seed_length);
logger->trace("\t Max seed length: {}", aligner_config.max_seed_length);
logger->trace("\t Max num seeds per locus: {}", aligner_config.max_num_seeds_per_locus);
Expand All @@ -67,7 +64,6 @@ DBGAlignerConfig initialize_aligner_config(size_t k, const Config &config) {
logger->trace("\t Gap extension penalty: {}", int64_t(aligner_config.gap_extension_penalty));
logger->trace("\t Min DP table cell score: {}", int64_t(aligner_config.min_cell_score));
logger->trace("\t Min alignment score: {}", aligner_config.min_path_score);
logger->trace("\t Bandwidth: {}", aligner_config.bandwidth);
logger->trace("\t X drop-off: {}", aligner_config.xdrop);
logger->trace("\t Exact nucleotide match threshold: {}", aligner_config.min_exact_match);

Expand Down
18 changes: 5 additions & 13 deletions metagraph/src/cli/config/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,6 @@ Config::Config(int argc, char *argv[]) {
batch_align = true;
} else if (!strcmp(argv[i], "--align-length")) {
alignment_length = atoi(get_value(i++));
} else if (!strcmp(argv[i], "--align-queue-size")) {
alignment_queue_size = atoi(get_value(i++));
} else if (!strcmp(argv[i], "--align-vertical-bandwidth")) {
alignment_vertical_bandwidth = atoi(get_value(i++));
} else if (!strcmp(argv[i], "--align-match-score")) {
alignment_match_score = atoi(get_value(i++));
} else if (!strcmp(argv[i], "--align-mm-transition-penalty")) {
Expand Down Expand Up @@ -901,7 +897,7 @@ void Config::print_usage(const std::string &prog_name, IdentityType identity) {
fprintf(stderr, "\n");
fprintf(stderr, "\t --query-presence \t\ttest sequences for presence, report as 0 or 1 [off]\n");
fprintf(stderr, "\t --filter-present \t\treport only present input sequences as FASTA [off]\n");
fprintf(stderr, "\t --batch-size \tquery batch size (number of base pairs) [100000000]\n");
fprintf(stderr, "\t --batch-size \t\tquery batch size (number of base pairs) [100000000]\n");
fprintf(stderr, "\n");
fprintf(stderr, "Available options for alignment:\n");
fprintf(stderr, "\t-o --outfile-base [STR]\t\t\t\tbasename of output file []\n");
Expand All @@ -910,10 +906,8 @@ void Config::print_usage(const std::string &prog_name, IdentityType identity) {
fprintf(stderr, "\t --align-alternative-alignments \t\tthe number of alternative paths to report per seed [1]\n");
fprintf(stderr, "\t --align-min-path-score [INT]\t\t\tthe minimum score that a reported path can have [0]\n");
fprintf(stderr, "\t --align-edit-distance \t\t\tuse unit costs for scoring matrix [off]\n");
fprintf(stderr, "\t --align-queue-size [INT]\t\t\tmaximum size of the priority queue for alignment [20]\n");
fprintf(stderr, "\t --align-vertical-bandwidth [INT]\t\tmaximum width of a window to consider in alignment step [inf]\n");
fprintf(stderr, "\t --align-max-nodes-per-seq-char [FLOAT]\t\tmaximum number of nodes to consider per sequence character [10.0]\n");
fprintf(stderr, "\t --align-max-ram [FLOAT]\t\tmaximum amount of RAM used per alignment in MB [200.0]\n");
fprintf(stderr, "\t --align-max-nodes-per-seq-char [FLOAT]\tmaximum number of nodes to consider per sequence character [12.0]\n");
fprintf(stderr, "\t --align-max-ram [FLOAT]\t\t\tmaximum amount of RAM used per alignment in MB [200.0]\n");
fprintf(stderr, "\n");
fprintf(stderr, "Advanced options for scoring:\n");
fprintf(stderr, "\t --align-match-score [INT]\t\t\tpositive match score [2]\n");
Expand All @@ -927,7 +921,7 @@ void Config::print_usage(const std::string &prog_name, IdentityType identity) {
fprintf(stderr, "Advanced options for seeding:\n");
fprintf(stderr, "\t --align-min-seed-length [INT]\t\tthe minimum length of a seed [graph k]\n");
fprintf(stderr, "\t --align-max-seed-length [INT]\t\tthe maximum length of a seed [graph k]\n");
fprintf(stderr, "\t --align-min-exact-match [FLOAT] fraction of matching nucleotides required to align sequence [0.7]\n");
fprintf(stderr, "\t --align-min-exact-match [FLOAT] \t\tfraction of matching nucleotides required to align sequence [0.7]\n");
fprintf(stderr, "\t --align-max-num-seeds-per-locus [INT]\tthe maximum number of allowed inexact seeds per locus [inf]\n");
} break;
case COMPARE: {
Expand Down Expand Up @@ -1142,9 +1136,7 @@ void Config::print_usage(const std::string &prog_name, IdentityType identity) {
// fprintf(stderr, "\t --align-alternative-alignments \tthe number of alternative paths to report per seed [1]\n");
fprintf(stderr, "\t --align-min-path-score [INT]\t\t\tthe minimum score that a reported path can have [0]\n");
fprintf(stderr, "\t --align-edit-distance \t\t\tuse unit costs for scoring matrix [off]\n");
fprintf(stderr, "\t --align-queue-size [INT]\t\t\tmaximum size of the priority queue for alignment [20]\n");
fprintf(stderr, "\t --align-vertical-bandwidth [INT]\t\tmaximum width of a window to consider in alignment step [inf]\n");
fprintf(stderr, "\t --align-max-nodes-per-seq-char [FLOAT]\tmaximum number of nodes to consider per sequence character [10.0]\n");
fprintf(stderr, "\t --align-max-nodes-per-seq-char [FLOAT]\tmaximum number of nodes to consider per sequence character [12.0]\n");
fprintf(stderr, "\t --align-max-ram [FLOAT]\t\tmaximum amount of RAM used per alignment in MB [200.0]\n");
fprintf(stderr, "\n");
fprintf(stderr, "\t --batch-align \t\talign against query graph [off]\n");
Expand Down
4 changes: 1 addition & 3 deletions metagraph/src/cli/config/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ class Config {
int32_t alignment_min_path_score = 0;
int32_t alignment_xdrop = 27;

size_t alignment_queue_size = 20;
size_t alignment_vertical_bandwidth = std::numeric_limits<size_t>::max();
size_t alignment_num_alternative_paths = 1;
size_t alignment_min_seed_length = 0;
size_t alignment_max_seed_length = std::numeric_limits<size_t>::max();
Expand All @@ -124,7 +122,7 @@ class Config {
double max_count_quantile = 1.;
double bloom_fpp = 1.0;
double bloom_bpk = 4.0;
double alignment_max_nodes_per_seq_char = 10.0;
double alignment_max_nodes_per_seq_char = 12.0;
double alignment_max_ram = 200;
double alignment_min_exact_match = 0.7;
std::vector<double> count_slice_quantiles;
Expand Down
1 change: 1 addition & 0 deletions metagraph/src/cli/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "common/unix_tools.hpp"
#include "common/utils/string_utils.hpp"
#include "common/utils/file_utils.hpp"
#include "common/utils/template_utils.hpp"
#include "graph/alignment/dbg_aligner.hpp"
#include "graph/annotated_dbg.hpp"
#include "seq_io/sequence_io.hpp"
Expand Down
7 changes: 7 additions & 0 deletions metagraph/src/common/logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,11 @@ void set_verbose(bool verbose);
extern std::shared_ptr<spdlog::logger> logger;

} // namespace common

#ifndef NDEBUG
#define DEBUG_LOG(...) common::logger->trace(__VA_ARGS__)
#else
#define DEBUG_LOG(...) (void)0
#endif

} // namespace mtg
Loading

0 comments on commit 9004644

Please sign in to comment.