Skip to content

Commit

Permalink
Merge pull request #280 from microbiomedata/279-duplicate-fastq-inputs
Browse files Browse the repository at this point in the history
Remove duplicate fastqs from inputs
  • Loading branch information
yxu-lanl authored Aug 19, 2024
2 parents 831d1fa + 7e964e5 commit e211e5a
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 e211e5a

Please sign in to comment.