~Fix:build_catalogues does not return anything unless its output is assigned to an object (e.g. build_catalogues(vars) does not return anything, but x <- build_catalogues(vars) does store the result in x). The catalogues table should be returned at the end of the function. (I've actually never seen this behaviour before. It seems that when assigning result to an object, the latest defined object within the function is used!)~ Done & tested
~Improvement: replace all returned objects which are currently matrices with data frames. This would allows selecting columns, e.g. exposures$mean$Signature1, which is currently not possible.~ Done & tested
~Improvement: Make all matrix objects (catalogues, signatures, etc.) interchangeable with data frames.~ Done & tested
~Improvement: make a wrapper function to convert_signatures that allows converting signatures between any two given sets of opportunities, with arguments opp_from and opp_to (allowing values "human-exome" and "human-genome"). This function would call convert_signatures twice, once to remove the current opportunities (model_to="emu") and another to impose the new opportunities (model_to="nmf"). Perhaps this function should be convert_signatures_opp and the current convert_signatures should be renamed to convert_signatures_model.~ Omitted, added genome-to-exome conversion example to the vignette
~Improvement: Print analogous messages to the Extracting N signatures message shown in extract_signatures, in functions fit_signatures and fit_extract_signatures.~ Done & tested
~Doc: Add a section at the end of the vignette (before explaining EMu and fit-extract) that shows how to create an input variant table from a VCF-like table, using BSgenome to extract trinucleotide contexts. (This won't be run in the vignette as we don't have Bioconductor dependencies.)~ Already mentioned briefly, I've added a link to BSgenome
~OPTIONAL change: rename method argument to model for clarity.~ Done & tested
Fixes/improvements for v1.2.0 (or v1.1.1):
retrieve_pars(stanfit, par="exposures")
returns exposures matrices with missing sample (row) names.~ Done & testedbuild_catalogues
does not return anything unless its output is assigned to an object (e.g.build_catalogues(vars)
does not return anything, butx <- build_catalogues(vars)
does store the result inx
). The catalogues table should be returned at the end of the function. (I've actually never seen this behaviour before. It seems that when assigning result to an object, the latest defined object within the function is used!)~ Done & testedexposures$mean$Signature1
, which is currently not possible.~ Done & testedconvert_signatures
that allows converting signatures between any two given sets of opportunities, with argumentsopp_from
andopp_to
(allowing values"human-exome"
and"human-genome"
). This function would callconvert_signatures
twice, once to remove the current opportunities (model_to="emu"
) and another to impose the new opportunities (model_to="nmf"
). Perhaps this function should beconvert_signatures_opp
and the currentconvert_signatures
should be renamed toconvert_signatures_model
.~ Omitted, added genome-to-exome conversion example to the vignetteExtracting N signatures
message shown inextract_signatures
, in functionsfit_signatures
andfit_extract_signatures
.~ Done & testedmethod
argument tomodel
for clarity.~ Done & tested