Skip to content

Created primarily to process qPCR Cq data for graphical output. However, the functions included is generic and good for other use. This package includes functions to calculate the fold change using either ddCt method or Paffl method, and function to calculate SEM and check outliers in a given dataset.

Notifications You must be signed in to change notification settings

YixiBio/qPCRstat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qPCRstat

R-CMD-check DOI License: AGPL v3 GitHub release (latest by date) GitHub Release Date

The goal of qPCRstat is to provide an easier way to process qPCR data for graphical output. Meanwhile, some functions included is generic and good for other use.

This package includes functions to calculate the fold change using either ddCt method or Paffl method, and function to calculate SEM and check outliers in a given dataset.

Installation

Check qPCRstat for latest version.

To install the current version, follow the instruction here:

  1. Download the binary package from here;

  2. Then in a R session, type the following code (remember to replace the path to the actual file path on your computer):

PATH <- "/path/to/qPCRstat_version.tar.gz"
install.packages(PATH, repos = NULL, type ="source")

Alternatively, install via github directly in R console:

# install.packages("remotes")
remotes::install_github("YixiBio/qPCRstat")

Installation via CRAN is in consideration.

Example

library(qPCRstat)
## sample data
set.seed(1)
Ct1 <- sample(c(35:12), 10, replace = TRUE)
set.seed(1)
Ct2 <- sample(c(12:35), 10, replace = TRUE)
dat <- data.frame(Sample = c(sample("sample", 9, replace = TRUE), "control"), Ct1 = Ct1, Ct2 = Ct2)

## calculate the FC
dat <- cbind(dat[dat$Sample == "sample",], 
             FC = ddCt.raw(dat[dat$Sample == "sample", "Ct1"], 
                           dat[dat$Sample == "sample", "Ct2"], 
                           dat[dat$Sample == "control", "Ct1"],
                           dat[dat$Sample == "control", "Ct2"]))

## check outliers
dat <- cbind(dat, Outliers = is.outlier(dat$FC))

## [Optional] Remove outliers, optionally save outliers in another data frame. 
dat.outlier <- dat[dat$Outliers == TRUE,]
dat.pure <- dat[dat$Outliers == FALSE,]

## Calculate the mean and mean±SEM
mean(dat[dat$Outliers == FALSE, "FC"])
#> [1] 42949672960
error.bar(dat[dat$Outliers == FALSE, "FC"])
#>   mean.plus.SEM mean.min.SEM
#> 1   68719476736  17179869184

## graphical output using plot() or ggplot2 package

Limitations

  • To process the data, other package (e.g. dplyr) is needed.
  • Data might need to be structured with Excel or equivalent.

To-Do

  • Add function to automatic digest a structured dataset and provide ready-to-use data frames for graphical output.

About

Created primarily to process qPCR Cq data for graphical output. However, the functions included is generic and good for other use. This package includes functions to calculate the fold change using either ddCt method or Paffl method, and function to calculate SEM and check outliers in a given dataset.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages