Coder Social home page Coder Social logo

colocr's Introduction

Build Status AppVeyor Build Status codecov Build Status status

colocr

An R package for conducting co-localization analysis.

Overview

A few R packages are available for conducting image analysis, which is a very wide topic. As a result, some of us might feel at a loss when all they want to do is a simple co-localization calculations on a small number of microscopy images. This package provides a simple straight forward workflow for loading images, choosing regions of interest (ROIs) and calculating co-localization statistics. Included in the package, is a shiny app that can be invoked locally to interactively select the regions of interest in a semi-automatic way. The package is based on the R package imager.

Installing colocr

The package development version is available at github.

# install from github
devtools::install_github('MahShaaban/colocr')

Getting started

To get started, load the required packages and the images. The images below are from DU145 cell line and were stained for two proteins; RKIP and LC3. Then, apply the appropriate parameters for choosing the regions of interest using the roi_select. Finally, check the appropriateness of the parameters by highlighting the ROIs on the image.

# load libraries
library(colocr)

# load images
fl <- system.file('extdata', 'Image0001_.jpg', package = 'colocr')
img <- image_load(fl)

# select ROI and show the results
par(mfrow = c(2,2), mar = rep(1, 4))

img %>%
  roi_select(threshold = 90) %>%
  roi_show()

The same can be achieved interactively using an accompanying shiny app. To launch the app run.

run_app()

The reset of the analysis depends on the particular kind of images. Now, colocr implements two simple co-localization statistics; Pearson's Coefficient Correlation (PCC) and the Manders Overlap Coefficient (MOC).

To apply both measures of correlation, we first get the pixel intensities and call roi_test on the merge image.

# calculate co-localization statistics
img %>%
  roi_select(threshold = 90) %>%
  roi_test(type = 'both')

The same analysis and more can be conducted using a web interface for the package available here

Acknowledgement

More

browseVignettes('colocr')

ropensci_footer

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.