Thomas 4 éve
szülő
commit
cb62227508
2 módosított fájl, 2 hozzáadás és 2 törlés
  1. 1 1
      index.js
  2. 1 1
      index.ts

+ 1 - 1
index.js

@@ -67,7 +67,7 @@ const denovoAssemblage = (reads, rnames, spadesPath) => {
             const parsedPath = path_1.default.parse(R);
             const greper = parsedPath.ext === '.gz' ? 'zgrep' : 'grep';
             isfq.push(R.match(/\.fq/) ? true : false);
-            const tmp = path_1.default.join(os_1.default.tmpdir(), (+new Date) + '_' + parsedPath.name + (isfq ? '.fq' : '.fa'));
+            const tmp = path_1.default.join(os_1.default.tmpdir(), (+new Date) + '_' + parsedPath.name + (isfq[isfq.length] ? '.fq' : '.fa'));
             tmpSubReads.push(tmp);
             yield async_exec(greper, [rnamesSel, R, '-A3', '--no-group-separator', '>', tmp], console.log, console.log);
         }

+ 1 - 1
index.ts

@@ -64,7 +64,7 @@ const denovoAssemblage = (
             const parsedPath = path.parse(R)
             const greper = parsedPath.ext === '.gz' ? 'zgrep' : 'grep'
             isfq.push(R.match(/\.fq/) ? true : false)
-            const tmp = path.join(os.tmpdir(), (+new Date)  + '_' + parsedPath.name + (isfq ? '.fq' : '.fa'))
+            const tmp = path.join(os.tmpdir(), (+new Date)  + '_' + parsedPath.name + (isfq[isfq.length] ? '.fq' : '.fa'))
             tmpSubReads.push(tmp)
             await async_exec(greper, [rnamesSel, R, '-A3', '--no-group-separator', '>', tmp], console.log, console.log)