Skip to content

Commit

Permalink
Merge branch 'CW-3367' into 'dev'
Browse files Browse the repository at this point in the history
fix depth plots [CW-3367]

Closes CW-3367

See merge request epi2melabs/workflows/wf-alignment!123
  • Loading branch information
julibeg committed Jan 23, 2024
2 parents 4dc967c + 9baa09d commit 942b5d3
Show file tree
Hide file tree
Showing 5 changed files with 13,599 additions and 13,593 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [unreleased]
## [v1.0.3]
### Fixed
- Fix regression in depth plots that concatenated the curves of the different samples, rather than displaying them as a multi-line plot

### Changed
- BAM tags from uBAM inputs are now carried over to the resulting BAM files.

Expand Down
7 changes: 5 additions & 2 deletions bin/workflow_glue/report_utils/sections.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,11 @@ def depths(report, depth_df):
with tabs.add_dropdown_menu():
for ref_file, df_ref_file in depth_df.groupby("ref_file"):
# prepare data for depth vs coordinate plot
df_depth_vs_coords = df_ref_file.eval("step = end - start").eval(
"total_mean_pos=step.cumsum() - step / 2"
df_depth_vs_coords = df_ref_file.eval("step = end - start")
# for each sample, get the mean position of each depth window (while
# concatenating all the sequences in that ref file)
df_depth_vs_coords = df_depth_vs_coords.groupby("sample_name").apply(
lambda df: df.eval("total_mean_pos=step.cumsum() - step / 2")
)
# prepare data for cumulative depth plot
df_cumul_depth = get_relative_cumulative_depths(df_ref_file)
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ manifest {
description = 'Align Nanopore reads and visualize mapping statistics.'
mainScript = 'main.nf'
nextflowVersion = '>=23.04.2'
version = 'v1.0.2'
version = 'v1.0.3'
}

epi2melabs {
Expand Down
Loading

0 comments on commit 942b5d3

Please sign in to comment.