This repository has been archived by the owner on May 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Laurent Gatto edited this page Mar 19, 2020
·
12 revisions
The Computational Proteomics Unit web page: https://lgatto.github.io/cpu-lab/
- Learn
git
(and a bit more aboutgit
),github
and here. - Learn the
shell
- Arguably the most important piece of software when doing computational work is an editor. Choose one wisely. It might take time to master it, but it is definitely a good time investment.
- Consistency is key.
-
R
installation. - Coding style: we follow the Bioconductor coding style. Also, use
TRUE
/FALSE
instead ofT
/F
. - Use
<-
for assignments. - Use a dotted function name for internal function:
.internalFunction
. - We generally prefer camel case. Snake case would be fine for a set of related internal helper functions: something like
is_scalar_character
,is_logical_character
, ... that all return alogical(1)
. Never ever mix (exported) snake and camel case for one package. Remember, consistency is key.
- Does your editor know
R
? If you useemacs
, go foress
; if you usevim
, look at thevim R plugin
. See alsoRStudio
.
- For OO programming, prefer S4 over S3. If relevant, use S4 Reference Classes. Consider R6, but discuss/motivate your choice.
- Only use generics and methods when using a function is not possible at all, i.e. the same function name is used for different classes (within the same or different package).
- Before writing a new generic, check if it doesn't already exists in
BiocGenerics
orProtGenerics
and consider asking the new generic to be added in one of those if relevant.
- Use
Authors@R
to define authors and their respective roles in theDESCRIPTION
file. -
Making
R
packages:maker
. -
devtools
androxygen
. - Note:
roxygen
is not only valuable in the frame of package development. Documenting a function with it outside of a package is recommended. - Use git/GitHub - all discussion about the package (software architecture, bugs, vignettes, ...) should be done through GitHub issues.
- use
maker
to automate and standardise development. - Use a
.Rbuildignore
file to bundle only what it needed (see below) - Use
testthat
for unit testing. - Use
covr
for coverage. - Use travis-ci and codecov for continuous integration. Ideally also test on Windows using appveyor.
- Use
BiocStyle::html_document2()
with floating toc for vignettes. - Write a
README.md
file. If it contains R code (that would be a good thing), use aREADME.Rmd
files, with a pre-commit hook and usemake README
frommaker
to build themd
file. TheRmd
file should be added to.Rbuildignore
so as to only keep themd
file the file package bundle (tar ball). - Write a
NEWS.md
file. TheNEWS
file should then be generated from the latter usingmake NEWS
frommaker
.NEWS.md
to be added to.Rbuildignore
and the latter to.gitignore(s)
. - Use
pkgdown
to generate the package webpage. Do not add thedocs
directory to the Bioconductor svn server (see https://lgatto.github.io/branch-specific-gitignore/ for details) - rOpenSci Packages: Development, Maintenance, and Peer Review
- R packages by Hadley Wickham
- Ten simple rules for making research software more robust
- Good Enough Practices in Scientific Computing
- Before being reproducible, your research should be organised.
-
Sweave
andknitr
LaTeX andR
Markdown [1, 2] vignettes. -
orgmode
(emacs
only). Make
- How we make our papers replicable, by Titus Brown.
-
pandoc
, the document converter. - Using knitr and pandoc to create reproducible scientific reports by Peter Humburg.
- A Reproducibility Reading List
- Teaching material
- R packages by Hadley Wickham
- Advanced R by Hadley Wickham
- R Programming for Bioinformatics by Robert Gentleman (ask me for the pdf)
- Managing Research Software Projects
- rOpenSci Packages: Development, Maintenance, and Peer Review
- How to be a modern scientist is a nice introduction to many aspects of modern, open digital scholarship, that are valued and applied at CPU.
We recently (November 2016) introduced official lab meetings in addition to more casual and daily interactions. Here's some advice on lab meeting code reviews.