Skip to content

Commit

Permalink
add version to report (#265)
Browse files Browse the repository at this point in the history
* add version to report

* update author
  • Loading branch information
nebfield authored Mar 19, 2024
1 parent 6d02f21 commit ec748b0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 11 additions & 2 deletions assets/report/report.qmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: PGS Catalog Calculator (`pgsc_calc`) report
author: PGS Catalog team
author: PGS Catalog Calculator (`pgsc_calc`)
date: today
title-block-banner: "#383434"
toc: true
Expand All @@ -16,6 +16,7 @@ params:
sampleset: ""
run_ancestry: false
reference_panel_name: ""
version: ""
css: logo.css
---

Expand Down Expand Up @@ -55,12 +56,20 @@ log_df <- Reduce(dplyr::bind_rows, lapply(log_paths, read_log))
log_df$sampleset <- gsub("_", " ", log_df$sampleset) # page breaking issues
```

# Pipeline command
# Workflow metadata

## Command

```{bash}
cat command.txt | fold -w 80 -s | awk -F ' ' 'NR==1 { print "$", $0} NR>1 { print " " $0}' | sed 's/$/\\/' | sed '$ s/.$//'
```

## Version

```{r, echo=FALSE}
message(params$version)
```

# Scoring file metadata

## Scoring file summary
Expand Down
2 changes: 2 additions & 0 deletions modules/local/score_report.nf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ process SCORE_REPORT {
"""
export TMPDIR=\$(mktemp -d --tmpdir=.) # tmpdir must always be writable for quarto
echo $workflow.commandLine > command.txt
echo "keep_multiallelic: $params.keep_multiallelic" > params.txt
echo "keep_ambiguous : $params.keep_ambiguous" >> params.txt
echo "min_overlap : $params.min_overlap" >> params.txt
Expand All @@ -44,6 +45,7 @@ process SCORE_REPORT {
-P sampleset:$meta.id \
-P run_ancestry:$run_ancestry \
-P reference_panel_name:$reference_panel_name \
-P version:$workflow.manifest.version \
-o report.html
cat <<-END_VERSIONS > versions.yml
Expand Down

0 comments on commit ec748b0

Please sign in to comment.