Skip to content

Commit

Permalink
Merge pull request #451 from kedhammar/toulligqc
Browse files Browse the repository at this point in the history
ToulligQC fixes
  • Loading branch information
kedhammar authored Dec 10, 2024
2 parents 7b3cb97 + ce63a6d commit 1df650f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
4 changes: 4 additions & 0 deletions VERSIONLOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# TACA Version Log

## 20241210.1

Tweaks and bugfixes for ToulligQC.

## 20241204.2

Add automated QC reports with ToulligQC for ONT.
Expand Down
9 changes: 6 additions & 3 deletions taca/nanopore/ONT_run_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,13 @@ def toulligqc_report(self):
samplesheet = ss_glob[0]

# Run has barcode subdirs
if len(glob.glob(f"{self.run_abspath}/fastq_pass/barcode*")) > 0:
barcode_dirs_glob = glob.glob(f"{self.run_abspath}/{raw_data_dir}/barcode*")
if len(barcode_dirs_glob) > 0:
barcode_dirs = True
raw_data_path = barcode_dirs_glob[0]
else:
barcode_dirs = False
raw_data_path = f"{self.run_abspath}/{raw_data_dir}"

# Determine barcodes
if samplesheet:
Expand All @@ -407,7 +410,7 @@ def toulligqc_report(self):

command_args = {
"--sequencing-summary-source": summary,
f"--{raw_data_format}-source": f"{self.run_abspath}/{raw_data_dir}",
f"--{raw_data_format}-source": raw_data_path,
"--output-directory": self.run_abspath,
"--report-name": "toulligqc_report",
}
Expand Down Expand Up @@ -443,7 +446,7 @@ def toulligqc_report(self):
report_src_path = self.get_file("/toulligqc_report/report.html")
report_dest_path = os.path.join(
self.toulligqc_reports_dir,
f"ToulligQC_{self.run_name}.html",
f"report_{self.run_name}.html",
)
transfer_object = RsyncAgent(
src_path=report_src_path,
Expand Down
5 changes: 3 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def create_dirs():
│ └── promethion
├── ngi-internal
│ ├── minknow_reports
│ └── toulligqc_reports
│ └── other_reports
│ └── toulligqc_reports
├── ngi-nas-ns
│ ├── Aviti_data
│ ├── NextSeq_data
Expand Down Expand Up @@ -95,7 +96,7 @@ def create_dirs():

# GenStat
os.makedirs(f"{tmp.name}/ngi-internal/minknow_reports")
os.makedirs(f"{tmp.name}/ngi-internal/toulligqc_reports")
os.makedirs(f"{tmp.name}/ngi-internal/other_reports/toulligqc_reports")

# Misc. ONT dirs/files
os.makedirs(f"{tmp.name}/log")
Expand Down
2 changes: 1 addition & 1 deletion tests/nanopore/test_ONT_run_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def make_ONT_test_config(tmp: tempfile.TemporaryDirectory) -> dict:
anglerfish_samplesheets_dir: {tmp.name}/ngi-nas-ns/samplesheets/anglerfish
anglerfish_path: mock
minknow_reports_dir: {tmp.name}/ngi-internal/minknow_reports/
toulligqc_reports_dir: {tmp.name}/ngi-internal/toulligqc_reports/
toulligqc_reports_dir: {tmp.name}/ngi-internal/other_reports/toulligqc_reports/
toulligqc_executable: toulligqc
rsync_options:
'-Lav': None
Expand Down

0 comments on commit 1df650f

Please sign in to comment.