Workshop

Data Analysis 3: Immunobiology - Your data analysis

Introduction

In this workshop you will use the tools you used in the previous workshop (and before!) to analyse the data you have collected. You will provide some key pieces of information for the class data set.

Exercises

Getting started on your own analysis

🎬 Open the RStudio Project you created in the Consolidation exercise from week 2.

🎬 If you have not already done so, save your data files to the project. Are the file names going to be easy for you to work with? If not, rename them. Remember that we used the file names to label to rows with their treatment (Media, LPS or ECOLIGreen) and antibody (ISOTYPE or TNFAPC) so if you do not match the names you will need to change the code in “Add columns for treatment and antibody by extracting that information from the sample name.” and in “We can use the fct_relevel() function to put groups in order so that our graphs are better to interpret.”

🎬 The sample data had 22 columns. We used meta.csv to rename the columns. Some of those columns were not used and we dropped them. You data has been created without those columns. You will therefore use a different meta.csv file and you will not need to drop any columns.

🎬 Open your R script and begin to analyse your data.

Data for the class dataset.

You need to provide the following information for the class dataset:

  • group_name: A name for your group. Take care not to use a name used by others. Take care to use the exactly the same name for each of your rows

  • cell_treatment: One of MEDIA, LPS or ECOLIGreen

  • antibody: One of ISOTYPE or TNFAPC

  • n_cells: number of cells in sample after flowAI cleaning

  • n_cells_live: number of cells in sample after flowAI cleaning and removing debris

  • perc_nondebris: % “cleaned” cells that were not debris

  • apc_cut: threshold for logicle transformed TNFa_APC_Lin. This will be the same for all your samples

  • apc_mfi: Mean fluorescence intensity of the logicle transformed TNFa_APC_Lin in the TNF-α positive cells

  • n_pos_tnfa: Number of TNF-α positive cells

  • perc_tfna_pos: % non debris cells that are TNF-α positive cells

Enter these in the BIO00066I Biomedical Sciences class data

How to change the name of an RStudio project.

You may need to rename your RStudio Project to your exam number before you submit. You can change the name of an RStudio project by:

  • closing the project

  • renaming both the project folder and the .Rproj file.

Independent study following the workshop

Consolidate

The Code file

This contains all the code needed in the workshop even where it is not visible on the webpage.

The workshop.qmd file is the file I use to compile the practical. Qmd stands for Quarto markdown. It allows code and ordinary text to be interweaved to produce well-formatted reports including webpages. View the Qmd in Browser. Coding and thinking answers are marked with #---CODING ANSWER--- and #---THINKING ANSWER---

Pages made with R (R Core Team 2023), Quarto (Allaire et al. 2022), knitr (Xie 2022), kableExtra (Zhu 2021)

References

Allaire, J. J., Charles Teague, Carlos Scheidegger, Yihui Xie, and Christophe Dervieux. 2022. Quarto. https://doi.org/10.5281/zenodo.5960048.
R Core Team. 2023. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/.
Xie, Yihui. 2022. “Knitr: A General-Purpose Package for Dynamic Report Generation in r.” https://yihui.org/knitr/.
Zhu, Hao. 2021. “kableExtra: Construct Complex Table with ’Kable’ and Pipe Syntax.” https://CRAN.R-project.org/package=kableExtra.