|
@@ -75,7 +75,7 @@ const denovoAssemblage = (reads, rnames, spadesPath) => {
|
|
|
const args = isPairedEnd ? ['-1', tmpSubReads[0], '-2', tmpSubReads[1]] : ['-s', tmpSubReads[0]];
|
|
const args = isPairedEnd ? ['-1', tmpSubReads[0], '-2', tmpSubReads[1]] : ['-s', tmpSubReads[0]];
|
|
|
const rsltDir = path_1.default.join(os_1.default.tmpdir(), (+new Date) + '_spades');
|
|
const rsltDir = path_1.default.join(os_1.default.tmpdir(), (+new Date) + '_spades');
|
|
|
yield async_exec(spadesPath, ['-t', threads, '--isolate', correction, ...args, '-o', rsltDir], console.log, console.log);
|
|
yield async_exec(spadesPath, ['-t', threads, '--isolate', correction, ...args, '-o', rsltDir], console.log, console.log);
|
|
|
- if (!isDone(rsltDir)) {
|
|
|
|
|
|
|
+ if (!isDone(rsltDir) && isPairedEnd) {
|
|
|
yield rmList([rsltDir]);
|
|
yield rmList([rsltDir]);
|
|
|
console.log('Trying meta');
|
|
console.log('Trying meta');
|
|
|
yield async_exec(spadesPath, ['-t', threads, '--meta', correction, ...args, '-o', rsltDir], console.log, console.log);
|
|
yield async_exec(spadesPath, ['-t', threads, '--meta', correction, ...args, '-o', rsltDir], console.log, console.log);
|
|
@@ -84,6 +84,10 @@ const denovoAssemblage = (reads, rnames, spadesPath) => {
|
|
|
reject('No convergence');
|
|
reject('No convergence');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ else if (!isDone(rsltDir) && !isPairedEnd) {
|
|
|
|
|
+ yield rmList([rsltDir, ...tmpSubReads]);
|
|
|
|
|
+ reject('No convergence');
|
|
|
|
|
+ }
|
|
|
yield rmList(tmpSubReads);
|
|
yield rmList(tmpSubReads);
|
|
|
resolve(rsltDir);
|
|
resolve(rsltDir);
|
|
|
}));
|
|
}));
|