Git Product home page Git Product logo

sc2marker's Introduction

sc2marker

sc2marker is a toolkit for identification of cell specific markers for clusters of cells in a single cell RNA sequencing data set. In particular, sc2marker focus on markers that have valid antibodies to be used for either imaging or flow analyis.

Install

You can install sc2marker with the following commands:

install.packages("devtools")
devtools::install_github("https://github.com/CostaLab/sc2marker", build_vignettes = TRUE)

Detect markers for given cell cluster

To run sc2marker you need to execute the following command, providing a clustered single cell data sets (as Seurat object), the cell type of interest and the antibody databased (IHC, ICC or Flow).

require(sc2marker)
require(Seurat)
nk.markers <- Detect_single_marker(mca.spleen, id = "NK cell(Spleen)", category = "Flow", org = "mouse")

You can display the results as a table with the command:

get_antibody(nk.markers, org = "mouse")

and you can generate ridge plot with the following command:

plot_ridge(mca.spleen, id = "NK cell(Spleen)", genes = nk.markers[1:9,]$gene, ncol = 3, assay = "RNA", aggr.other = F)

To use customized gene set, you can run the following command. sc2marker will recognise genes and ignore the cases.

nk.markers <- Detect_single_marker(mca.spleen, id = "NK cell(Spleen)", category = "Flow", geneset = c("CD19", "GeneA", "welcome2022"), org = "mouse")
get_antibody(nk.markers, rm.noab = F)

To include your own antibody database

Example of self made antibody database can be found in Self-made database. Be sure to save the database within your R path and update the code above to reflect the file location in your system.

nk.markers <- Detect_single_marker(mca.spleen, id = "NK cell(Spleen)", category = "Flow", org = "mouse", self.db = "/Path to Self_DB.csv/")
get_antibody(nk.markers, self.db = "/Path to Self_DB.csv/", org = "mouse")

calculate markers for all cell clusters

To calculate markers for all cell clusters, you can do by following command:

all.markers <- Detect_single_marker_all(mca.spleen, category = "Flow", org = "mouse")

To Check T cell markers from results of all clusters, and get the antibody information, you can do following.

t.markers <- all.markers[["T cell(Spleen)"]]
get_antibody(t.markers, org = "mouse")

Generate report

To automatically generate the sc2marker report of all cell clusters, you can run following command:

generate_report(mca.spleen, all.markers, fpath = ".", fname = "mca.spleen")

Or you can only analysis subset of cell clusters (B cell and NK cell) and generate the report as following:

all.markers <- Detect_single_marker_all(mca.spleen, category = "Flow", clusters_to_detect = c("Marginal zone B cell(Spleen)", "NK cell(Spleen)"), org = "mouse")
generate_report(mca.spleen, all.markers, fpath = ".", fname = "mca.spleen")

Reproduction

All code and R object needed to generate the results of sc2marker manuscript can be found in zenodo.

The scripts below reproduce individual analysis. Please note that some packages might require manual installation ( 'seurat-data' and 'ggsci'). Also, configure your R paths before running these scripts.

Code for MCA Spleen (Mouse)

Example for MCA-Spleen in Rmarkdown format and in html format.

Code for Human Bone marrow (human-BM)

SeuratData to load the R object. Example_human_BM.Rmd

Code for Human PBMC&lung (human-PBMC&lung)

Example_human_PBMC&lung.Rmd

Code for Human Bone marrow (human-PBMC)

Example_human_PBMC.Rmd

Also, you can find the original data of MCA, human-PBMC and human-PBMC&lung and Stromal data as following: MCA, human-PBMC&lung, human-PBMC, human-BM, niche stromal

sc2marker's People

Contributors

igcf avatar ronghui1992 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sc2marker's Issues

Difference in top genes in same cells using Detect_single_marker and Detect_single_marker_all commands

I really appreciate this work, this is really insightful. I have been trying to run this code with the following commands:
markers <- Detect_single_marker(donor1, id = "pro-B cell", category = "Flow", org = "Human")
This commands gives following output
image

So top genes for pro-b cells are: DNTT, VPREB1

But when I run this command i.e for all the cell types
all.markers <- Detect_single_marker_all(donor1, category = "Flow", org = "human")
This command gives following output for pro-b cells

image

In this case top genes are different. I will really appreciate if you can help me in understanding this difference in output for the same cell type but with different commands.

Thanks!!

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.