GithubHelp home page GithubHelp logo

twoddpcr's Introduction

twoddpcr

twoddpcr is an R/Bioconductor package for Droplet Digital PCR (ddPCR) analysis. The package is named for its ability to classify two channel ddPCR data (the amalgamation of "2-d" and "ddPCR").

Example usage of the package with a sample dataset is included in the package's vignette, where the Appendix also explains how to extract raw droplet data from Bio-Rad's QuantaSoft.

Installing the twoddpcr package

The package can be installed from Bioconductor using:

install.packages("BiocManager")
BiocManager::install("twoddpcr")

Alternatively, it can be installed from GitHub using:

library(devtools)
install_github("CRUKMI-ComputationalBiology/twoddpcr")

Another alternative is to install the package from source:

install.packages("</path/to/twoddpcr/>", repos=NULL, type="source")

Loading the twoddpcr package

Once the package has been installed, it can be loaded in the usual way:

library(twoddpcr)

ddpcrPlate objects

The package revolves around the use of ddpcrPlate objects, which stores droplet amplitude data for the wells in the plate. The ddpcrPlate object also keeps track of the various classifications of the droplets.

To use your own droplet data and store it in a variable named plate, use:

plate <- ddpcrPlate("amplitudes/")

Here, we have assumed that your droplet amplitude CSVs are stored in the amplitudes directory inside the working directory.

Classifying using the k-means clustering

If your data has four distinct clusters, the k-means clustering algorithm can be used:

plate <- kmeansClassify(plate)

This method can also take the centres parameter as a matrix to adjust the approximate centres of each cluster. This parameter can also be the number of clusters instead of a matrix. See ?kmeansClassify for more details.

Plotting classifications

Once the droplets have been classified, they can be plotted using the dropletPlot method. To use this, the names of the available classification methods can be obtained by:

getCommonClassMethod(plate)

There should be a kmeans entry for k-means clustering. To plot this, use:

dropletPlot(plate, cMethod="kmeans")

Adding "rain"

Droplets between the main clusters of droplets will possibly have ambiguous classifications. These droplets are colloquially known as "rain". To do this, use:

plate <- mahalanobisRain(plate, maxDistances=list(NN=35, NP=30, PN=30, PP=30))

Some trial-and-error is required for setting the maxDistances parameter.

Summaries

Since ddPCR samples are partitioned into droplets, the molecules are assumed to be Poisson distributed. With this, the actual number of starting fragments can be estimated:

plateSummary(plate, cMethod="kmeansMahRain")

Shiny-based GUI for non-R users

A Shiny app is included in the package, which provides a GUI that allows interactive use of the package for ddPCR analysis. This can be run from an interactive R session using:

shinyVisApp()

It can also be accessed at http://shiny.cruk.manchester.ac.uk/twoddpcr/.

If you wish to run the app from your own server, instructions are given in the vignette.

Citing twoddpcr

If you use the twoddpcr package in your work, please cite the Bioinformatics paper. The citation can be obtained within R using:

citation("twoddpcr")

twoddpcr's People

Contributors

nturaga avatar hpages avatar vobencha avatar idno0001 avatar

Stargazers

 avatar  avatar Lesley Duff avatar  avatar Jonathan Carroll avatar Sébastien Wieckowski avatar  avatar  avatar Vladimir Mikryukov avatar Al avatar

Watchers

 avatar Andreas Bietenbeck avatar Al avatar

Forkers

dataquine

twoddpcr's Issues

Support for multiple ddPCR plates

Hello! I'm trying to use all my ddPCR experiments at the same time for classification. Thing is, although I used controls in all plates, and they are very similiar, I cant analyse all the experiments at once on twoddPCR.
Cluster classification works, but summary and all other functions doesn't.
Is there any way of using the data from all experiments? Maybe a subclassification between experiments so no conflicts are found?

facetPlot

when i try plotLimits in the facetPlot, it doesn't incorporate my limits to the plot...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.