├── R-color.md └── README.md /R-color.md: -------------------------------------------------------------------------------- 1 | # Adding color to plots in R 2 | 3 | The default colors in R (e.g., ggplot2) are not great, and indeed 4 | there are much better coloring schemes. This is one that is intended 5 | to be more visually distinguishable for people affected by color 6 | blindness: 7 | 8 | ```R 9 | colors <- c("#E69F00","#56B4E9","#009E73","#F0E442", 10 | "#0072B2","#D55E00","#CC79A7") 11 | ``` 12 | 13 | These colors are based on 14 | [this paper](http://dx.doi.org/10.1038/nmeth.1618). See also 15 | [here](http://www.cookbook-r.com/Graphs/Colors_(ggplot2)). 16 | 17 | Here is a short R script demonstrating how to use it in ggplot2: 18 | 19 | ``` 20 | library(ggplot2) 21 | colors <- c("#E69F00","#56B4E9","#009E73","#F0E442", 22 | "#0072B2","#D55E00","#CC79A7") 23 | data(iris) 24 | iris <- transform(iris,Petal.Length = cut(Petal.Length,breaks = 0:7)) 25 | print(ggplot(iris,aes(x = Sepal.Length,y = Sepal.Width,col = Petal.Length)) + 26 | geom_point(size = 2) + 27 | scale_color_manual(values = colors) + 28 | theme_minimal()) 29 | ``` 30 | 31 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Effective Computing for Computational Biologists* 2 | 3 | Effective Computing is about improving your skills and adopting Best 4 | Practices to help make you a better programmer, *and a better 5 | scientist.* This is a curated [short 6 | list](https://www.merriam-webster.com/dictionary/shortlist) of 7 | resources to help you achieve these aims. 8 | 9 | *We welcome community contributions.* If you have a suggestion or comment, 10 | please post an 11 | [Issue](https://github.com/stephenslab/effective-computing/issues). 12 | 13 | ## General 14 | 15 | + [Practical Computing for Biologists](http://practicalcomputing.org). 16 | 17 | + [Effective Computation in Physics](http://physics.codes). 18 | 19 | + [Intro to Scientific Computing for Biologists](http://allesinalab.uchicago.edu/wp-content/uploads/2014/05/IntroSciComp2014.pdf). 20 | 21 | + [Software Carpentry](http://software-carpentry.org/lessons). 22 | 23 | + [Data Carpentry](http://www.datacarpentry.org/lessons). 24 | 25 | + [The Missing Semester of Your CS Education](https://missing.csail.mit.edu). 26 | 27 | + [NCEAS "hacking skills" lessons](https://nceas.github.io/oss-2017). 28 | 29 | + [OHI "Better Science in Less Time" list of 30 | resources](http://ohi-science.org/news/Resources-for-R-and-Data-Science). 31 | 32 | ## Organizing, documenting and sharing (including version control) 33 | 34 | + [A guide to reproducible code in ecology and 35 | evolution](http://www.britishecologicalsociety.org/publications/guides-to): 36 | skills and tips for making your code more reproducible. (See also 37 | "A Guide to Data Management in Ecology and Evolution.") 38 | 39 | + [Github](http://github.com), [Bitbucket](http://bitbucket.org) and 40 | [Gitlab](http://gitlab.com). 41 | 42 | + [An introduction to the basics of git and 43 | Github](https://doi.org/10.1371/journal.pcbi.1004668). 44 | 45 | + [Pro Git](https://git-scm.com/book). 46 | 47 | + [Git Extras](https://github.com/tj/git-extras). 48 | 49 | + [Markdown](http://daringfireball.net/projects/markdown/syntax). 50 | 51 | + [R Markdown](http://rmarkdown.rstudio.com). 52 | 53 | + [Jupyter notebooks](https://jupyter.org). See 54 | [here](https://github.com/jupyter/jupyter/wiki/Jupyter-kernels) for 55 | the list of >40 programming languges supported by Jupyter notebooks. 56 | 57 | + [workflowr R package](https://github.com/jdblischak/workflowr). 58 | 59 | + Embedding math in webpages: [MathJax](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference). 60 | 61 | + Creating a "permanent resource" for your project: 62 | [Zenodo](http://zenodo.org); [Data Dryad](http://datadryad.org). 63 | 64 | + [A short tutorial](http://kbroman.org/simple_site) by Karl Broman on 65 | creating a website from Markdown using 66 | [Github Pages](https://pages.github.com). See also [this short 67 | tutorial](http://jmcglone.com/notes/2014/05/03/using-github-to-create-and-host-a-personal-website) 68 | on creating a website using Github and Jekyll. 69 | 70 | ## Programming and software design 71 | 72 | + [Software development is inherently 73 | wicked.](https://blog.codinghorror.com/development-is-inherently-wicked) 74 | 75 | + [Rubber duck debugging](https://en.wikipedia.org/wiki/Rubber_duck_debugging) 76 | 77 | + [The Practical Programmer](https://en.wikipedia.org/wiki/The_Pragmatic_Programmer), a book giving practical tips for software development. 78 | 79 | + [Jeff Leek's guide to developing R 80 | packages](https://github.com/jtleek/rpackages) (cross-listed below). 81 | 82 | ## Plots and data visualization 83 | 84 | + [D3](https://github.com/d3/d3) ("Data-Driven Documents"). 85 | 86 | + It is important to [choose colors wisely](R-color.md) so that they are 87 | visually distinguishable by most people. 88 | 89 | ## R 90 | 91 | + [CRAN](http://cran.r-project.org). 92 | 93 | + [BioConductor](http://bioconductor.org). 94 | 95 | + [RStudio](http://rstudio.com). 96 | 97 | + [Efficient R Programming](https://csgillespie.github.io/efficientR), 98 | see in particular [Efficient set-up](https://csgillespie.github.io/efficientR/set-up.html). 99 | 100 | + [Software for Data Analysis: Programming 101 | with R](http://dx.doi.org/10.1007/978-0-387-75936-4) by John Chambers. 102 | 103 | + [R for Data Science](http://r4ds.had.co.nz). 104 | 105 | + [Some advanced topics in R](http://adv-r.had.co.nz). 106 | 107 | + [Unofficial Rcpp documentation](https://thecoatlessprofessor.com/programming/unofficial-rcpp-api-documentation): a reference for [Rcpp](https://cran.r-project.org/package=Rcpp) all in one place. 108 | 109 | + [Short guide to writing your own R package](http://r-pkgs.had.co.nz). 110 | 111 | + [Jeff Leek's guide to developing R 112 | packages](https://github.com/jtleek/rpackages) (cross-listed above). 113 | 114 | + [Tutorials](https://github.com/lgatto/TeachingMaterial) on a variety 115 | of topics in R, from basic to advanced. 116 | 117 | + [Google's R programming style guide](https://google.github.io/styleguide/Rguide.xml) aimed at making R code easier to read, share and verify. 118 | 119 | + [Introductory Statistics with R](http://staff.pubhealth.ku.dk/~pd/ISwR.html). 120 | 121 | + [Data Analysis for the Life 122 | Sciences](https://leanpub.com/dataanalysisforthelifesciences) is available 123 | or free and all the examples and data anlyses are done in R. See 124 | [here](https://genomicsclass.github.io/book) for the R Markdown source 125 | in the book. 126 | 127 | + [STAT Labs: Mathematical Statistics through 128 | Applications](https://www.stat.berkeley.edu/~statlabs) uses R in its 129 | data analysis examples. 130 | 131 | + [Generalized Linear Models course at Princeton University](http://data.princeton.edu/wws509/R) with detailed illustrations of using 132 | generalized linear models in R. 133 | 134 | + [R tutorials](http://tutorials.iq.harvard.edu) available from the 135 | Institute For Quantitative Social Science at Harvard. 136 | 137 | ## Python 138 | 139 | + [Python tutorials](http://tutorials.iq.harvard.edu) available from 140 | the Institute For Quantitative Social Science at Harvard. 141 | 142 | ## Julia 143 | 144 | + [Fast Tack to Julia](https://juliadocs.github.io/Julia-Cheat-Sheet): 145 | a quick and dirty overview of Julia. 146 | 147 | + [The Julia Express](https://github.com/bkamins/The-Julia-Express): a 148 | concise Julia language introductory manual for programmers. 149 | 150 | + [Julia Manual](https://docs.julialang.org): the official 151 | documentation for the Julia Language. 152 | 153 | ## Containers and package managers 154 | 155 | + [Anaconda](https://www.continuum.io). 156 | 157 | + [Explanation](https://bioconda.github.io/faqs.html#conda-anaconda-minconda) 158 | of the difference between Anaconda, conda and Miniconda. 159 | 160 | ## Linux, the UNIX shell, and bash scripts 161 | 162 | + [Well-maintained Linux guides](http://tldp.org/guides.html), including the 163 | [Advanced Bash-scripting guide](http://tldp.org/LDP/abs/html). 164 | Appendix B of the Advanced Bash-scripting guide is a 165 | [useful reference card](http://tldp.org/LDP/abs/html/refcards.html). 166 | 167 | + [Julia Evans' Bash scripting quirks & safety 168 | tips](https://jvns.ca/blog/2017/03/26/bash-quirks): an accessible 169 | primer on writing bash scripts. 170 | 171 | + [explainshell.com](https://explainshell.com): resource for 172 | understanding shell scripts. 173 | 174 | + [Bash scripting cheat 175 | sheet](http://johnstowers.co.nz/pages/bash-cheat-sheet.html). 176 | 177 | + [ShellCheck](http://www.shellcheck.net) find bugs in your shell 178 | scripts. 179 | 180 | + [TLDR pages](http://tldr.sh): shell commands reference by example. 181 | 182 | ## macOS (previously Mac OS X) 183 | 184 | + [Mac OS X Setup Guide](http://sourabhbajaj.com/mac-setup) for 185 | development. [More setup 186 | advice](https://github.com/nicolashery/mac-dev-setup). 187 | 188 | + Package managers: [Homebrew](https://brew.sh), 189 | [MacPorts](https://www.macports.org). 190 | 191 | ## Development tools and environments 192 | 193 | + Text editors: 194 | [emacs](https://www.gnu.org/software/emacs), 195 | [vim](http://www.vim.org), 196 | [Sublime](https://www.sublimetext.com), 197 | [Atom](https://atom.io). 198 | 199 | ## Bioinformatics and computational biology resources 200 | 201 | + [Bioconda](https://bioconda.github.io). 202 | 203 | ## Best Practices 204 | 205 | + [Good Enough Practices in Scientific 206 | Computing](https://doi.org/10.1371/journal.pcbi.1005510). 207 | 208 | + [Best Practices for Scientific 209 | Computing](https://doi.org/10.1371/journal.pbio.1001745). 210 | 211 | + Some more recommended practices: 212 | [Noble, 2009](https://doi.org/10.1371/journal.pcbi.1000424). 213 | 214 | + [10 simple rules for making research software more 215 | robust](https://doi.org/10.1371/journal.pcbi.1005412). 216 | 217 | + [GNU Coding Standards](https://www.gnu.org/prep/standards). 218 | 219 | + Licenses for open source projects: 220 | [choosing a license](https://github.com/github/choosealicense.com); 221 | [how to add a license to a project](https://github.com/github/choosealicense.com/issues/243); 222 | [licensing data](https://wiki.creativecommons.org/wiki/Data#Which_components_of_databases_are_protected_by_copyright.3F). 223 | 224 | + [Making your code citable](https://guides.github.com/activities/citable-code/). 225 | 226 | ## Advocacy 227 | 228 | + Ince *et al* (2012) [The case for open computer 229 | programs](https://doi.org/10.1038/nature10836). 230 | 231 | + Morin *et al* (2012) [Shining light into black 232 | boxes](https://doi.org/10.1126/science.1218263). 233 | 234 | + R. D. Peng (2011) [Reproducible Research in Computational 235 | Science](https://doi.org/10.1126/science.1213847). 236 | 237 | + [The state of Jupyter](https://www.oreilly.com/ideas/the-state-of-jupyter) 238 | by Fernando Perez and Brian Granger: How Project Jupyter got here and 239 | where we are headed. 240 | 241 | ## License 242 | 243 | Copyright (c) Peter Carbonetto, 2017 244 | 245 | [![CC BY 4.0](https://i.creativecommons.org/l/by/4.0/88x31.png)](http://creativecommons.org/licenses/by/4.0/) 246 | 247 | This work is licensed under a [Creative Commons Attribution 4.0 248 | International License](http://creativecommons.org/licenses/by/4.0/). 249 | 250 | You must give appropriate attribution: mention that your work is 251 | derived from work that is Copyright (c) Peter Carbonetto and, where 252 | practical, linking to 253 | [this Github repository](https://github.com/pcarbo/effective-computing); 254 | provide a link to the 255 | [license](http://creativecommons.org/licenses/by/4.0/); and indicate 256 | if changes were made. You may do so in any reasonable manner, but not 257 | in any way that suggests the licensor endorses you or your use. 258 | 259 | ## Credits 260 | 261 | People who have contributed to these materials: John Blischak, Peter 262 | Carbonetto, Matthew Stephens. 263 | 264 | *Title adapted from [Effective Computation in Physics](http://physics.codes). 265 | 266 | --------------------------------------------------------------------------------