Code Monkey home page Code Monkey logo

scrubletr's Introduction

scrubletR

scrubletR is an R package designed to run Python's Scrublet package via reticulate. Scrublet gathers metadata summarising potential doublet cells in Single Cell RNA-seq experiments.

This fork of Moonerss/scrubletR includes some bug fixes, improving compatability with Seurat v5

Installation

You can install the master branch of this Github repository with:

remotes::install_github("ofarrelle/scrubletR")

Prerequisites

  • R package: Matrix, reticulate, Seurat

  • Python module: scrublet

Using

load("~/samples.RData")
res <- scrublet_R(seurat_obj = samples)
# Preprocessing...
# Simulating doublets...
# Embedding transcriptomes using PCA...
# Calculating doublet scores...
# Automatically set threshold at doublet score = 0.57
# Detected doublet rate = 0.1%
# Estimated detectable doublet fraction = 0.6%
# Overall doublet rate:
#   Expected   = 6.0%
#   Estimated  = 12.1%
# Elapsed time: 32.5 seconds
head(res@meta.data)
#                       orig.ident nCount_RNA nFeature_RNA percent.mt
# AAACCCAAGAGTCACG-1 SeuratProject       5985         1844   7.552214
# AAACCCAAGCCGTCGT-1 SeuratProject      11923         2532  11.725237
# AAACCCAAGGACACTG-1 SeuratProject       1728          783  22.858796
# AAACCCACAAAGGTTA-1 SeuratProject      10676         2649  22.798801
# AAACCCACAGACGCTC-1 SeuratProject       2235          690  55.078300
# AAACCCACAGGAACCA-1 SeuratProject      14519         3402   4.979682
#                    doublet_scores predicted_doublets
# AAACCCAAGAGTCACG-1     0.01636424              FALSE
# AAACCCAAGCCGTCGT-1     0.03400332              FALSE
# AAACCCAAGGACACTG-1     0.22724604              FALSE
# AAACCCACAAAGGTTA-1     0.02451680              FALSE
# AAACCCACAGACGCTC-1     0.01955671              FALSE
# AAACCCACAGGAACCA-1     0.01955671              FALSE

scrubletr's People

Contributors

ofarrelle avatar moonerss 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.