Giter VIP home page Giter VIP logo

detime's Introduction

New implementation in GPcounts package

Note: some of the R-packages that DEtime relies on are no longer supported. The model has been re-implemented in the GPcounts python package and can be used with a Gaussian or counts (negative binomial) likelihood. See https://github.com/ManchesterBioinference/GPcounts/blob/master/demo_notebooks/Branching_GPcounts.ipynb for an example application there to single-cell pseudotime branching. If using the DEtime kernel in GPcounts then please cite the GPcounts paper https://doi.org/10.1093/bioinformatics/btab486 as well as the original DEtime paper

DEtime

DEtime is an R package for two-sample time series analysis using Gaussian process methods. This package implements the Gaussian regression framework for perturbation time point inferrence in a two sample case.

The paper describing this package is available at DOI: https://doi.org/10.1093/bioinformatics/btw329 and arXiv: http://arxiv.org/abs/1602.01743. Please refer to the Jupyter notebook DEtime_illustration.ipynb for R codes about how to run the package.

Installation

There are two ways to install DEtime:

  • use devtools package:

    • Install and load the devtools package to be able to directly install R packages hosted on github :
    install.packages("devtools")
    library(devtools)
    • To install DEtime type:
    install_github("ManchesterBioinference/DEtime")
  • download the tarball file DEtime_1.0.tar.gz.

    • Install the dependent packages, spam and gptk, first:
    install.packages("spam")
    install.packages("gptk")
    • Install the tarball
    install.packages("DEtime_1.0.tar.gz", repos=NULL, type="source")

Getting Started

The package contains two main functions: DEtime_infer and DEtime_rank.

  • DEtime_infer is the main function for perturbation point inference.

  • DEtime_rank is used to filter out these silent genes before any focused perturbation point inference work.

The user is required to provide times, ControlData, PerturbedData etc to use these two functions. For explanation of these arguments, please refer to the vignettes asscoiated with this package.

Examples

  • For straightforward perturbation time point inference without ranking,
library(DEtime)

### inport simulated dataset
data(SimulatedData)

### go on with the perturbation time point inference
res <- DEtime_infer(ControlTimes = ControlTimes, ControlData = ControlData, PerturbedTimes = PerturbedTimes, PerturbedData = PerturbedData)

### Print a summary of the results
print_DEtime(res)
### plot results for all the genes
plot_DEtime(res)
}
  • If ranking is needed,
library(DEtime)

### inport simulated dataset
data(SimulatedData)

### calculating the loglikelihood ratio for these tested genes. the result is saved into DEtime_rank.txt

res_rank <- DEtime_rank(ControlTimes = ControlTimes, ControlData = ControlData, PerturbedTimes, PerturbedData=PerturbedData, savefile=TRUE)
 
### get the index of these data with loglikelihood ratio larger than 1
idx <- which(res_rank[,2]>1)

### go on with the perturbation time inference if some of the data has passed the threshould test 
if (length(idx)>0){
     res <- DEtime_infer(ControlTimes = ControlTimes, ControlData = ControlData[idx,], PerturbedTimes = PerturbedTimes, PerturbedData=PerturbedData[idx,])
     ### Print a summary of the results
     print_DEtime(res)
     ### plot results for all the genes
     plot_DEtime(res)
  }

detime's People

Contributors

jyanguk avatar magnusrattray avatar

Stargazers

 avatar Quan Xu avatar Enrique avatar Gustav Ahlberg avatar Peter Clarke avatar  avatar asw456 avatar Christian Stade-Schuldt avatar Zygmunt Zając avatar

Watchers

James Cloos avatar  avatar  avatar Robert Maidstone avatar

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.