Skip to content

Commit

Permalink
Remove duplicate fastqs from inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Yan Xu committed Aug 19, 2024
1 parent 831d1fa commit 7e964e5
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions webapp/server/crons/pipelineMonitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ async function generateInputs(proj_home, conf, proj) {
const fileCode = path.basename(fq);
let name = await common.getRealName(fileCode);
const inputFq = inputDir + "/" + name;
if(!fs.existsSync(inputFq)) {
if (!fs.existsSync(inputFq)) {
fs.symlinkSync(fq, inputFq, 'file');
inputs.push(inputFq);
}
inputs.push(inputFq);
} else {
inputs.push(fq);
}
Expand All @@ -191,8 +191,10 @@ async function generateInputs(proj_home, conf, proj) {
const fileCode = path.basename(fq1);
let name = await common.getRealName(fileCode);
const inputFq = inputDir + "/" + name;
fs.symlinkSync(fq1, inputFq, 'file');
inputs_fq1.push(inputFq);
if (!fs.existsSync(inputFq)) {
fs.symlinkSync(fq1, inputFq, 'file');
inputs_fq1.push(inputFq);
}
} else {
inputs_fq1.push(fq1);
}
Expand All @@ -206,8 +208,10 @@ async function generateInputs(proj_home, conf, proj) {
const fileCode = path.basename(fq2);
let name = await common.getRealName(fileCode);
const inputFq = inputDir + "/" + name;
fs.symlinkSync(fq2, inputFq, 'file');
inputs_fq2.push(inputFq);
if (!fs.existsSync(inputFq)) {
fs.symlinkSync(fq2, inputFq, 'file');
inputs_fq2.push(inputFq);
}
} else {
inputs_fq2.push(fq2);
}
Expand Down

0 comments on commit 7e964e5

Please sign in to comment.