Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"githubPullRequests.ignoredPullRequestBranches": [
"main"
]
}
43 changes: 43 additions & 0 deletions Announcements.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: "Announcements"
format: html
toc: TRUE
toc-location: right
sidebar: false
---

![](/images/WebsiteBanner.png)

For previous course announcements emails, see the links below.

- January 21, 2026 [Cytometry in R - Start Date, Livestream Times, Pre-Course Materials](https://github.com/UMGCCCFCSR/CytometryInR/discussions/7)

- February 01, 2026 [Cytometry In R - Week #1 - Installing R packages](https://github.com/UMGCCCFCSR/CytometryInR/discussions/11)

- February 09, 2026 [Cytometry in R - Week # 2 - File Paths](https://github.com/UMGCCCFCSR/CytometryInR/discussions/41)

- February 16, 2026 [Cytometry in R - Week #03 - Inside an FCS File](https://github.com/UMGCCCFCSR/CytometryInR/discussions/65)

- February 22, 2026 [Cytometry in R - Week #4 - Introduction to Tidyverse](https://github.com/UMGCCCFCSR/CytometryInR/discussions/85)

- March 01, 2026 [Cytometry in R - Week #5 - Gating Sets](https://github.com/UMGCCCFCSR/CytometryInR/discussions/103)

- March 10, 2026 [No Class This Week](https://github.com/UMGCCCFCSR/CytometryInR/discussions/128)

- March 17, 2026 [Cytometry in R - Week # 6 - Visualizing with ggplot2](https://github.com/UMGCCCFCSR/CytometryInR/discussions/132)

- March 24, 2026 [Cytometry in R - Week # 07 - Applying Transformations](https://github.com/UMGCCCFCSR/CytometryInR/discussions/145)

- March 30, 2026 [Cytometry in R - Course Feedback Survey #1](https://github.com/UMGCCCFCSR/CytometryInR/discussions/151)

- April 07, 2026 [Cytometry in R - Week # 08 - Manual and Automated Gating](https://github.com/UMGCCCFCSR/CytometryInR/discussions/159)

- April 12, 2026 [Cytometry in R - Week # 09 - It's Raining Functions!](https://github.com/UMGCCCFCSR/CytometryInR/discussions/162)

- April 21, 2026 [No Class This Week](https://github.com/UMGCCCFCSR/CytometryInR/discussions/174)

- April 28, 2026 [Cytometry in R - Week # 10 - Downsampling and Concatenation](https://github.com/UMGCCCFCSR/CytometryInR/discussions/179)

- May 05, 2026 [Cytometry in R - Week # 11 - Data for Statistics](https://github.com/UMGCCCFCSR/CytometryInR/discussions/186)

![](images/YouTubeHex.png)
314 changes: 314 additions & 0 deletions Homeworks.qmd

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Cytometry in R is a free virtual mini-course being organized by the [Flow Cytome

We are excited that so many individuals worldwide have chosen to take part, and we look forward to helping you get started on your own learning journeys.

![](/images/WorldwideSignups.png){width=100%}
![](/images/WorldwideSignups.png){width="100%"}

Click here to go to our [Course Website](https://umgcccfcsr.github.io/CytometryInR)

Expand Down
6 changes: 3 additions & 3 deletions Schedule.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ No class week of March 30, 2026. If you are attending the [ABRF conference](http

![](https://images2.minutemediacdn.com/image/upload/c_fill,w_720,ar_16:9,f_auto,q_auto,g_auto/shape/cover/sport/raining-monkeys-e3fa8001e4eb47433b1cc58e2017d2b8.png){width=75%}

[**Week 9: April 13, 2026**]{.underline} In the course of this ninth session, we tackle one of the harder but most useful concepts to learn for a beginner, namely [functions](https://r4ds.had.co.nz/functions.html). We explore what they are, how their individual arguments work, how they differ from for-loops, and how to create our own to do useful work, reduce the number times code gets copied and pasted. Additionally, some functional programming best practices will be introduced, as well as provide introduction to how to use the walk and map functions from the [purrr](https://purrr.tidyverse.org/) package.
[**Week 9: April 13, 2026**]{.underline} In the course of this [ninth](/course/09_Functions/index.qmd) session, we tackle one of the harder but most useful concepts to learn for a beginner, namely [functions](https://r4ds.had.co.nz/functions.html). We explore what they are, how their individual arguments work, how they differ from for-loops, and how to create our own to do useful work, reduce the number times code gets copied and pasted. Additionally, some functional programming best practices will be introduced, as well as provide introduction to how to use the walk and map functions from the [purrr](https://purrr.tidyverse.org/) package.

<br>
<br>
Expand All @@ -126,7 +126,7 @@ No class week of March 30, 2026. If you are attending the [ABRF conference](http

![](https://www.ibm.com/content/dam/connectedassets-adobe-cms/worldwide-content/creative-assets/s-migr/ul/g/7d/10/downsampling-near-miss-v3.png){width=50%}

[**Week 10: April 20, 2026**]{.underline} Within this session, we will expand on our growing understanding of GatingSets, functions and fcs file internals to write a script to downsample your fcs files to a desired number (or percentage) of cells for a given cell population. We will additionally learn how to concatenate these downsampled files together, and save them to a new .fcs file in ways that the metadata can be read by commercial software without the scaling being widely thrown off.
[**Week 10: April 20, 2026**]{.underline} Within this [tenth](/course/10_Downsampling/index.qmd) session, we will expand on our growing understanding of GatingSets, functions and fcs file internals to write a function to downsample your fcs files to a desired number (or percentage) of cells for a given cell population. We will additionally learn how to concatenate these downsampled files together, and save them to a new .fcs file in ways that the metadata can be read by commercial software without the scaling being widely thrown off.

<br>
<br>
Expand All @@ -135,7 +135,7 @@ No class week of March 30, 2026. If you are attending the [ABRF conference](http

![](images/TidyData.png){width=33%}

[**Week 11: April 27, 2026**]{.underline} Leveraging the increased familiarity working with the various packages this far in the course, in this session we will retrieve summary statistics for the gates within our GatingSet, and programmatically derrive out tidy data.frames for use in statistical analyses typically used by many Immunologist. In the process, we add a couple additional plot types to our ggplot2 arsenal to hold in reserve should Prism prices go up again.
[**Week 11: April 27, 2026**]{.underline} Leveraging the increased familiarity working with the various packages this far in the course, in this [eleventh](/course/11_DataForStats/index.qmd) session we will retrieve summary statistics for the gates within our GatingSet, and programmatically derrive out tidy data.frames for use in statistical analyses typically used by many Immunologist. In the process, we add a couple additional plot types to our ggplot2 arsenal to hold in reserve should Prism prices go up again.

<br>
<br>
Expand Down
19 changes: 17 additions & 2 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ project:
- Schedule.qmd
- ExistingResources.qmd
- PackageWalkthroughs.qmd
- Homeworks.qmd
- Announcements.qmd
- course/index.qmd
- course/TakeAwayGallery.qmd
- 00_*
Expand All @@ -17,6 +19,9 @@ project:
- 06_*
- 07_*
- 08_*
- 09_*
- 10_*
- 11_*
website:
google-analytics: "G-LZ35J3XE4D"
announcement:
Expand All @@ -37,11 +42,15 @@ website:
href: Schedule.qmd
- text: "Course"
href: course/index.qmd
- text: "Announcements"
href: Announcements.qmd
right:
- text: Existing Resources
href: ExistingResources.qmd
- text: Discussions
href: https://github.com/UMGCCCFCSR/CytometryInR/discussions
- text: Homeworks
href: Homeworks.qmd
- icon: youtube
href: https://www.youtube.com/@CytometryInR
aria-label: YouTube
Expand Down Expand Up @@ -85,9 +94,15 @@ website:
- text: "07 - Applying Transformations"
href: course/07_Transformations/index.qmd
- text: "08 - Ways to Gate"
href: course/08_WaysToGate/index.qmd
href: course/08_WaysToGate/index.qmd
- text: "09 - It's Raining Functions!"
href: course/09_Functions/index.qmd
- section: "Cytometry Core"
href: Schedule.qmd
contents:
- text: "10 - Downsampling and Concatenation"
href: course/10_Downsampling/index.qmd
- text: "11 - Data for Statistics"
href: course/11_DataForStats/index.qmd
- section: "Beyond the Sandbox"
href: Schedule.qmd
- section: "The World is your Oyster"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Problem 1
We installed PeacoQC during this session, but we didn’t have time to explore what functions are present within the package. Using what you have learned about accessing documentation, figure out and list what functions it contains
```{r}
library(PeacoQC)
?PeacoQC
```

Problem 2
Take a closer look at the list of Bioconductor cytometry packages. Report back on how many there are currently in Bioconductor, the author/maintainer with the most contributed cytometry R packages, and a couple packages that you would be interested in exploring more in-depth later in the course.

```{r}
#I saved a screenshot in the folder showing how many cytometry related packages I found.

#One of the most active contributors appears to be the RGLab developer group, which maintains several core cytometry packages such as flowCore, flowWorkspace, openCyto, CytoML, and ggcyto. I would be interested in exploring further CytoML for FlowJo integration

```

Problem 3
There is another way to install R packages, using the newer pak package. Positron uses this when installing suggested dependencies.

After learning more about it via the documentation and it’s pkgdown website, I would like you to attempt to install the following three R packages using this newer method: “broom”, “cytoMEM”, “DillonHammill/CytoExploreR”.

Take screenshots, and in a new quarto markdown document, describe how the installation process differed from what you saw for install.packages(), install() and install_github().


```{r}
install.packages("pak")
library(remote)
library(pak)

pak::pkg_install("broom")
pak::pkg_install("cytoMEM")
pak::pkg_install("DillonHammill/CytoExploreR")

#I actually didn´t find it so different, to me, it looks like it took more time to install but it also showed how was going the installation step by step

#I could not install CytoExploreR by pak but it was possible with the install_github

remotes::install_github("DillonHammill/CytoExploreR")

```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions course/01_InstallingRPackages/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Before getting started, please make sure you have completed the creating a [GitH

:::{.callout-important}
Please make sure to [sync](/course/00_Homeworks/index.qmd#sync-your-fork) your forked version of the CytometryInR repository, and [pull](/course/00_Git/index.qmd#pull) any changes to your local computer's CytometryInR project folder so that you have the most recent version of the code and data available.

For YouTube walkthrough of this process, click [here](https://www.youtube.com/live/Zfctacqpe90?si=a7Ad61kj6_UDNkGw&t=32)
:::

<br>
Expand Down
1 change: 1 addition & 0 deletions course/01_InstallingRPackages/slides.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Before getting started, please make sure you have completed the creating a [GitH

Please make sure to [sync](/course/00_Homeworks/index.qmd#sync-your-fork) your forked version of the CytometryInR repository, and [pull](/course/00_Git/index.qmd#pull) any changes to your local computer's CytometryInR project folder so that you have the most recent version of the code and data available.

For YouTube walkthrough of this process, click [here](https://www.youtube.com/live/Zfctacqpe90?si=a7Ad61kj6_UDNkGw&t=32)
:::
:::

Expand Down
70 changes: 70 additions & 0 deletions course/02_FilePaths/homeworks/biancakbeck/homeworkWEEK2.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
Problem 1
Plug in an external hard-drive or USB into your computer. Manually, create a folder within called “TargetFolder”. Try to programmatically specify the file path to identify the folders and files present on your external drive. Then, try to copy your .fcs files from their current folder on your desktop to the TargetFolder on your drive using R. Remember, just copy, no deletion, you need to walk before you can run :D

```{r}
getwd()
FolderLocation <- "D:/TargetFolder"
FolderLocation
list.files(FolderLocation)
files_fcs <- list.files("D:/TargetFolder", pattern=".fcs", full.names=TRUE,recursive=FALSE)
files_fcs

Desktop <- "c:/Users/biihb/desktop"
list.files(Desktop)
file.copy(from=files_fcs , to=Desktop)

```

Problem 2
In this session, we used list.files() with the “full.names argument” set to TRUE, as well as the basename() function to identify specific files. But what if you wanted a particular directory. Run list.files() with “full.names argument” and “recursive” argument set to TRUE, and then search online to find an R function that would retrieve the “” individual directory folders.

```{r}
all_items <- list.files(
path = "D:/TargetFolder",
full.names = TRUE,
recursive = TRUE
)

all_items

list.dirs()
all_dirs <- list.dirs(
path = "D:/TargetFolder",
full.names = TRUE,
recursive = TRUE
)

all_dirs
#After using list.files() with full.names = TRUE and recursive = TRUE, I searched for a function that specifically retrieves directories instead of files. I found that the list.dirs() function in base R can be used to return only folder paths. This function supports recursive searching and full path retrieval similarly to list.files()
```

Problem 3
R packages often come with internal datasets, that are typically used for use in the help documentation examples. These can be accessed through the use of the system.file() function. See an example below.

system.file("extdata", package = "FlowSOM")

Using what we have learned about file.path navigation, search your way down the file.directory of the FlowSOM and flowWorkspace packages, and identify any .fcs files that are present for use in the documentation.

```{r}
library(flowWorkspace)
library(FlowSOM)
system.file("extdata", package = "FlowSOM")
FlowSOM_path <- system.file("extdata", package = "FlowSOM")

FlowSOM_path
list.files(
FlowSOM_path,
pattern = "\\.fcs$",
full.names = TRUE,
recursive = TRUE
)
#I found 1 archive : [1] "C:/Users/biihb/AppData/Local/R/win-library/4.5/FlowSOM/extdata/68983.fcs"

system.file("extdata", package = "flowWorkspace")
flowWorkspace_path <- system.file("extdata", package = "flowWorkspace")
flowWorkspace_path

list.files(flowWorkspace_path, pattern = ".fcs", full.names = TRUE, recursive = TRUE)

#I did not find any
```
2 changes: 2 additions & 0 deletions course/02_FilePaths/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ We will start working on our own "coding mindsets" by working with file paths, a

Before we begin, let's make sure you get the data needed for today transferred to your local computer, and then get the .fcs files copied over from there to your own working project folder. This is the process you will repeat each week throughout the course.

For YouTube walkthrough of this process, click [here](https://www.youtube.com/live/Zfctacqpe90?si=a7Ad61kj6_UDNkGw&t=32)

### New Repository

First off, login to your GitHub account. Once there, you will select the options to create a new repository (similar to what you did during [Using GitHub](/course/00_GitHub/index.qmd#github-repository))
Expand Down
2 changes: 2 additions & 0 deletions course/02_FilePaths/slides.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ We will start working on our own "coding mindsets" by working with file paths, a
::: {.fragment}
::: {.callout-tip title="."}
Before we begin, let's make sure you get the data needed for today transferred to your local computer, and then get the .fcs files copied over from there to your own working project folder. This is the process you will repeat each week throughout the course.

For YouTube walkthrough of this process, click [here](https://www.youtube.com/live/Zfctacqpe90?si=a7Ad61kj6_UDNkGw&t=32)
:::
:::

Expand Down
2 changes: 2 additions & 0 deletions course/03_InsideFCSFile/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ If you find yourself at some point going "I have no idea what is going on", plea

:::{.callout-important title="Housekeeping"}
As we do [every week](/course/02_FilePaths/index.qmd#new-repository), on GitHub, sync your forked-version of the CytometryInR course to bring in the most recent updates. Then within Positron, pull in those changes to your local computer. From there, copy the data folder to a separate project folder you have created. This will prevent any merge issues bringing in new data next week.

For YouTube walkthrough of this process, click [here](https://www.youtube.com/live/Zfctacqpe90?si=a7Ad61kj6_UDNkGw&t=32)
:::

---
Expand Down
2 changes: 2 additions & 0 deletions course/03_InsideFCSFile/slides.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ So don't power through, but rather circle back when you are in an exploring mind

:::{.callout-important title="Housekeeping"}
As we do [every week](/course/02_FilePaths/index.qmd#new-repository), on GitHub, sync your forked-version of the CytometryInR course to bring in the most recent updates. Then within Positron, pull in those changes to your local computer. From there, copy the data folder to a separate project folder you have created. This will prevent any merge issues bringing in new data next week.

For YouTube walkthrough of this process, click [here](https://www.youtube.com/live/Zfctacqpe90?si=a7Ad61kj6_UDNkGw&t=32)
:::

---
Expand Down
2 changes: 2 additions & 0 deletions course/04_IntroToTidyverse/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ The dataset we will be using today is a manually-gated spectral flow cytometry d
:::{.callout-important title="Housekeeping"}
As we do [every week](/course/02_FilePaths/index.qmd), on GitHub, sync your forked version of the CytometryInR course to bring in the most recent updates. Then within Positron, pull in those changes to your local computer.

For YouTube walkthrough of this process, click [here](https://www.youtube.com/live/Zfctacqpe90?si=a7Ad61kj6_UDNkGw&t=32)

After creating a "Week04" project folder, copy over the contents of "course/04_IntroToTidyverse" to that folder. This will hopefully prevent any merge issues when you attempt to bring in new data to your local Cytometry in R folder next week. Please remember once you have set up your project folder to stage, commit and pus your changes to "Week04" to GitHub so that they are backed up remotely.

If you are having issues syncing due to the Take-Home Problem merge conflict, see this [walkthrough](https://umgcccfcsr.github.io/CytometryInR/course/00_BonusContent/PullConflicts/)
Expand Down
2 changes: 2 additions & 0 deletions course/04_IntroToTidyverse/slides.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ The dataset we will be using today is a manually-gated spectral flow cytometry d
:::{.callout-important title="Housekeeping"}
As we do [every week](/course/02_FilePaths/index.qmd), on GitHub, sync your forked version of the CytometryInR course to bring in the most recent updates. Then within Positron, pull in those changes to your local computer.

For YouTube walkthrough of this process, click [here](https://www.youtube.com/live/Zfctacqpe90?si=a7Ad61kj6_UDNkGw&t=32)

After creating a "Week04" project folder, copy over the contents of "course/04_IntroToTidyverse" to that folder. This will hopefully prevent any merge issues when you attempt to bring in new data to your local Cytometry in R folder next week. Please remember once you have set up your project folder to stage, commit and pus your changes to "Week04" to GitHub so that they are backed up remotely.

If you are having issues syncing due to the Take-Home Problem merge conflict, see this [walkthrough](https://umgcccfcsr.github.io/CytometryInR/course/00_BonusContent/PullConflicts/)
Expand Down
Loading