Coder Social home page Coder Social logo

lssd's Introduction

LSSD

Self-diffusion on local scaling affinity for single cell clustering

Overview

Single-cell RNA sequencing(scRNA-seq) has enabled gene transcriptomic profiling to be studied at individual cell level, advancing our knowledge of the cellular heterogeneity and underlying mechanisms. A key step of this methodology is to perform unsupervised clustering, which, however, often suffers challenges of zero count observations, high level of noise, as well as high dimensionality. To overcome the challenges, we proposed self-diffusion on local scaling affinity (LSSD) to enhance cells similarities metric learning for dissecting cellular heterogeneity. Local scaling infers the self-tuning of cell-to-cell distances that are used to construct cells affinity. Our approach implements self-diffusion process by propagating the affinity matrices to further improve the cell similarities for the downstream clustering analysis.

Installation

You can install LSSDsc from GitHub directly using devtools.

  • install.packages("devtools")
  • devtools::install_github("DuanX8/LSSD")

Example

   x<-readRDS("data/pollen.rds")
   data<-logcounts(x)
   A<-affs(t(data))
   Sda<-self.diffusion(A,4)
   label<-spec.clu(Sda,11)

Visualization

We used the diffused graph incorporating UMAP dimensionality reduction method to visualize the clusters.

    library(umap)
    um1<-umap(Sda)
    lab_true<-data$cell_type1
    ft<-data.frame(um1$layout[,1],um1$layout[,2],lab_true)
    colnames(ft)<-c("u1","u2","lab")
    ggplot(ft, aes(ft$u1,ft$u2))+geom_point(aes(colour = factor(ft$lab)))+scale_color_manual(values=c("#1F77B4FF","#FF7F0EFF","#2CA02CFF","#D62728FF","#9467BDFF","#8C564BFF","#E377C2FF","#7F7F7FFF"))+labs(x="LSSD_UMAP1",y="LSSD_UMAP2")+theme(legend.position = "none")

visualization

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.