Skip to content

Commit

Permalink
fix -completeness
Browse files Browse the repository at this point in the history
  • Loading branch information
arangrhie committed Jul 14, 2021
1 parent f048b5b commit a0f71f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/merfin/merfin-globals.C
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,6 @@ merfinGlobal::getK(kmer fmer,
void
merfinGlobal::load_Kmers(void) {

if (reportType == OP_COMPL) {
fprintf(stderr, "-- Not loading kmers; not necessary for -completeness mode.\n");
return;
}

double minMem, minMemTotal = 0;
double optMem, optMemTotal = 0;
bool useOpt = false;
Expand Down Expand Up @@ -175,10 +170,6 @@ merfinGlobal::load_Kmers(void) {
void
merfinGlobal::load_Sequence(void) {

if (reportType == OP_COMPL) {
return;
}

if (seqDBname == nullptr) {
seqDBname = new char[FILENAME_MAX+1];
snprintf(seqDBname, FILENAME_MAX, "%s.meryl", basename(seqName));
Expand Down
10 changes: 10 additions & 0 deletions src/merfin/merfin.C
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ main(int32 argc, char **argv) {
if (G->peak == 0) err.push_back("No haploid peak (-peak) supplied.\n");
}

if (G->reportType == OP_COMPL) {
if (G->seqName == nullptr &&
G->seqDBname == nullptr) err.push_back("No sequence meryl database (-seqmers) nor sequence (-sequence) supplied.\n");
}

if (G->reportType == OP_NONE) {
err.push_back("No report type (-filter, -polish, -hist, -dump, -completeness) supplied.\n");
}
Expand Down Expand Up @@ -255,6 +260,11 @@ main(int32 argc, char **argv) {
fprintf(stderr, "\n\n");
fprintf(stderr, " -completeness\n");
fprintf(stderr, " Compute kmer completeness using expected copy numbers for all kmers.\n");
fprintf(stderr, "\n");
fprintf(stderr, " Required: -seqmers (or -sequence), -readmers, -peak\n");
fprintf(stderr, " Optional: -prob <file> use probabilities to adjust multiplicity to copy number (recommended)\n");
fprintf(stderr, "\n");
fprintf(stderr, " Output: total kmers in reads, number of kmers under the expected copy number, and completeness\n");
fprintf(stderr, "\n\n");
fprintf(stderr, " Optional output from -debug in -filter and -polish:\n");
fprintf(stderr, " <output>.THREAD_ID.debug.gz : some useful info for debugging.\n");
Expand Down

0 comments on commit a0f71f5

Please sign in to comment.