Giter Club home page Giter Club logo

scsearch's Introduction

scsearch

Index and search single cell data.

Installation

mvn install
alias scsearch='java -jar target/scsearch-0.0.1-SNAPSHOT-jar-with-dependencies.jar'

Install Elasticsearch locally.

You'll need some 10x data too.

Run

First create an index. This takes 15 minutes or so (for around 1 million cells). (Note that we only create 256 out of 320 shards to avoid an as-yet-unresolved int overflow error in netcdf.)

scsearch -o index \
    --index 10x \
    --file files/1M_neurons_filtered_gene_bc_matrices_h5.h5 \
    --total-shards 320 \
    --num-shards 256

Now we can do a search to find cells that have non-zero expression levels for all genes in a query set. (Note that we need to supply the 10x file since it used as a source of all the gene names.)

scsearch --file files/1M_neurons_filtered_gene_bc_matrices_h5.h5 ENSMUSG00000050708 
Search index 10x for genes [ENSMUSG00000050708]
Matching cells: 1046148
	barcode=GGAATAACACCTCGTT-3
	barcode=GGAATAAGTTTGACTG-3
	barcode=GGAATAATCTTCATGT-3
	barcode=GGACAAGAGATATACG-3
	barcode=GGACAAGAGTCGAGTG-3
	barcode=GGACAAGCAACACCCG-3
	barcode=GGACAAGCAAGCTGTT-3
	barcode=GGACAAGCAGCTGTTA-3
	barcode=GGACAAGTCAACTCTT-3
	barcode=GGACAGACACTATCTT-3
	...

scsearch --file files/1M_neurons_filtered_gene_bc_matrices_h5.h5 ENSMUSG00000095742
Search index 10x for genes [ENSMUSG00000095742]
Matching cells: 592

scsearch --file files/1M_neurons_filtered_gene_bc_matrices_h5.h5 ENSMUSG00000050708 ENSMUSG00000095742
Search index 10x for genes [ENSMUSG00000050708, ENSMUSG00000095742]
Matching cells: 591

Delete an index with the following command:

scsearch -o delete --index 10x

scsearch's People

Contributors

tomwhite avatar

Watchers

 avatar  avatar

scsearch's Issues

Support hi/lo gene search

So far we have a simple search where genes are on or off, and for this we can index the sparse gene expression matrix. To do more sophisticated search where genes are hi/lo, we need the normalized matrix, and a more elaborate indexing scheme.

E.g. refering to http://stm.sciencemag.org/content/10/461/eaau4711

We first defined a flow cytometric strategy to identify the known B cell subsets and plasma cells in intestinal mucosa and in circulation, identifying plasma cells as live CD45+CD38hiCD27+ cells and nonplasma cell B cells as live CD45+CD38CD19+ cells. Among nonplasma cell B cells, naïve B cells were defined as CD45+CD38CD19+IgD+IgM+ cells, whereas switched memory (SM) B cells were defined as CD45+CD38CD19+IgDIgM cells (fig. S2).

So [CD45+CD38CD19+] would be a possible search query.

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.