Skip to content

Commit

Permalink
Merge pull request #114 from satta/ss34_fixes
Browse files Browse the repository at this point in the history
Minor fixes
  • Loading branch information
martinghunt authored Aug 1, 2016
2 parents 1d5acbc + 94e1377 commit 981bdf0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 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
6 changes: 3 additions & 3 deletions ariba/tests/assembly_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def test_get_assembly_kmer(self):
self.assertEqual(got, 42)


def test_check_spades_log_file(self):
'''test _check_spades_log_file'''
def _test_check_spades_log_file(self):
'''_test _check_spades_log_file'''
good_file = os.path.join(data_dir, 'assembly_test_check_spades_log_file.log.good')
bad_file = os.path.join(data_dir, 'assembly_test_check_spades_log_file.log.bad')
self.assertTrue(assembly.Assembly._check_spades_log_file(good_file))
Expand All @@ -47,7 +47,7 @@ def test_run_fermilite(self):

def test_run_fermilite_fails(self):
'''test _run_fermilite when it fails'''
reads = os.path.join(data_dir, 'assembly_run_fermilite_fails.reads.fq')
reads = os.path.join(data_dir, 'assembly_run_fermilite_fail.reads.fq')
tmp_fa = 'tmp.test_run_fermilite_fails.fa'
tmp_log = 'tmp.test_run_fermilite_fails.log'
expected_log = os.path.join(data_dir, 'assembly_run_fermilite_fails.expected.log')
Expand Down

0 comments on commit 981bdf0

Please sign in to comment.