Skip to content

Commit

Permalink
Allow more parents in experimental chimeras_denovo command
Browse files Browse the repository at this point in the history
  • Loading branch information
torognes committed Oct 26, 2023
1 parent 2f37815 commit 5dea255
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/chimera.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
/* global constants/data, no need for synchronization */
static int parts = 0;
const int maxparts = 100;
const int maxparents = 4; /* max, could be fewer */
const int window = 64;
const int few = 4;
const int maxcandidates = few * maxparts;
Expand Down
2 changes: 2 additions & 0 deletions src/chimera.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,6 @@
*/

const int maxparents = 20; /* max, could be fewer */

void chimera();
6 changes: 4 additions & 2 deletions src/vsearch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4775,9 +4775,11 @@ void args_init(int argc, char **argv)
fatal("The argument to chimeras_length_min must be at least 1");
}

if ((opt_chimeras_parents_max < 2) || (opt_chimeras_parents_max > 4))
if ((opt_chimeras_parents_max < 2) || (opt_chimeras_parents_max > maxparents))
{
fatal("The argument to chimeras_parents_max must be in the range 2 to 4");
char maxparents_string[25];
snprintf(maxparents_string, 25, "%d", maxparents);
fatal("The argument to chimeras_parents_max must be in the range 2 to %s.\n", maxparents_string);
}

if (options_selected[option_chimeras_parts] &&
Expand Down

2 comments on commit 5dea255

@frederic-mahe
Copy link
Collaborator

Choose a reason for hiding this comment

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

@torognes just so you know, I've started to write tests for the --chimeras_denovo command:

frederic-mahe/vsearch-tests@67aa7f4

About 70 tests so far, yet it barely scratches the surface of that complex feature.

@torognes
Copy link
Owner Author

Choose a reason for hiding this comment

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

Sounds good! In collaboration with colleagues at the Dept. of Biosciences at UIO, we are benchmarking and trying to improve on the chimera detection in long reads. The command and options may change.

Please sign in to comment.