5 Data Import with flowCore
and premessa
5.1 The Essentials
1. Load or install packages
if(!require(flowCore)) BiocManager::install("flowCore")
#> Loading required package: flowCore
if(!require(here)) install.packages("here")
#> Loading required package: here
#> here() starts at D:/Analysing-Cytometry-Data-With-R
if(!require(premessa)) devtools::install_github("ParkerICI/premessa")
#> Loading required package: premessa
2. Clean up channels and channel names with premessa
library(premessa)
paneleditor_GUI()
Note: After using this command, a window will pop up asking you to select a folder. Sometimes it is hidden behind other windows. R will be unresponsive until you interact with this window
a). Select the folder containing the fcs files (normally “/R_Analysis_001/Data/fcs”)
b). A web browser window will pop up showing all of the channels in your fcs files and highlighting any channel names that are different between your fcs files.
c). Check the channel names are the same (if not choose which channel name should be used)
d). Remove the following channels from the file - they are either unused or not necessary for the analysis
e). Enter the new folder name (we’ll used “pruned” for this tutorial)
- The files should be found in the Data/fcs folder we created last chapter
here::here() # check we're in the right folder
#> [1] "D:/Analysing-Cytometry-Data-With-R"
list.files(here::here("Data", "fcs")) #list fcs files
#> [1] "c09_2020-11-13_Helios1-5_Sample1-Unstimulated_01_0_SINGLETS.fcs"
#> [2] "c10_2020-11-13_Helios1-5_Sample1-Unstimulated_01_0fcs_SINGLETS.fcs"
#> [3] "c11_2020-11-13_Helios1-5_Sample1-Unstimulated_01_0fcs_SINGLETS.fcs"
#> [4] "c12_2020-11-13_Helios1-5_Sample1-Stimulated_04_0fcs_SINGLETS.fcs"
#> [5] "c13_2020-11-13_Helios1-5_Sample1-Stimulated_04_0fcs_SINGLETS.fcs"
#> [6] "c14_2020-11-13_Helios1-5_Sample1-Stimulated_04_0fcs_SINGLETS.fcs"
#> [7] "fcs-cleaned"
#> [8] "Live Singlets"
#> [9] "Normalised"
list.files(here::here("Data", "other")) # list meta files
#> [1] "Cluster_Merging_Table.xlsx"
#> [2] "Helios1-2_2020-01-29_metadata.xlsx"
#> [3] "HELIOS1-2_Acquisition-Template_Nov2019.csv"
#> [4] "Helios1-2_metadata_normalization.xlsx"
#> [5] "Helios1-5 _2020-11-13_metadata.xlsx"
#> [6] "Helios1-5_2020-11-13_Panel.csv"