Jelajahi Sumber

else resolve lacks

Thomas 3 tahun lalu
induk
melakukan
ea8ea0c7fd
2 mengubah file dengan 7 tambahan dan 2 penghapusan
  1. 4 1
      index.js
  2. 3 1
      index.ts

+ 4 - 1
index.js

@@ -79,11 +79,14 @@ const denovoAssemblage = (reads, rnames, spadesPath, log) => {
             yield rmList([rsltDir]);
             console.log('Trying meta');
             yield async_exec(spadesPath, ['-t', threads, '--meta', correction, ...args, '-o', rsltDir], log, log);
-            console.log('jhhhhhhhh');
             if (!isDone(rsltDir)) {
                 yield rmList([rsltDir, ...tmpSubReads]);
                 reject('No convergence');
             }
+            else {
+                yield rmList(tmpSubReads);
+                resolve(rsltDir);
+            }
         }
         else if (!isDone(rsltDir) && !isPairedEnd) {
             yield rmList([rsltDir, ...tmpSubReads]);

+ 3 - 1
index.ts

@@ -82,11 +82,13 @@ const denovoAssemblage = (
             await rmList([rsltDir])
             console.log('Trying meta')
             await async_exec(spadesPath, ['-t', threads, '--meta', correction, ...args, '-o', rsltDir], log, log)
-            console.log('jhhhhhhhh');
             
             if(!isDone(rsltDir)) {
                 await rmList([rsltDir, ...tmpSubReads])
                 reject('No convergence')
+            } else {
+                await rmList(tmpSubReads)
+                resolve(rsltDir)
             }
         } else if (!isDone(rsltDir) && !isPairedEnd) {
             await rmList([rsltDir, ...tmpSubReads])