Git Product home page Git Product logo

speck's Introduction

SPECK

A Python adaptation of the R SPECK implementation in R.

SPECK is a single cell Surface Protein abundance Estimation using CKmeans-based clustered thresholding (SPECK).

The following pseudocode was used as a guide, including the methods section described in the SPECK paper (https://academic.oup.com/bioinformaticsadvances/article/3/1/vbad073/7197032).

Algorithm 1 SPECK Algorithm

1: Xm,n−→−−−−−−NormalizationXm,n

Rank-k Selection and Singular Value Decomposition

2: ∑100i←1μiσivTi ▹ Rank-100 SVD of Xm,n

3: rsdev←(σ1,σ2,…,σ100)2m−1−−√ ▹ PCs stdev.

4: rdiff←|rate of change(rsdev)|

5: rval←rle(rdiff).values ▹ Run length encoding.

6: rlen←rle(rdiff).lengths

7: k←rdiff.index(min(rval≥0.01∧rlen≥2))+1 ▹ Rank-k.

8: Xm,n←μm,k×σk,k×vTk,n ▹ Matrix reconstruction.

Clustered Thresholding

9: forv←1 to n do ▹ Threshold each gene.

ckres←Ckmeans.1d.dp(x=Xm,n[v], k=c(1:4))

10:   num←ckres.cluster

11:   val←ckres.centers

12:   iflen(set(num))>1 then

13:    ind←val.index(min(val))+1

14:    Xm,n[v][num=ind]←0

15:   end if

16: end for

speck's People

Contributors

nminster avatar

Stargazers

 avatar

Watchers

 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.