Skip to content

Commit

Permalink
Bug fixes with mpp and decon
Browse files Browse the repository at this point in the history
  • Loading branch information
decrevi committed Aug 24, 2024
1 parent 3c29e97 commit eb1f79d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/metacerberus.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ def main():
if func.startswith("decon"):
fastq[key] = value
set_add(step_curr, 5.2, "STEP 5b: Reformating FASTQ files to FASTA format")
pipeline[metacerberus_qc.checkQuality.remote(value, config['EXE_FASTQC'], f"{config['EXE_FASTQC']}/{STEP[4]}/{key}/quality")] = key+'_decon'
pipeline[metacerberus_qc.checkQuality.remote(value, config['EXE_FASTQC'], f"{config['DIR_OUT']}/{STEP[4]}/{key}/quality")] = key+'_decon'
pipeline[metacerberus_formatFasta.reformat.remote(value, config, f"{STEP[5]}/{key}")] = key
if func == "removeN" or func == "reformat":
if func == "removeN":
Expand Down
2 changes: 2 additions & 0 deletions lib/metacerberus_decon.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
import os
from pathlib import Path
import subprocess
import hydraMPP


# Decontaminate single end reads
@hydraMPP.remote
def deconSingleReads(key_value, config, subdir):
path = Path(config['DIR_OUT'], subdir)

Expand Down
4 changes: 3 additions & 1 deletion lib/metacerberus_trim.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
import os
from pathlib import Path
import subprocess
import hydraMPP


# Trim single end reads
@hydraMPP.remote
def trimSingleRead(key_value, config, subdir):
path = Path(config['DIR_OUT'], subdir)

Expand Down Expand Up @@ -53,7 +55,7 @@ def trimPairedRead(key_value, config, subdir):
trimmedReads = (Path(path, outR1), Path(path, outR2))

done = path / "complete"
if not config['REPLACE'] and done.exists() and trimmedReads.exists():
if not config['REPLACE'] and done.exists() and trimmedReads[0].exists() and trimmedReads[1].exists():
return trimmedReads
done.unlink(missing_ok=True)
path.mkdir(exist_ok=True, parents=True)
Expand Down

0 comments on commit eb1f79d

Please sign in to comment.