GithubHelp home page GithubHelp logo

yingwang07 / ptem Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fangwang-sysu/ptem

0.0 0.0 0.0 12.22 MB

A two-step approach to Predict Tumor Evolution Model

JavaScript 15.69% R 5.66% HTML 78.65%

ptem's Introduction

PTEM

A two-step approach to Predict Tumor Evolution Model

Description

This is an apporch to predict tumor evolution model using single cell copy number profile. It will estiamted:

  • It the tumo cell population follows neutral or selective evolution model.
  • If the tumor cell popoulation follows selective eovlution model, it is linear, branching or punctuated eovlution model.

System requirements and dependency

This approach runs on R (version > 4.0) and has dependency on the R packages: diptest.

Usage

Please download and copy the distribution to your specific location.

  setwd("./PTEM")
  source("model.function.R")

Input a CNV frequncey vector calculated from a single cell coy number profile. Each element in the vector corresponds to the frequency of genome region/gene gain or loss in the tumo cell population.

Generate a CNV frequency vector from neutral evolution model i.e. unimodal distribution

 CNVfre1 <- rnorm(500,mean=0.3,sd=0.02)

Generate a CNV frequency vector from selective evolution model i.e. multimodal distribution

 CNVfre2 <- c(rnorm(100,mean=0.1,sd=0.02),rnorm(200,mean=0.4,sd=0.02),rnorm(200,mean=0.6,sd=0.02))

Estimating if the CNV frequency vector follows neutral evolution

  modalityEst1 <- dip.test(CNVfre1)
  modalityEst2 <- dip.test(CNVfre2)

For scDNA-seq, keep CNV frequency > 0.05; For scRNA-seq, keep CNV frequenct > 0.02

Neutral evolution model

modalityEst1

Hartigans' dip test for unimodality / multimodality

data:  CNVfre1
D = 0.013069, p-value = 0.8705
alternative hypothesis: non-unimodal, i.e., at least bimodal

Selective evolution model

modalityEst2

Hartigans' dip test for unimodality / multimodality

data:  CNVfre2
D = 0.11944, p-value < 2.2e-16
alternative hypothesis: non-unimodal, i.e., at least bimodal

For selectiv evolution model, further distinguish linea, branching and punctuated evolution model

cds <- selectModel(CNVfre2,cutoff1=0.01,cutoff2=0.7)
modelEst <- ModelPredict(cds)
modelEst

  branch       linear punctuated    Predict
1 0.01829491 5.971049e-09  0.9817051 Punctuated

The first to the third column are the posterior probabilities of corresponding selective eovlution model. The Predict column returns the model with the largest posterior probability.

ptem's People

Contributors

fangwang-sysu 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.