Merge branch 'cw-7333' into 'dev'
Handle full join fail during bambu quant [CW-7333] See merge request epi2melabs/workflows/wf-transcriptomes!333
This commit is contained in:
commit
3d04f3485a
@ -5,6 +5,15 @@ 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).
|
||||
|
||||
|
||||
## [v2.0.1]
|
||||
|
||||
This patch release of `wf-transcriptomes` handles an additional quantification failure case that was not observed before release.
|
||||
Users of wf-transcriptomes v2.0.0 who have encountered issues during quantification should adopt this release.
|
||||
|
||||
### Fixed
|
||||
- Error in full_join encountered during runPerSampleBambuQuant when all read classes have no compatible transcript assignment.
|
||||
|
||||
|
||||
## [v2.0.0]
|
||||
|
||||
This release refreshes `wf-transcriptomes` around a new reference-guided transcriptomics workflow built on `bambu`, with `SQANTI3` transcript classification and QC, `DESeq2` for differential gene expression, `DEXSeq` for differential transcript usage, and per-sample modified base summarisation with `modkit` when modification tags are present in aligned BAMs.
|
||||
|
||||
@ -325,6 +325,9 @@ bambu_known_quant_edge_error_kind <- function(msg) {
|
||||
if (grepl("eqClassById` with `y$eqClassById` due to incompatible types.", msg, fixed = TRUE)) {
|
||||
return("eqClassById_incompatible_types")
|
||||
}
|
||||
if (grepl("Can't convert `x$txid` <vctrs_unspecified> to match type of `txid` <integer>.", msg, fixed = TRUE)) {
|
||||
return("txid_unspecified_incompatible_types")
|
||||
}
|
||||
NA_character_
|
||||
}
|
||||
|
||||
|
||||
@ -663,6 +663,62 @@ testthat::test_that("quant mode catches known eqClassById incompatible-type edge
|
||||
testthat::expect_equal(colnames(se), c("sampleA"))
|
||||
})
|
||||
|
||||
testthat::test_that("quant mode catches known txid unspecified edge case and writes empty outputs", {
|
||||
fixture_dir <- tempfile("bambu-quant-known-txid-edge-")
|
||||
dir.create(fixture_dir)
|
||||
|
||||
chunk_bundle <- list(
|
||||
chunk_id = "chr2",
|
||||
seqname = "chr2",
|
||||
aliases = c("sampleA"),
|
||||
sample_df = data.frame(alias = c("sampleA"), stringsAsFactors = FALSE),
|
||||
rc_files = list(sampleA = make_test_tx_se(sample_names = "sampleA")),
|
||||
annotation_tx_count = 1L
|
||||
)
|
||||
chunk_rds <- file.path(fixture_dir, "chr2.rds")
|
||||
saveRDS(chunk_bundle, chunk_rds)
|
||||
|
||||
discovered_annotation_rds <- file.path(fixture_dir, "annotations.rds")
|
||||
saveRDS(make_test_bambu_row_ranges(fixture_dir), discovered_annotation_rds)
|
||||
|
||||
analysis_called <- FALSE
|
||||
fake_analysis <- function(...) {
|
||||
analysis_called <<- TRUE
|
||||
stop(
|
||||
paste0(
|
||||
"Can't convert `x$txid` <vctrs_unspecified> ",
|
||||
"to match type of `txid` <integer>."
|
||||
),
|
||||
call. = FALSE
|
||||
)
|
||||
}
|
||||
|
||||
args <- workflow_glue_r_normalise_args(
|
||||
list(
|
||||
mode = "quant",
|
||||
genome = "genome.fa",
|
||||
out_dir = file.path(fixture_dir, "out"),
|
||||
chunk_rds = chunk_rds,
|
||||
discovered_annotation_rds = discovered_annotation_rds,
|
||||
transcriptome_mode = "discover",
|
||||
ndr = NULL,
|
||||
threads = 2
|
||||
),
|
||||
bambu_arg_spec()
|
||||
)
|
||||
|
||||
testthat::expect_warning(
|
||||
suppressMessages(main_run_bambu(args, analysis_fn = fake_analysis)),
|
||||
"known bambu chunk edge case"
|
||||
)
|
||||
|
||||
testthat::expect_true(analysis_called)
|
||||
|
||||
se <- readRDS(file.path(args$out_dir, "bambu_transcripts.rds"))
|
||||
testthat::expect_equal(nrow(se), 0)
|
||||
testthat::expect_equal(colnames(se), c("sampleA"))
|
||||
})
|
||||
|
||||
testthat::test_that("empty mode writes valid empty outputs including bambu rds files", {
|
||||
fixture_dir <- tempfile("bambu-empty-mode-")
|
||||
dir.create(fixture_dir)
|
||||
|
||||
@ -67,7 +67,7 @@ manifest {
|
||||
description = 'Long-read transcript discovery, quantification, differential expression, QC and mod counting.'
|
||||
mainScript = 'main.nf'
|
||||
nextflowVersion = '>=23.04.2'
|
||||
version = 'v2.0.0'
|
||||
version = 'v2.0.1'
|
||||
}
|
||||
|
||||
process {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user