Thomas 3 anni fa
parent
commit
c32beb622e
2 ha cambiato i file con 4 aggiunte e 5 eliminazioni
  1. 2 2
      index.js
  2. 2 3
      index.ts

+ 2 - 2
index.js

@@ -191,8 +191,8 @@ const asyncBwaMemWorker = (args) => __awaiter(void 0, void 0, void 0, function*
     const { refPath, reads, runName, libName, outputDir, onData } = args;
     yield asyncBwaMem(refPath, reads, runName, libName, outputDir, onData);
 });
-const scheduleAsyncBwaMem = (allReads, refPath, runName, libName, outputDir, onData) => __awaiter(void 0, void 0, void 0, function* () {
+const scheduleAsyncBwaMem = (allReads, refPath, runName, libName, allOutputDir, onData) => __awaiter(void 0, void 0, void 0, function* () {
     const q = fastq.promise(asyncBwaMemWorker, 1);
-    yield Promise.all(allReads.map(reads => q.push({ refPath, reads, runName, libName, outputDir, onData })));
+    yield Promise.all(allReads.map((reads, i) => q.push({ refPath, reads, runName, libName, outputDir: allOutputDir[i], onData })));
 });
 exports.scheduleAsyncBwaMem = scheduleAsyncBwaMem;

+ 2 - 3
index.ts

@@ -202,12 +202,11 @@ const scheduleAsyncBwaMem = async (
   refPath   : string,
   runName   : string,
   libName   : string,
-  outputDir : string,
+  allOutputDir : string,
   onData    : Function
 ) => {
   const q: queueAsPromised<Task> = fastq.promise(asyncBwaMemWorker, 1)
-  await Promise.all(allReads.map(reads => q.push({refPath, reads, runName, libName, outputDir, onData})))
+  await Promise.all(allReads.map((reads,i) => q.push({refPath, reads, runName, libName, outputDir:allOutputDir[i], onData})))
 }
 
-
 export { asyncBwaMem, writeSequence, makeReference, scheduleAsyncBwaMem }