Plots analytic minimum sample size necessary (MSSN) against equal fixed sequencing coverage for either a case-control sequencing trend design or a TDT1-NGS design. Calculations delegate to the corresponding public MSSN API.
plot_ngs_mssn(
design = c("cc", "tdt"),
coverage,
seq_error,
return_data = FALSE,
...
)Either "cc" for cc_ngs_mssn() or
"tdt" for tdt_ngs_mssn().
Non-empty numeric vector of integer fixed sequencing depths. TDT1-NGS requires coverage of at least 2.
Non-empty numeric vector of symmetric per-read sequencing error probabilities in \([0,0.5)\). Multiple values produce separate curves.
Logical. If TRUE, return the exact plotting data
rather than a ggplot object.
Fixed arguments passed to cc_ngs_mssn() or
tdt_ngs_mssn(). For case-control designs,
locus_het = TRUE permits a vector of pi values. TDT1-NGS
accepts a fixed locus_het and heter_rate through
...; its public convention is heter_rate = 1 - pi.
A ggplot object with exact results in plot$data, or a data
frame when return_data = TRUE.
The primary case-control y-axis is required cases; returned plot data also retain required controls, total MSSN, and achieved power. The primary TDT1-NGS y-axis is required complete trios; returned data also retain total individuals and achieved power.
At the case-control exact-null boundary pi = 0, no finite MSSN exists
when requested power exceeds alpha. The row is retained with MSSN and
achieved power set to NA, finite_mssn = FALSE, and status
"no finite MSSN". No artificial finite value is plotted. Only this
expected scientific condition is converted; invalid inputs and unexpected
calculation errors propagate unchanged.
Coverage is fixed and equal for the relevant study members. These plots do not model variable/BGE coverage distributions, cost optimization, or sample-specific depth. They use no simulation.
plot_ngs_mssn(
design = "tdt", coverage = c(4, 12, 20), seq_error = 0.005,
power = 0.80, pd = 0.325, R1 = 1.2, alpha = 5e-8,
verbose = FALSE
)
#> Ignoring unknown labels:
#> • colour : "Design"
#> • linetype : "Design"