Parses and tidies the TSO500 ctDNA (cttsov2) app-layer outputs that sit alongside the DRAGEN metrics files: the CombinedVariantOutput small variants, DNA fusions, TMB trace / MSAF, and per-exon / per-gene coverage reports.
These files appear in both Results/<sample>/ and a Logs_Intermediates/
subdirectory (byte-identical). nemo matches on bname only, so the two
copies would collide; refine_files() keeps the Results/ copy.
Super classes
nemo::Tool -> tidydragen::DragenTool -> DragenTso
Methods
Method new()
Create a new DragenTso object.
Usage
DragenTso$new(path = NULL, files_tbl = NULL)Arguments
path(
character(1))
Output directory of tool. Iffiles_tblis supplied, this is ignored.files_tbl(
tibble(n))
Tibble of files fromnemo::list_files_dir().
Method parse_smallvariants()
Parse only the [Small Variants] section of a
CombinedVariantOutput.tsv file, dropping the rest (sourced from the SAR
JSON instead).
Method parse_fusions()
Parse a Fusions.csv file (comment-prefixed header block,
then a CSV table; may hold zero data rows).
Method parse_sarinfo()
Parse a SampleAnalysisResults.json file; returns its data
block wrapped in a one-row tibble list-column. tidy_sarinfo() fans it out.
Examples
cls <- DragenTso; tool <- "dragentso"
indir <- system.file("extdata", tool, package = "tidydragen")
odir <- tempdir()
obj <- cls$new(indir)
obj$run(output_dir = odir, format = "parquet", input_id = "run1")
(lf <- list.files(odir, pattern = "dragentso_.*parquet", full.names = FALSE))
#> [1] "sampleA_dragentso_exoncov.parquet"
#> [2] "sampleA_dragentso_fusions.parquet"
#> [3] "sampleA_dragentso_genecov.parquet"
#> [4] "sampleA_dragentso_sarcnv.parquet"
#> [5] "sampleA_dragentso_sarinfo.parquet"
#> [6] "sampleA_dragentso_sarqc.parquet"
#> [7] "sampleA_dragentso_sarsnv.parquet"
#> [8] "sampleA_dragentso_sarsw.parquet"
#> [9] "sampleA_dragentso_sarswds.parquet"
#> [10] "sampleA_dragentso_smallvariants.parquet"
#> [11] "sampleA_dragentso_tmbmsaf.parquet"
#> [12] "sampleA_dragentso_tmbtrace.parquet"
