Skip to content

bcbio to STREAM #52

@mjsteinbaugh

Description

@mjsteinbaugh

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
    )

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions