diff --git a/resources/mongodbMac.yaml b/resources/mongodbMac.yaml index d82a2bdaa7deaee335123f460e1795c2d9517196..81c917132edadd1502164070f337f3e3cc324ead 100755 --- a/resources/mongodbMac.yaml +++ b/resources/mongodbMac.yaml @@ -13,4 +13,3 @@ dependencies: - ncurses=6.2=h0a44026_1 - openssl=1.1.1h=haf1e3a3_0 - zlib=1.2.11=h1de35cc_3 -prefix: /Users/shatira/miniconda3/envs/mongodb diff --git a/src/backend/helpers/createUnits.js b/src/backend/helpers/createUnits.js index bda48e7b094ac3529405b3587e3804b620eeaf5b..df77e4895c313577e1b90a1eddb354d54e13a51d 100644 --- a/src/backend/helpers/createUnits.js +++ b/src/backend/helpers/createUnits.js @@ -3,6 +3,7 @@ const createUnits = (body, uniqueDir) => { const fs = require("fs"); const path = require("path"); const fields = ["sample", "lane", "techrep", "biorep", "fq1", "fq2"]; + const opts = { fields, delimiter: "\t" }; console.log("creating units"); if (body.remote) { diff --git a/src/backend/routes/api/comparisonController.js b/src/backend/routes/api/comparisonController.js index e7b406313c5ead7d5e7dea55ec0ca7e1aca443fe..ff251dd9b9b7b6304813c64a89d05e897c6f968b 100644 --- a/src/backend/routes/api/comparisonController.js +++ b/src/backend/routes/api/comparisonController.js @@ -31,7 +31,6 @@ router.post("/comparison", (req, res) => { } else { console.log("made validation"); if (!req.body.remote) { - const date = new Date().getTime().toString(); const uniqueDir = path.join( req.body.outdir, new Date().getTime().toString() @@ -100,15 +99,23 @@ router.post("/comparison", (req, res) => { // "../../../bisepsComparison/", // date // ); - const uniqueDir = path.join( - req.body.outdir, - new Date().getTime().toString() - ); - const uniqueDirRemote = path.join(req.body.remoteDir, date); + const uniqueDir = path + .join(req.body.outdir, new Date().getTime().toString()) + .split(path.sep) + .join(path.posix.sep); + const uniqueDirRemote = path + .join(req.body.remoteDir, date) + .split(path.sep) + .join(path.posix.sep); const profile = req.body.cluster - ? path.join(uniqueDir, "config/profiles/slurmComparison") - : path.join(uniqueDir, "config/profiles/localComparison"); - const homeDir = path.join(req.body.remoteDir, date); + ? path + .join(uniqueDir, "config/profiles/slurmComparison") + .split(path.sep) + .join(path.posix.sep) + : path + .join(uniqueDir, "config/profiles/localComparison") + .split(path.sep) + .join(path.posix.sep); const newComparison = new Comparison({ outdir: uniqueDir, diff --git a/src/backend/routes/api/runController.js b/src/backend/routes/api/runController.js index c971caf964759dc92ec7509e97971df14f2caca4..9e1f2a4ace7b4ab6d4bc762a1930a3d0aedb5113 100644 --- a/src/backend/routes/api/runController.js +++ b/src/backend/routes/api/runController.js @@ -30,11 +30,14 @@ router.post("/run", (req, res) => { return res.status(400).json(errors); } else { if (!req.body.remote) { - const uniqueDir = path.join( - req.body.outdir, - new Date().getTime().toString() - ); - const profile = path.join(uniqueDir, "config/profiles/local"); + const uniqueDir = path + .join(req.body.outdir, new Date().getTime().toString()) + .split(path.sep) + .join(path.posix.sep); + const profile = path + .join(uniqueDir, "config/profiles/local") + .split(path.sep) + .join(path.posix.sep); const newRun = new Run({ params: { @@ -90,13 +93,28 @@ router.post("/run", (req, res) => { spawnChild(req.body, profile, uniqueDir, "", false); } else { const date = new Date().getTime().toString(); - const uniqueDir = path.join(req.body.outdir, date); - const uniqueDirRemote = path.join(req.body.remoteDir, date); - const homeDir = path.join(req.body.remoteDir, date); + const uniqueDir = path + .join(req.body.outdir, date) + .split(path.sep) + .join(path.posix.sep); + const uniqueDirRemote = path + .join(req.body.remoteDir, date) + .split(path.sep) + .join(path.posix.sep); + const homeDir = path + .join(req.body.remoteDir, date) + .split(path.sep) + .join(path.posix.sep); console.log(homeDir); const profile = req.body.cluster - ? path.join(uniqueDir, "config/profiles/slurm") - : path.join(uniqueDir, "config/profiles/local"); + ? path + .join(uniqueDir, "config/profiles/slurm") + .split(path.sep) + .join(path.posix.sep) + : path + .join(uniqueDir, "config/profiles/local") + .split(path.sep) + .join(path.posix.sep); const newRun = new Run({ outdir: uniqueDir, @@ -214,7 +232,6 @@ router.post("/rerun", function (req, res) { req.body.cluster ? "config/profiles/slurm" : "config/profiles/local" ); const uniqueDirRemote = req.body.remoteDir; - const homeDir = path.join(req.body.remoteDir, uniqueDirRemote); spawnChild( req.body, profile, diff --git a/src/components/Comparisons/ComparisonForm.js b/src/components/Comparisons/ComparisonForm.js index ef0f70e143b8659a0cdd867c614c63e4263c756c..b124ae3c535d4968decedc454c07f4bcb57134d9 100644 --- a/src/components/Comparisons/ComparisonForm.js +++ b/src/components/Comparisons/ComparisonForm.js @@ -300,7 +300,12 @@ export default function ComparisonForm() { console.log(e.target.value); const newFiles = []; for (const file in e.target.value) { - newFiles.push(path.join("data/", path.basename(e.target.value[file]))); + newFiles.push( + path + .join("data/", path.basename(e.target.value[file])) + .split(path.sep) + .join(path.posix.sep) + ); console.log(e.target.value); console.log(newFiles); diff --git a/src/components/Table/NewTable.js b/src/components/Table/NewTable.js index c02386d5b0966b292952324f83a7988ac88ca5fb..a5cd988b23048afad5d25652894db4c9c9ee4549 100644 --- a/src/components/Table/NewTable.js +++ b/src/components/Table/NewTable.js @@ -321,10 +321,10 @@ export default function NewTable() { console.log(e.target.dataset.idx); const updatedRemoteUnits = [...remoteunits]; - updatedRemoteUnits[e.target.dataset.idx][e.target.id] = path.join( - "data", - path.basename(e.target.files[0].path) - ); + updatedRemoteUnits[e.target.dataset.idx][e.target.id] = path + .join("data", path.basename(e.target.files[0].path)) + .split(path.sep) + .join(path.posix.sep); setRemoteUnits(updatedRemoteUnits); updatedUnits[e.target.dataset.idx][e.target.id] = e.target.files[0].path; diff --git a/src/components/Table/Table.js b/src/components/Table/Table.js index 6c58a9e97bd1294d57350787980cc360ab0865af..499f44cfe8dc80f52e874386b6d132ed0e224ee9 100644 --- a/src/components/Table/Table.js +++ b/src/components/Table/Table.js @@ -111,7 +111,6 @@ export default function InteractiveList() { console.log(row); let remotePath = `${row.remoteDir}/${filePath}`; let localPath = row.date + filePath; - console.log(path.join(bisepsTemp, localPath)); sftp .connect({ host: row.machine.hostname, @@ -127,7 +126,10 @@ export default function InteractiveList() { console.log(localPath); console.log("made it all the way here?"); - return sftp.fastGet(remotePath, path.join(bisepsTemp, localPath)); + return sftp.fastGet( + remotePath, + path.join(bisepsTemp, localPath).split(path.sep).join(path.posix.sep) + ); }) .then((data) => { console.log(data);