FredHutch / VISCtemplates

Tools for writing reproducible reports at VISC
Other
6 stars 2 forks source link

Automating some of the report QC steps #181

Open kelliemac opened 4 months ago

kelliemac commented 4 months ago

It would be really helpful to have functions that automate some of the common report QC steps (ideally directly on the pdf/docx files), such as:

and to have a use_this style function that drafts a .R file to run these on on the appropriate report files (which could then be customized with any other checks that the report writer wants to add). For example, a prototype that runs a spell check could be something like:

setwd("/Volumes/kmacphee/Caskey820Analysis/bcell/Caskey820_Bcell_PT_Report_high_dose_interim_v2")

pdf_file <- "Caskey820_Bcell_PT_Report_high_dose_interim_v2.pdf"

report_names_list <- c('Caskey', 'MacPhee', 'Sato', 'Beatman', 'Drienna')
visc_wordlist <- c('VISC', 'PubID', 'IAVI', 'VRC', 'unblinded', 'Reproducibility')
bcell_wordlist <- c('AIRR', 'BALDR', 'BCR', 'trimer',  'IgG', 'IgDiscover')
my_wordlist <- c(names_list, visc_wordlist, bcell_wordlist)

spelling::spell_check_files(pdf_file,
                             ignore = my_wordlist,
                             lang = "en_US")
kelliemac commented 4 months ago

If anyone has other ideas of QC steps to add to this list, or in general ways to speed up report QC by partially automating it, feel free to chime in! Just brainstorming for now.

kelliemac commented 4 months ago

sort of duplicate of https://github.com/FredHutch/VISCtemplates/issues/119

kelliemac commented 3 months ago

See example from C101 B cell report, using testthat package to automate some of the checks: https://github.com/FredHutch/Caskey820Analysis/tree/main/bcell/Caskey820_Bcell_PT_Report_high_dose_interim_v2/tests