Reads an RDS file, verifies it contains a valid molpath_db object,
and prints a summary of the loaded database.
Examples
# \donttest{
db <- mp_example_db(n_patients = 5, seed = 1)
tmp <- tempfile(fileext = ".rds")
mp_save_db(db, tmp)
#>
#> ── Saving molpath database ──
#>
#> ── Validating molpath database ──
#>
#> ✔ No referential integrity issues found.
#>
#> ── Data completeness
#> • Patients with samples: 100%
#> • Patients with variants: 100%
#> • Patients with reports: 100%
#> • Patients with clinical: 100%
#> • Patients with survival: 100%
#> ✔ Database saved to C:\Users\raban\AppData\Local\Temp\RtmpeEwZuU\file7708ed3b26.rds (38.3 KB).
db2 <- mp_load_db(tmp)
#>
#> ── Loading molpath database ──
#>
#> ✔ Database loaded from C:\Users\raban\AppData\Local\Temp\RtmpeEwZuU\file7708ed3b26.rds.
#> ℹ Contents: 5 patients, 11 samples, 2011 variants, 11 reports, 20 clinical records, 5 survival records.
unlink(tmp)
# }