Code Monkey home page Code Monkey logo

trendsceek's Introduction

trendsceek

Identify genes with spatial expression trends in single-cell gene-expression data

System requirements

trendsceek has been tested on R 3.3.1 and is platform independent (tested on Linux, OS X and Windows). For parallel execution, trendsceek has been tested on a shared-memory server (120 cores, Intel Xeon 2.3GHz, x86_64, 512Gb RAM).

Installation

Typical installation takes <10 minutes.

First, install the package dependencies which are available on bioconductor but not on CRAN:

source("http://www.bioconductor.org/biocLite.R")
deps = c('BiocParallel', 'genefilter', 'DESeq2')
new_deps = deps[!(deps %in% installed.packages()[,"Package"])]
if(length(new_deps) != 0){biocLite(new_deps)}

Installation can then be done via the devtools package:

library('devtools')
devtools::install_github('edsgard/trendsceek')

Alternatively, installation can then be done from a local binary package tarball from the shell:

R CMD INSTALL trendsceek_1.0.0.tar.gz

Tutorial/Demo

Once you've installed trendsceek you'll be able to follow the vignette-tutorial. You can open it by:

vignette('trendsceek')

Expected run-time on a normal desktop computer is <10 min.

Minimal example

     library('trendsceek')

     ##create synthetic dataset
     pp = sim_pois(300)
     low_expr = c(10, 10)
     high_expr = c(20, 50)
     pp = add_markdist_hotspot(pp, low_expr, high_expr)

     ##run trendsceek
     trendstat_list = trendsceek_test(pp, nrand = 100, ncores = 1)
     head(trendstat_list[['supstats_wide']])

     ##show significant genes
     sig_list = extract_sig_genes(trendstat_list, alpha = 0.1)
     sig_genes = sig_list[['markcorr']][, 'gene']
     print(sig_genes)
     plot_trendstats(trendstat_list, sig_genes)
     pp_sig = pp_select(pp, sig_genes)
     plot_pp_scatter(pp_sig, log_marks = FALSE, scale_marks = TRUE, pal.direction = -1)

     ##cells located in high-expressing regions of the significant genes
     cellpeaks_siggenes = cellsceek_test(pp_sig)
     sig_cells = get_sigcells(cellpeaks_siggenes)
     plot_pp_density(pp_sig, log_marks = FALSE, cells2highlight = sig_cells)	 

Function reference manual

To get help for specific functions you can use ?fcn, for example:

library('trendsceek')
?trendsceek_test

The complete function reference manual for all functions can be found at "doc/refman.pdf" within the installed library directory (to find your R library directories you can call .libPaths() from within R). You can also view the latest version by:

browseURL('https://github.com/edsgard/trendsceek/tree/master/inst/doc/refman.pdf')

Citation

If you use trendsceek, please cite it as follows:

Edsgärd D. et al., Identification of spatial expression trends in single-cell gene expression data, Nature Methods, 2018
doi:10.1038/nmeth.4634

trendsceek's People

Contributors

edsgard avatar zji90 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.