Skip to content

Commit

Permalink
Merge pull request #379 from Clinical-Genomics/add_refseq_txs
Browse files Browse the repository at this point in the history
Add refseq txs
  • Loading branch information
northwestwitch authored Oct 28, 2024
2 parents 476c2ef + c81e28d commit 78cbe89
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## [unreleased]
### Added
- Refseq transcripts names on coverage overview page
### Fixed
- Addressed the `Starlette Denial of service (DoS) via multipart/form-data` by updating starlette library. among others

Expand Down
10 changes: 10 additions & 0 deletions src/chanjo2/meta/handle_d4.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def get_report_sample_interval_coverage(
genes_covered_under_custom_threshold = set()

for interval_nr, interval in enumerate(sql_intervals):

if interval.ensembl_id in interval_ids:
continue
for threshold in completeness_thresholds:
Expand Down Expand Up @@ -86,6 +87,15 @@ def get_report_sample_interval_coverage(
interval_hgnc_symbol,
interval_hgnc_id,
interval.ensembl_id,
(
{
"mane_select": interval.refseq_mane_select,
"mane_plus_clinical": interval.refseq_mane_plus_clinical,
"mrna": interval.refseq_mrna,
}
if isinstance(interval, SQLTranscript)
else {}
),
sample_name,
round(interval_coverage_at_threshold * 100, 2),
)
Expand Down
6 changes: 5 additions & 1 deletion src/chanjo2/meta/handle_report_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ def get_report_data(
db=session,
interval_type=INTERVAL_TYPE_SQL_TYPE[query.interval_type],
genes=genes,
transcript_tags=[TranscriptTag.REFSEQ_MRNA],
transcript_tags=[
TranscriptTag.REFSEQ_MANE_PLUS_CLINICAL,
TranscriptTag.REFSEQ_MANE_SELECT,
TranscriptTag.REFSEQ_MRNA,
],
)

for sample in query.samples:
Expand Down
19 changes: 15 additions & 4 deletions src/chanjo2/templates/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,22 @@
<td>
<a href="#" onclick="getGeneStatsPage({{row[1]}});">
{{row[0]}}
</a>
</a> <!-- link to gene -->
</td>
<td>{{ row[2] }}</td>
<td>{{ row[3] }}</td>
<td class="text-right">{{ row[4] }}</td>
<td>
{{ row[2] }} <!-- Ensembl ID -->
{% if row[3].mane_select %}
<span class="badge bg-dark float-end ">MANE Select: {{row[3].mane_select}}</span>
{% endif %}
{% if row[3].mane_plus_clinical %}
<span class="badge bg-dark float-end">MANE Plus Clinical: {{row[3].mane_plus_clinical}}</span>
{% endif %}
{% if row[3].mrna %}
<span class="badge bg-secondary float-end">{{row[3].mrna}}</span>
{% endif %}
</td>
<td>{{ row[4] }}</td> <!-- sample name -->
<td class="text-right">{{ row[5] }}</td> <!-- coverage stats -->
</tr>
{% else %}
<tr>
Expand Down

0 comments on commit 78cbe89

Please sign in to comment.