Code Monkey home page Code Monkey logo

2019_scworkshop's Introduction

Intro

This is a minimal example of a book based on R Markdown and bookdown. Please see the page "Get Started" at https://bookdown.org/ for how to compile this example.

Course Webiste

Docker Usage

There is a docker image that goes along with this course. The following explains how to use the docker image and what software it contains. To rebuild the image from scratch please see this subdirectory labeled docker.

More about docker

Installing Docker

Make sure to have docker installed on your computer. Go to the docker getting started website and select the download for your operating system.

Software Included

All additional software is included in the /usr/local/src directory inside the docker container.

Pull Image

The first thing you will need to do is pull the docker image to your computer. You do this by running the command:

docker pull kdgosik/scellbern2019:latest

Running Rstudio in Docker locally on your computer

docker run --rm -it -e PASSWORD=train \
-v $PWD/Share:/Share \
-v $PWD:/mydir \
-p 9000:8787 kdgosik/scellbern2019

Running Rstudio in Docker AWS

docker run --rm -it -e PASSWORD=train \
-v $PWD/Share:/Share \
-v $PWD:/mydir \
-p 9000:8787 kdgosik/scellbern2019
  • no sudo needed
  • Change the PORT NUMBER to your user number (e.g. user1 should use 9001, user99 should use 9099)
  • ec2-$AWS_PUBLIC_IP_ADDRESS.us-west-2.compute.amazonaws.com:$PORT_NUMBER
  • ec2-54-202-32-102.us-west-2.compute.amazonaws.com:9000

Explaination of commands

  • docker: command to run docker
  • run: asking docker to run a container
  • --rm: flag to remove the container when you exit from it
    • nothing will be saved from your session to access again later
    • this flag can be removed to keep container
  • -it: flag to run the container interactively
    • this will keep all session output displaying on the terminal
    • to stop container go to terminal and press Crtl+c
  • -e PASSWORD=train: password assignment you will need to access rstudio when you login
  • -p 9000:8787: flag to assign port mapping.
    • rstudio runs on port 8787 inside the container
    • you will access rstudio by going to port 9000 on your computer (localhost:9000 in your browser)
    • 9000 can be any port you would like. We will change this up for each student in the class
  • kdgosik/scellbern2019: the image to run. It will be the image into a container if not already built on your computer

Accessing Rstudio

Once you run the docker run command above, you can go to your browser at localhost:9000. This will bring you to a log-in screen for rstudio. Enter the username: rstudio and password: train. This will log you into Rstudio where you can do your analysis. After this you can install whichever R packages you would like.

examples

## CRAN Packages
install.packages("ggplot2")
install.packages("gam")
install.packages("ggbeeswarm")
install.packages("ggthemes")
install.packages("dplyr")
install.packages("plyr")
install.packages("Matrix")
install.packages("fossil")
install.packages("Seurat")
install.packages("BiocManager")
install.packages("devtools")
install.packages('umap')
install.packages('rmarkdown')
install.packages("rgl", dependencies=TRUE)

## Bioconductor Packages
BiocManager::install("SingleCellExperiment", version = "3.8", update = FALSE)
BiocManager::install("destiny", version = "3.8", update = FALSE)
BiocManager::install("slingshot", version = "3.8", update = FALSE)
BiocManager::install("splatter", version = "3.8", update = FALSE)
BiocManager::install("scater", version = "3.8", update = FALSE)
BiocManager::install("DropletUtils", version = "3.8", update = FALSE)
BiocManager::install("pcaMethods", version = "3.8", update = FALSE)
BiocManager::install("CountClust", version = "3.8", update = FALSE)


## Github Packages
devtools::install_github("broadinstitute/inferCNV")
devtools::install_github("velocyto-team/velocyto.R")
devtools::install_github('MacoskoLab/liger')

Docker Terminal

Same command as above but add the option bash at the end to access the ternimal in the docker container.

docker run --rm -it -v $PWD/Share:/Share -v $PWD:/mydir kdgosik/scellbern2019 bash

Get Course Material

Once you have docker running and you are in the terminal you can pull the course content to your computer by running the command below. This will bring all the Rmarkdown files for you to run.

git clone https://github.com/broadinstitute/2019_scWorkshop.git

2019_scworkshop's People

Contributors

kdgosik 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.