knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Installation

Install release version from CRAN via

install.packages("flowdex")

Or download from github:

library(devtools) 
install_github(repo="bpollner/flowdex", ref="main")

Initialize Settings File System {#initialize-settings-file-system}

Package flowdex makes use of the dynamic settings file system provided by package uniset. This has to be initialised just once by calling

library(flowdex)
flowdex::setup_settings(path.expand("~"))

Follow the on-screen instructions and possibly re-start R.\ From now on, various global settings and default values used by flowdex can conveniently be viewed and changed in the file flowdex_settings.R residing at

path.expand("~")

Download Tutorial Dataset {#download-tutorial-dataset}

In order to walk the user over the main-features of package flowdex, a small tutorial-dataset has been created, along with gating strategy files and the required polygon-gate definitions.\ Also, the workflow how to create the gating strategy file and the polygon gate definitions will be explained.

First, download the tutorial data from its Github repository:

library(flowdex)
src <- "https://github.com/bpollner/data/raw/main/flowdex_tutorial/flowdex_tutorial.zip"
td <- tempdir()
# this is downloading and unzipping the tutorial data if not already present:
flowdex::check_download_data(where = td, data_source = src, dsname = "flowdex_tutorial")

Note: Description of Tutorial Dataset


Quickstart {#quickstart}

After having (only once) set up the settings file system and having downloaded the tutorial dataset, you could dive straight in -- for a quickstart to immediately see what flowdex can do, call:

library(flowdex)
setwd(paste0(td, "/flowdex_tutorial"))
fdmat <- flowdexit() # this might take a few seconds
fdmat@pData[1:5,] # to inspect volume and sample ID data
fdmat@cyTags[1:5,] # to inspect class- and numerical variables assigned to each sample
fdist <- fdmat[[1]] # to inspect fluorescence distribution
fdist[1:5, 130:134] # pick some random fluorescence intensities

Look at 'flowdexTutorial/rawdata/flscData_gateStrat.xlsx.xlsx' to see the fluorescence distribution exported to file, observe the various sheets there.


Prepare Folder Structure

Take it step by step, not interested in the quickstart above: We assume that data from a single experiment will be residing in a single folder -- the 'home' folder for this experiment.\ Within this home-folder, flowdex requires a simple folder structure to properly work. Create that folder structure now within a newly created experiment home-folder called 'tap_water_home':

td <- tempdir()
exp_home <- paste0(td, "/tap_water_home") 
dir.create(exp_home)
flowdex::genfs(exp_home) # create the required folder structure in 'tap_water_home'

Continue to data acquisition, or straight to Workflow 2, where you can learn how to extract fluorescence distributions and how to visualize them.



bpollner/flowdex documentation built on March 31, 2022, 3:21 a.m.