Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bcbio to STREAM #52

Open
mjsteinbaugh opened this issue Aug 17, 2018 · 0 comments
Open

bcbio to STREAM #52

mjsteinbaugh opened this issue Aug 17, 2018 · 0 comments
Assignees

Comments

@mjsteinbaugh
Copy link

Here's what I sent clients regarding STREAM counts input. I figured this would be better in the knowledgebase than a repo in hbc:


STREAM GitHub repo: https://github.com/pinellolab/STREAM

Installation

This tutorial is customized for users running macOS.

Jupyter

If you want to save notes during your analysis, we recommend installing Jupyter. Otherwise, this step can be skipped.

Install Jupyter Notebook using Anaconda.

wget https://repo.anaconda.com/archive/Anaconda3-5.2.0-MacOSX-x86_64.sh
bash Anaconda3-5.2.0-MacOSX-x86_64.sh

Ensure Anaconda is installed correctly. We recommend calling the activate script for each interactive shell session, rather than exporting PATH manually. Add this line to your ~/.bash_profile:

source "${HOME}/anaconda3/bin/activate"

Now you're ready to launch a new notebook session.

jupyter notebook

Consult their Running the Notebook guide for more information.

By default, a new server instance is launched at http://localhost:8888.

Jupyter is recommended for saving notes on your STREAM analysis.

Docker

Install the Community Edition.

For macOS, this can be installed easily using Homebrew Cask.

# Homebrew Cask must be installed
brew cask install docker

STREAM

Now you're ready to download a local copy of the STREAM image.

docker pull pinellolab/stream

Launch a new instance of the webapp.

docker run -p 10001:10001 pinellolab/stream STREAM_webapp

Now STREAM will be accessible at http://localhost:10001.

Analysis

In R, save the raw counts matrix as a TSV file, with cells in the columns and genes in the rows.

Note that STREAM is currently limited to analyzing 2500 cells when using the Pinello Lab's website. When analyzing larger datasets, you must install STREAM locally, preferably using Docker (see above).

SingleCellExperiment object

Note that this can be used for bcbioSingleCell objects, which extend SingleCellExperiment.

library(bcbioSingleCell)
load("sce.rda")
counts <- counts(sce)

seurat object

library(Seurat)
load("seurat.rda")
counts <- seurat@raw.data

Now we can write the counts to disk, using the write.table() function.

counts %>%
    as.matrix() %>%
    write.table(
        file = "counts.tsv",
        sep = "\t",
        quote = FALSE,
        col.names = NA
    )
@mjsteinbaugh mjsteinbaugh changed the title bcbio to STREAM (using SingleCellExperiment in R) bcbio to STREAM Aug 17, 2018
@mjsteinbaugh mjsteinbaugh self-assigned this Aug 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant