Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
kedhammar committed Dec 16, 2024
1 parent 97ed033 commit b028362
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
6 changes: 5 additions & 1 deletion VERSIONLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

## 20241216.1

Email user instead of craching if unable to create Illumina runobject
Do not run ToulligQC if its output directory can be found.

## 20241216.1

Email user instead of crashing if unable to create Illumina runobject

## 20241212.2

Expand Down
13 changes: 11 additions & 2 deletions taca/nanopore/ONT_run_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,15 @@ def copy_html_report(self):
def toulligqc_report(self):
"""Generate a QC report for the run using ToulligQC and publish it to GenStat."""

report_dir_name = "toulligqc_report"

# Do not run this function if it's output dir exists in the run dir
if os.path.exists(f"{self.run_abspath}/{report_dir_name}"):
logging.info(
f"{self.run_name}: ToulligQC report dir already exists, skipping."
)
return None

# Get sequencing summary file
glob_summary = glob.glob(f"{self.run_abspath}/sequencing_summary*.txt")
assert len(glob_summary) == 1, f"Found {len(glob_summary)} summary files"
Expand Down Expand Up @@ -412,7 +421,7 @@ def toulligqc_report(self):
"--sequencing-summary-source": summary,
f"--{raw_data_format}-source": raw_data_path,
"--output-directory": self.run_abspath,
"--report-name": "toulligqc_report",
"--report-name": report_dir_name,
}
if barcode_dirs:
command_args["--barcoding"] = ""
Expand Down Expand Up @@ -443,7 +452,7 @@ def toulligqc_report(self):
f"{self.run_name}: Transferring ToulligQC report to ngi-internal..."
)
# Transfer the ToulligQC .html report file to ngi-internal, renaming it to the full run ID. Requires password-free SSH access.
report_src_path = self.get_file("/toulligqc_report/report.html")
report_src_path = self.get_file(f"/{report_dir_name}/report.html")
report_dest_path = os.path.join(
self.toulligqc_reports_dir,
f"report_{self.run_name}.html",
Expand Down

0 comments on commit b028362

Please sign in to comment.