Analysing cell adhesion
1 Assessment
This session is assessed using MCQs (questions below) and by pasting in your script in three separate questions. The actual questions can be found on the MB1080 Blackboard site. The deadline is listed there and on the front page of the MB1080 blackboard site. This assessment contributes 5% of module marks. You will receive feedback on this assessment after the submission deadline.
2 R scripts
This week you will be assessed on your script. As a reminder, below is what I said about scripts in the first semester.
One of the great advantages of R is reproducibility of your analysis (here’s a nice explanation to read in your own time). This is a major concern of modern biological research. But for the minute, lets imagine a simpler example. Imagine you have worked several years on an important project. The end result is actually the culmination of a large number of different analyses. You did this in a GUI based program e.g. graphpad prism (man I love those pressy buttons). You send the paper off for review. 3 months later (and years after you did your first analysis), one reviewer suggests that you should base your results on medians rather than means. Oh lordy, you now have to repeat all your analysis, trying to remember in which order you pressed all those lovely buttons.
Now lets assume that rather than heeding the alluring but ultimately unfufilling siren call of graphpad prism (or spss or minitab or the countless other products from companies trying to take money off you), you instead stayed on the true path of R. Well all your analyses would be in an R script. Then all you have to do would be to find the line of code where you asked for means and change that to medians.
In Rstudio, go to File and then New File and then R script. An empty sheet appears. I tend to write all my commands in there. Then I highlight them and press Run to test them. Save this script often. Things I will be looking for in your script is 1) you are not actually just using the console (there will be lots of > and 2) you comment at least three lines.
3 Getting the data into R
There are lots of ways of getting data into R. Its one of the most annoying things about it as a beginner. But I’m assuming everyone is using Rstudio, so I’ll show you how I get data in when someone gives me a csv file.
- Look at the right hand top window in Rstudio. See the Import Dataset. Use this to import the data as textfile or From Text (base) in newer versions. Make sure that the heading option is on.
- Notice what you really did was displayed in the console.
- That means if you pasted that into the script you would get the same effect (with your filepath not mine).
- Have a look at the data it should have 120 observations of 3 variables.
4 Data analysis for hand-in
In this study you are comparing three different genotypes to test if these genotype (AA, Aa and aa) influence the endothelial cells ability to bind to monocytes. To generate reliable data you will have repeated the experiment a number of times. The data generated includes 40 repeats.
In the analysis of this experiment you are asking two questions:
- Does the genotype have an effect on the amount of bound THP1 cells in normal physiological conditions (variable:normal)?
- Does the genotype have an effect on the amount of bound THP1 cells after prior stimulation with the cytokine TNFα (variable: TNFa)?
A good general framework for any analysis is Plot -> Model -> Check assumptions -> Interpret -> Plot again. We will follow this below.
4.1 Analysis for today
For each of the two variables, I need you to
- A quick explore of your data (maybe skimr or summary if you are having problems with skimr) and a boxplot to quickly check if species has an effect
- Carry out an ANOVA
- Check the assumptions of your model (autoplot)
- If significant and assumptions are met, do a tukey test, otherwise carry out a Kruskal wallis and then a dunn’s test
- A final plot (pretty boxplot?)
5 MCQs
- Does genotype have an effect on the amount of bound THP1 cells in normal physiological conditions(with correctly reported statistics (either parametric or nonparametric are fine))?
- If yes, which genotypes are different in normal physiological conditions (with correctly reported statistics)?
- Does the genotype have an effect on the amount of bound THP1 cells after prior stimulation with the cytokine TNFα (with correctly reported statistics (either parametric or nonparametric are fine)?
- If yes, which which treatments are different after prior stimulation with the cytokine TNFα (with correctly reported statistics)?