These are all the computer labs I wrote for a class I TA'd entitled, Quantiative Genetics and Genomics at Cornell University and Weill Cornell Medicine. The base of the computer labs were written by Zoe Zhao, you can get see these labs at https://github.com/zoezhao997/BTRY6830 . There are also video lectures that well correspond to the fundamental mathematics and biology of each lab. You can find these videos at http://mezeylab.cb.bscb.cornell.edu/Classes.aspx.
There may still be some bugs within the labs, but for the most part they are great. From basic R to MCMC, these labs provide a way to learn R in the context of genetics. The labs are all based in R-Markdown, which is something I have not seen in many other R lessons so hopefully you can take advantage of that fact here. The contents of the labs are as follows:
- R as a calculator
- Matrices and data frames
- R Markdown
- Functions
- For Loops
- If Statements
- Vector and Matrix calculations
- Plotting
- Probability Distributions
- Boolean Data
- Fancy vector indexing
- Dealing with missing data
- Pseudo-random numbers
- Pasting
- Speeding up your code
- Reading in genotype data
- Coding genotype data
- Performing hypothesis test on variants
- Producing Manhattan plots
- Performing many association tests
- QQ-Plots
- Multiple hypothesis testing corrections
- Principal Components Analysis
- Regrssion within R
- Adding covariates
- Converting data for PLINK
- Adding covariates rigerously
- Logistic Regression
- Implementing the IRLS Algorithm
- Making algorithms efficient
- Linear mixed models
- Implementing EM Algorithm
- Timing your code
- Explanation of Markov Chains and Monte Carlo Sampling
- Implementing MCMC Algorithm