Now that our package has draft implementations of most major steps, we should start to think about polishing the code more to emphasize simplicity, readability and consistency. Broadly speaking I think we should prioritize our choice of packages to use functions from sources in the following order:
- tidyverse packages from CRAN
- other packages from CRAN
- Bioconductor packages
- Packages only available on GitHub
The following packages that we currently depend on can probably be removed
The following packages are currently only available on GitHub. We cannot submit our package to CRAN or Bioconductor until these packages have been made available on one of those two resources:
Stylistically, I would like to also strictly enforce several concepts from functional programming:
- no loops - replace these with
group_modify or group_map from dplyr when working with data frames, and map (or its derivates) from purrr when working with lists
- immutable variables - once a variable is declare it should be modified. The only exception to this is to save memory
- descriptive variable names - variables which are not part of algebraic operations with formal notation in the manuscript should have descriptive variable names.
Now that our package has draft implementations of most major steps, we should start to think about polishing the code more to emphasize simplicity, readability and consistency. Broadly speaking I think we should prioritize our choice of packages to use functions from sources in the following order:
The following packages that we currently depend on can probably be removed
Rlab- uses amessage2function that is not even in the documentation - can we just use the basemessagefunction? - removeddoMC,doParallelandforeach- all of these can be replaced with a combination of tidyverse packages:future,dplyrandpurrr.data.table- thefreadfunction can be replaced with thevroomfunction from thevroompackage.plink2R- this can be replaced withsnpStatsfor loading bed/bim/fam files andpgenlibr- removedThe following packages are currently only available on GitHub. We cannot submit our package to CRAN or Bioconductor until these packages have been made available on one of those two resources:
susieRmr.mash.alpha- added to CRAN asmr.mashrmr.ash.alpha- for now this will be moved to SuSiEsusiF.alphasmashrmvsusieRStylistically, I would like to also strictly enforce several concepts from functional programming:
group_modifyorgroup_mapfromdplyrwhen working with data frames, andmap(or its derivates) frompurrrwhen working with lists