Skip to content
Open
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
685dd90
reports as tabs and include customer ID in report
May 25, 2026
0e41aa0
update snaps
ieduba May 25, 2026
1dd4f7f
update changelog
ieduba May 25, 2026
afc7740
update changelog
ieduba May 25, 2026
829fc23
update tests
May 26, 2026
e709053
update snaps
ieduba May 26, 2026
968bc03
change ID scheme
May 26, 2026
d2e3282
remove find/concatenate module
ieduba May 26, 2026
46056a4
finish removing find/concat stuff
May 26, 2026
b3cebdd
update subworkflow snap
ieduba May 26, 2026
e6c0397
sort html inputs
May 26, 2026
16ef7f7
sort html inputs
May 26, 2026
3eaf01e
Merge branch 'dev' into saltshaker_reports
ieduba May 26, 2026
4b4bc8a
update snaps
ieduba May 26, 2026
8ced38b
merge
ieduba May 26, 2026
c8b23b0
suggestions from review
May 27, 2026
8365268
update snaps
ieduba May 27, 2026
cdde88e
add sample to test
May 27, 2026
1df42b4
Merge branch 'saltshaker_reports' of github.com:nf-core/raredisease i…
May 27, 2026
485fac3
add real tests
May 27, 2026
c946309
change sample map for proper joining
ieduba May 27, 2026
05fbed2
Merge
May 27, 2026
c274f5b
remove real tests
ieduba May 27, 2026
c4411d2
fix sample map join logic
May 28, 2026
0a27ea2
updated snaps
ieduba May 28, 2026
f4a95a8
Merge branch 'dev' into saltshaker_reports
ieduba May 28, 2026
1e78d9b
fix report prefix name
ieduba May 28, 2026
bfa6477
fix report prefix name
ieduba May 28, 2026
dc4b2ec
fix join logic and sample map order
May 29, 2026
c885635
Merge branch 'saltshaker_reports' of github.com:nf-core/raredisease i…
May 29, 2026
f9d47f5
add logic for missing saltshaker output
Jun 1, 2026
74c31b0
test new saltshaker version
Jun 1, 2026
a5dfbac
fix config
ieduba Jun 1, 2026
7624396
merge
ieduba Jun 1, 2026
7d05b2b
merge
ieduba Jun 1, 2026
1f64587
test update saltshaker plot
Jun 1, 2026
d2672d8
update saltshaker modules for real
Jun 5, 2026
3a54651
Merge branch 'dev' into saltshaker_reports
ieduba Jun 5, 2026
40218d7
fix some comments
Jun 5, 2026
f538661
update changelog
Jun 5, 2026
9b303de
Merge branch 'saltshaker_reports' of github.com:nf-core/raredisease i…
Jun 5, 2026
acc8c2c
merge
ieduba Jun 5, 2026
f8e0193
update pipeline snapshots
ieduba Jun 5, 2026
9f88765
add back test config
ieduba Jun 5, 2026
c1d97b9
filter classify to avoid mismatched joins
Jun 8, 2026
ec8f4f7
add stub for local module
Jun 8, 2026
ae0e125
update snaps
ieduba Jun 8, 2026
2d577e3
change subworkflow test
Jun 9, 2026
62801ff
Update bin/saltshaker_to_html.py
ieduba Jun 9, 2026
32cbf9a
empty lines in python per suggestion
ieduba Jun 9, 2026
6fe7f95
fix python linting
Jun 9, 2026
506da74
suggestions from review
Jun 9, 2026
596192c
move sorting to python script
Jun 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Added`

- Update saltshaker classification reporting by adding customer ID to samples' reports and displaying them as tabs in html [#856](https://github.com/nf-core/raredisease/pull/856)

### `Changed`

- Replace `ch_publish`/`subworkflow_results` with named typed channel emits for annotate_rhocallviz and annotate_genome_snvs subworkflows [#858](https://github.com/nf-core/raredisease/pull/858)
- Expand annotate_rhocallviz test with snapshot assertions [#858](https://github.com/nf-core/raredisease/pull/858)
- Refactor scatter_genome subworkflow: alias GAWK as `GENOME_FAI_TO_BED`, remove `val_save_reference` parameter, move interval flattening into `annotate_genome_snvs` [#857](https://github.com/nf-core/raredisease/pull/857)
- Replace `ch_publish`/`subworkflow_results` with named typed channel emits for qc_bam subworkflow [#853](https://github.com/nf-core/raredisease/pull/853)
- Replace `ch_publish`/`subworkflow_results` with named typed channel emits for alignment and subsample-MT subworkflows [#850](https://github.com/nf-core/raredisease/pull/850)
- Update saltshaker modules to version 1.1.1 so they can run on empty mitosalt output [#856](https://github.com/nf-core/raredisease/pull/856)
Comment thread
ieduba marked this conversation as resolved.

### `Fixed`

Expand Down
95 changes: 95 additions & 0 deletions bin/saltshaker_to_html.py
Comment thread
peterpru marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#!/usr/bin/env python3
import re
import typer
from pathlib import Path
from typing import List, Optional

CSS = """.tabcontent { display: none; }
.tabcontent.active { display: block; }
.tablinks { padding: 12px 20px; cursor: pointer; background-color: #f1f1f1; border: 1px solid #ccc; }
.tablinks.active { background-color: #4CAF50; color: white; }
.tablinks:hover { background-color: #ddd; }
"""

JS = """
function openTab(evt, tabName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].classList.remove("active");
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].classList.remove("active");
}
document.getElementById(tabName).classList.add("active");
evt.currentTarget.classList.add("active");
}
document.getElementsByClassName("tablinks")[0].click();
"""

Comment thread
ieduba marked this conversation as resolved.
def txt_to_html(txt_file):
with open(txt_file) as tf:
content = tf.read()
html_content = re.sub(r'\\n', '<br>', content)
return html_content

def create_tab_button(sample_id):
return f'''<button class="tablinks" onclick="openTab(event, '{sample_id}')">{sample_id}</button>\n'''

def create_tab_content(sample_id, txt_file):
html_content = txt_to_html(txt_file)
return f'''<div id="{sample_id}" class="tabcontent">
\t<h3>{sample_id}</h3>
\t<pre style="padding: 15px; border-radius: 5px; overflow-x: auto;">{html_content}</pre>
</div>
'''

app = typer.Typer()

@app.command()
def main(
input: List[Path] = typer.Option(
...,
"--input",
exists=True,
file_okay=True,
dir_okay=False,
help="Path to input .txt file (can be multiple)"
),
sample: List[str] = typer.Option(
...,
"--sample",
help="Sample ID(s) corresponding to the input .txt file(s)"
),
output: Path = typer.Option(
...,
"--output",
help="Path to output .html file"
)
):
Comment thread
ieduba marked this conversation as resolved.
tab_buttons = ''.join(create_tab_button(sid) for sid in sample)
tab_contents = ''.join(create_tab_content(sid, inp) for inp, sid in zip(input, sample))

html = f"""<html>
<head>
<style>
{CSS}
</style>
</head>
<body>
<div class="tab">
{tab_buttons}
</div>
{tab_contents}
<script>
{JS}
</script>
</body>
</html>"""

with open(output, 'w') as f:
f.write(html)

if __name__ == "__main__":
app()
4 changes: 4 additions & 0 deletions conf/modules/call_sv_MT.config
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ process {
].join(' ') }
}

withName: '.*CALL_SV_MT:SALTSHAKER_TO_HTML' {
ext.prefix = { "${meta.id}.saltshaker_classify" }
}

withName: '.*CALL_SV_MT:SALTSHAKER_PLOT' {
ext.args = '--blacklist --genes'
}
Expand Down
4 changes: 2 additions & 2 deletions conf/test.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.

Use as follows:
Expand Down
11 changes: 3 additions & 8 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,6 @@
"git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120",
"installed_by": ["modules"]
},
"find/concatenate": {
"branch": "master",
"git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120",
"installed_by": ["modules"]
},
"gatk4/bedtointervallist": {
"branch": "master",
"git_sha": "a89928b3f8b4fa91e4c783e769dbc10f91c89b32",
Expand Down Expand Up @@ -388,17 +383,17 @@
},
"saltshaker/call": {
"branch": "master",
"git_sha": "9d051963759dda1a424374e23f4f22aaa2b0bd60",
"git_sha": "0932567705843eb10831d31cb200ea3f69a2322e",
"installed_by": ["modules"]
},
"saltshaker/classify": {
"branch": "master",
"git_sha": "ff5f2ad4481a4a1e1769a1fad922681e7f7fd176",
"git_sha": "a61c82ad6d255d555aa6c7f1c3c0e90c3735c830",
"installed_by": ["modules"]
},
"saltshaker/plot": {
"branch": "master",
"git_sha": "ff5f2ad4481a4a1e1769a1fad922681e7f7fd176",
"git_sha": "a61c82ad6d255d555aa6c7f1c3c0e90c3735c830",
"installed_by": ["modules"]
},
"sambamba/depth": {
Expand Down
5 changes: 5 additions & 0 deletions modules/local/saltshaker_to_html/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
channels:
- conda-forge
- bioconda
dependencies:
- conda-forge::typer=0.25.1
28 changes: 13 additions & 15 deletions modules/local/saltshaker_to_html/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,25 @@ process SALTSHAKER_TO_HTML {
tag "$meta.id"
label "process_low"

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/a2/a23c958d5a0439419f82069df6217c542f6ab13816f9808ed73307dff1efe227/data':
'community.wave.seqera.io/library/typer:0.25.1--25ea8a9ce34456a3' }"

input:
tuple val(meta), path(classify)
tuple val(meta), path(saltshaker_classify_reports), val(sample_ids)

output:
tuple val(meta), path("*.html"), emit: classify_html

script:
def prefix = task.ext.prefix ?: "${meta.id}"
def args = task.ext.args ?: ""
"""
python3 << 'EOF'
import re
def saltshaker_txt_to_html(txt_file):
with open(txt_file) as f:
content = f.read()
html_content = re.sub(r'\\n', '<br>', content)
return html_content

html = saltshaker_txt_to_html("${classify}")
with open("${classify.baseName}.saltshaker_classify.html", 'w') as f:
f.write('<html><body>')
f.write(f'<pre style="padding: 15px; border-radius: 5px; overflow-x: auto;">{html}</pre>')
f.write('</body></html>')
EOF
saltshaker_to_html.py \
$args \
--input ${saltshaker_classify_reports.join(' --input ')} \
--sample ${sample_ids.join(' --sample ')} \
--output ${prefix}.html
"""
}
Comment thread
ieduba marked this conversation as resolved.
8 changes: 0 additions & 8 deletions modules/nf-core/find/concatenate/environment.yml

This file was deleted.

70 changes: 0 additions & 70 deletions modules/nf-core/find/concatenate/main.nf

This file was deleted.

Loading
Loading