Skip to content

Commit

Permalink
only run fermi-lite if input reads are present
Browse files Browse the repository at this point in the history
Note that there might be alternative approaches here: make this case
an error, for example. This solution simply doesn't generate an
assembly, which could lead to the currently handled error condition.
  • Loading branch information
satta committed Jul 31, 2016
1 parent 72e978f commit 94e1377
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions ariba/ext/fml-asm_ariba.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,14 @@ int assemble(char *readsFile, char *fastaOut, char* logfileOut)
// need to get the reads from the file every time, instead of before
// the loop because fml_assemble() destroys them :(
seqs = bseq_read(readsFile, &n_seqs);
fml_utg_t *utg;
utg = fml_assemble(&opt, n_seqs, seqs, &n_utg);
Assembly a(n_utg, utg, *minCountIter);
assemblies.push_back(a);
a.printStats(ofs);
fml_utg_destroy(n_utg, utg);
if (seqs && n_seqs > 0) {
fml_utg_t *utg;
utg = fml_assemble(&opt, n_seqs, seqs, &n_utg);
Assembly a(n_utg, utg, *minCountIter);
assemblies.push_back(a);
a.printStats(ofs);
fml_utg_destroy(n_utg, utg);
}
}

if (assemblies.size() == 0 || assemblies[0].numberOfContigs == 0)
Expand Down

0 comments on commit 94e1377

Please sign in to comment.