Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: change rulename generate_pgx_report. Update HTML report with clinical recommendations #69

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .tests/integration/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ reference:
fai: "reference/hg19.chr6.fasta.fai"
dbsnp: "reference/dbsnp_138.sub.vcf.gz"

generate_pgx_report:
report_template: "reference/report_template.txt"
get_clinical_recommendations:
analysed_variants: "reference/analysed_variants.txt"

generate_depth_report:
generate_pgx_report:
html_template: "reference/html_template.html"
6 changes: 6 additions & 0 deletions .tests/integration/reference/analysed_variants.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Analyserade varianter:
DPYD= rs3918290: c.1905+1G>A, splice defect; rs72549303: c.1898delC, p.P633Qfs; rs72549309: c.299delTCAT; rs1801266: c.703C>T, p.R235W; rs1801268: c.2983G>T, p.V995F; rs78060119: c.1156G>T, p.E386X; rs55886062: c.1679T>G, p.I560S; rs75017182: c.1129-5923C>G; rs67376798: c.2846A>T, p.D949V; rs115232898: c.557A>G, p.Y186C. Dessa varianter motsvarar allelerna *2A, *3, *7, *8, *10, *12, *13, HapB3.

TPMT= rs1800462: c.238G>C, p.A80P; rs1142345: c.719A>G, p.Y240C; rs1800460: c.460G>A, p.A154T; rs1800584: c.626-1G>A. Dessa varianter motsvarar allelerna *2, *3A, *3B, *3C, *4.

NUDT15= rs147390019: c.7974G>A, p.R139H; rs186364861: c.52G>A, p.V18I; rs116855232: c. 7973C>T, p.R139C; rs746071566: c.50delGAGTCG, p.del17_18GV / c.55_56insGAGTCG, p.V18_V19insGV. Dessa varianter motsvarar allelerna *2, *3, *4, *5, *6, *9.
126 changes: 107 additions & 19 deletions .tests/integration/reference/html_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,64 @@
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />



<title>Farmakogenomisk analys av {{sample}}</title>

<style type="text/css">

</script>
<style type="text/css">
.collapsible {
background-color: #fcfcfc;
color: white;
cursor: pointer;
padding: 18px;
width: 100%;
border: none;
text-align: left;
outline: none;
}

.active, .collapsible:hover {
background-color: #edf0f2;
}

.collapsible:after {
content: '\002B';
color: #179bd7;
font-weight: bold;
float: right;
margin-left: 5px;
}

.active:after {
content: "\2212";
}

.content {
max-height: 0;
overflow: hidden;
transition: max-height 0.2s ease-out;
}
</style>


<style type="text/css">
.pagedtable-index-current {
font-weight: bold;
}
#main a.anchor-section {
color: #BBB;
}

h1,h2,h3,h4,h5,h6,legend{
h1,h2,h3,h4,h5,h6,legend, .collapsible{
font-family:"Roboto Slab","ff-tisa-web-pro","Georgia",Arial,sans-serif;
font-weight:700;
color: #9F2042;
}
h1{
h1, .collapsible{
font-size:2rem;
margin-top: 1em;
margin-bottom: 1.2em;
}
h1.title {
h1.title, .collapsible {
margin-top: 1em;
}
h1.title,
Expand Down Expand Up @@ -481,7 +513,7 @@
</style>

</style>
<style type="text/css">h1, h2, h3, h4, h5, h6, legend {
<style type="text/css">h1, h2, h3, h4, h5, h6, legend, .collapsible {
color: #179bd7;
}
#sidebar h2 {
Expand Down Expand Up @@ -593,11 +625,13 @@ <h2><a href="#content">Farmakogenomisk analys av {{sample}}</a></h2>
<div id="toc">
<ul>
<li><a href="#provdetaljer">Provdetaljer</a></li>
<li><a href="#läsdjup-vid-vildtyp-kliniska-targets">Läsdjup vid
vildtyp kliniska targets</a></li>
<li><a href="#läsdjup-vid-targets">Läsdjup vid targets</a></li>
<li><a href="#Kliniska-rekommendationer">Kliniska rekommendationer</a></li>
<li><a href="#Detekterade-varianter">Detekterade varianter</a></li>
<li><a href="#läsdjup-vid-vildtyp-kliniska-targets">Läsdjup för kliniska positioner</a></li>
<li><a href="#Analyserade-varianter">Analyserde varianter</a></li>
<li><a href="#Haplotype">Haplotyper</a></li>
</ul>
</div>
</div>
</div>
<!-- Don't indent these lines or it will mess pre blocks indentation -->
<div id="main">
Expand Down Expand Up @@ -639,22 +673,76 @@ <h1>Provdetaljer</h1>

</tbody>
</table>

<div id="Kliniska-rekommendationer" class="section level1">
<button class="collapsible">Kliniska rekommendationer <span style="color:#f00; font-size:3rem"> {{ warning_rec }}</span></button>
<div class="content">
{{ rekommendation }}
</div>
</div>
<button class="collapsible">Detekterade varianter <span style="color:#f00; font-size:3rem"> {{ warning_rec }}</span></button>
<div class="content">
<div id="Detekterade-varianter" class="section level1" style="overflow:auto;">
<tbody>
<tr>
<td style="text-align:left;width: 15em;border-right:1px solid; overflow-x:auto;">
{{ detected_variants }}
</td>
</tr>
</tbody>
</div>
</div>

<div id="läsdjup-vid-vildtyp-kliniska-targets" class="section level1">
<h1>Läsdjup för kliniska positioner</h1>

<button class="collapsible">Läsdjup för kliniska positioner <span style="color:#f00; font-size:3rem"> {{ warning_depth }}</span> </button>
<div class="content">
{{ table }}
</td>
</tr>
</tbody>
</table>
</div>
</div>

<div id="Analyserade-varianter" class="section level1">
<button class="collapsible">Analyserade varianter</button>
<div class="content">
<table class="table table-striped" style="margin-left: auto; margin-right: auto;">
<tbody>
<tr>
<td style="text-align:left;width: 15em;border-right:1px solid;">
{{ analysed_variants }}
</td>
</tr>
</tbody>
</table>
</div>
<div id="läsdjup-vid-targets" class="section level1">
<h1>Läsdjup vid targets</h1>

</div>

<div id="Haplotype" class="section level1">
<button class="collapsible">Haplotyper</button>
<div class="content">
{{ haplotype_definitions }}

</div>


<script>
var coll = document.getElementsByClassName("collapsible");
var i;

for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("active");
var content = this.nextElementSibling;
if (content.style.maxHeight){
content.style.maxHeight = null;
} else {
content.style.maxHeight = content.scrollHeight + "px";
}
});
}
</script>


</body>
</html>
</html>
8 changes: 4 additions & 4 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ get_clinical_guidelines:
get_interaction_guidelines:
interaction_guidelines: "data/guidelines/interaction_guidelines.csv"

generate_pgx_report:
report_template: "data/templates/report_template.txt"
get_clinical_recommendations:
analysed_variants: "config/templates/analysed_variants.txt"

generate_depth_report:
html_template: "data/templates/html_template.html"
generate_pgx_report:
html_template: "config/templates/html_template.html"
10 changes: 5 additions & 5 deletions config/output_files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ files:
- N

- name: "_copy_pgx_report"
input: "pgx/generate_pgx_report/{sample}_{type}_pgx_report.txt"
output: "results/dna/pgx/{sample}_{type}.pgx_report.txt"
input: "pgx/get_clinical_recommendations/{sample}_{type}_pgx_clinical_recommendations.txt"
output: "results/dna/pgx/{sample}_{type}.pgx_clinical_recommendations.txt"
types:
- T
- N

- name: "_copy_pgx_depth_excel"
input: "pgx/generate_depth_report/{sample}_{type}_pgx_depth.xlsx"
input: "pgx/generate_pgx_report/{sample}_{type}_pgx_depth_table.xlsx"
output: "results/dna/pgx/{sample}_{type}.pgx_depth_table.xlsx"
types:
- T
- N

- name: "_copy_pgx_depth_html"
input: "pgx/generate_depth_report/{sample}_{type}_pgx_depth.html"
output: "results/dna/pgx/{sample}_{type}.pgx_depth_table.html"
input: "pgx/generate_pgx_report/{sample}_{type}_pgx_report.html"
output: "results/dna/pgx/{sample}_{type}.pgx_report.html"
types:
- T
- N
6 changes: 6 additions & 0 deletions config/templates/analysed_variants.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Analyserade varianter:
DPYD= rs3918290: c.1905+1G>A, splice defect; rs72549303: c.1898delC, p.P633Qfs; rs72549309: c.299delTCAT; rs1801266: c.703C>T, p.R235W; rs1801268: c.2983G>T, p.V995F; rs78060119: c.1156G>T, p.E386X; rs55886062: c.1679T>G, p.I560S; rs75017182: c.1129-5923C>G; rs67376798: c.2846A>T, p.D949V; rs115232898: c.557A>G, p.Y186C. Dessa varianter motsvarar allelerna *2A, *3, *7, *8, *10, *12, *13, HapB3.

TPMT= rs1800462: c.238G>C, p.A80P; rs1142345: c.719A>G, p.Y240C; rs1800460: c.460G>A, p.A154T; rs1800584: c.626-1G>A. Dessa varianter motsvarar allelerna *2, *3A, *3B, *3C, *4.

NUDT15= rs147390019: c.7974G>A, p.R139H; rs186364861: c.52G>A, p.V18I; rs116855232: c. 7973C>T, p.R139C; rs746071566: c.50delGAGTCG, p.del17_18GV / c.55_56insGAGTCG, p.V18_V19insGV. Dessa varianter motsvarar allelerna *2, *3, *4, *5, *6, *9.
Loading
Loading