Skip to content

Automatic Data Analysis and Visualization for FRAP

License

Notifications You must be signed in to change notification settings

GuanqiaoDing/frapplot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automatic Data Analysis and Visualization for FRAP

License: MIT CRAN_Status_Badge Build Status Project Status: Active – The project has reached a stable, usable state and is being actively developed.

This R package aims to automatically process Fluorescence Recovery After Photobleaching (FRAP) data and generate consistent, publishable figures. The automation would bring down the hour-long routine work to a few seconds.

Tired of tedious manual quantification of raw images? Check out my fraptrack repository :)

Method

FRAP image courtesy of Dr. Michael Rosen's Lab:

FRAP image

(The top-left puncta is the targeted area.)

Method

Features

  • Batch calculations and regressions for all the groups from the dataset and summarize the results by group names in a dataframe:

Summary result demo

  • Access details about the regression of individual groups by simple indexing:

Access details demo

  • Generate figures in a consistent and publishable format:

Output figure demo

  • Compare results of any two groups with a single command.

  • Have tested with a real-world dataset from a FRAP experiment.

Updates in Version 0.1.2

  • Exclude certain sample(s) from the dataset (e.g. poor quality due to technical reasons)
# remove sample(column) 1 and 3 from "mut1" data 
modified <- exclude(example_dataset, "mut1", c(1,3))
  • frapprocess() and frapplot() now validate the input before execution. Raise Error when input is not valid and provide specific instructions.

View update history.

Install

# Install frapplot from CRAN:
install.packages("frapplot")

# Install frapplot from Github:
install.packages("devtools")
devtools::install_github("GuanqiaoDing/frapplot")

# Load frapplot
library(frapplot)

# bring up the manual
?frapprocess
?frapplot

Usage

Example use of frapprocess and frapplot:

# after the preprocessing (refer to ./data-raw/preprocess.R)
load("data/example_dataset.rda")
info <- frapprocess(example_dataset, seq(0, 145, 5))

# view results
info$summary
info$details

# plot any two groups as desired
frapplot ("output_dir", "control", "mut1", info)
frapplot ("output_dir", "control", "mut2", info)

Note:

  • Raw data can either be in a single file or separate files, refer to preprocess.R for more information.

  • Make sure the names (case-sensitive) you provide to frapplot() are correct;

  • Make sure "info" (the third argument) remains in your global environment and refers to the same experiment before you run frapplot(), otherwise re-run frapprocess() and get its return value.

Outputs

frapplot() returns a list (if assigned to variable "info"):

  • info$time_points: a vector of time points

  • info$summary: a dataframe showing the summary of the regression including ymax, ymin, k, halftime, tau, total_recovery, total_recovery_sd.

  • info$sample_means: a matrix of sample means, nrow = num of time points, ncol = sample size

  • info$sample_sd: a matrix of standard deviations, nrow = num of time points, ncol = sample size

  • info$model: a list of models for each group from the non-linear regression

  • info$details: details of the regression for each group

frapplot() generates a pdf file that compares two groups of choice in the provided directory.

Test with An Example Dataset

An example dataset can be found here, which is courtesy of Dr. Michael Rosen's Lab and should never be used for other purposes.

The preprocessing generates ".rda" file that is ready to be loaded. The code has been tested with the example dataset and generates expected results. Note that only five samples are included in each group of this dataset for demonstration, but larger sample size is highly recommended for statistical robustness.

The code has also passed R CMD check.

Report Issues

Please report any bugs or issues here. The project also welcomes your contribution.

License

frapplot is licensed under the MIT License - see LICENSE for the details.

Acknowledgements

I truly appreciate the help and resources provided by Dr. Michael Rosen's Lab at UT Southwestern Medical Center for this project.

About

Automatic Data Analysis and Visualization for FRAP

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages