Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
---
title: "Notebook0-Installment-of-R-Packages"
output:
pdf_document: default
html_document: default
---
# Overview
- This notebook aims to install all R packages required for the Summer Bootcamp as well as single-cell RNA sequencing data analysis.
- Make sure your laptop is fully charged or plugged in to a charging source befoer executing
- Please run this notebook by clicking "Run" -> "Run All" in the top right corner of this panel
- Installing these packages might take a while. If you have any trouble installing packages, please feel free to let us know by posting a complete screenshot of the error you are having to the Slack channel.
- **DO NOT STOP THE EXECUTION OF THIS NOTEBOOK ONCE STARTED.**
```{r, include=TRUE}
# Set the correct default repository
# So you don't have to choose one every time you install a package
r = getOption("repos")
r["CRAN"] = "http://cran.rstudio.com"
options(repos = r)
```
***ggplot2***
"ggplot2" is a system for declaratively creating graphics, based on The Grammar of Graphics. You provide the data, tell ggplot2 how to map variables to aesthetics, what graphical primitives to use, and it takes care of the details.
```{r, include=TRUE}
if (!require("ggplot2")) {
install.packages("ggplot2")
library(ggplot2)
}
```
***knitr***
The "knitr" package is an implementation of Literate Programming, a programming paradigm that intermingle code chunks (for computing) with prose (for documentation) in the same document.
```{r, include=TRUE}
if (!require("knitr")) {
install.packages("knitr")
library(knitr)
}
```
***tidyverse***
The "tidyverse" is a set of packages that work in harmony because they share common data representations and API design. The "tidyverse" package is designed to make it easy to install and load core packages from the tidyverse in a single command. You can find the the "tidyverse" style guide [here](https://style.tidyverse.org/index.html).
```{r, include=TRUE}
if (!require("tidyverse")) {
install.packages("tidyverse")
library(tidyverse)
}
```
***tibble***
"tibble" constructs a data frame. It provides a ’tbl_df’ class (the ’tibble’) with stricter checking and better formatting than the traditional data frame.
```{r, include=TRUE}
if (!require("tibble")) {
install.packages("tibble")
library(tibble)
}
```
***dplyr***
"dplyr" is a grammar of data manipulation, providing a consistent set of verbs that help you solve the most common data manipulation challenges. The dplyr package makes these steps fast and easy:
- By constraining your options, it helps you think about your data manipulation challenges.
- It provides simple “verbs”, functions that correspond to the most common data manipulation tasks, to help you translate your thoughts into code.
- It uses efficient backends, so you spend less time waiting for the computer.
```{r, include=TRUE}
if (!require("dplyr")) {
install.packages("dplyr")
library(dplyr)
}
```
***tidyr***
The goal of tidyr is to help you create tidy data. Tidy data is data where:
- Every column is variable.
- Every row is an observation.
- Every cell is a single value.
```{r, include=TRUE}
if (!require("tidyr")) {
install.packages("tidyr")
library(tidyr)
}
```
***Seurat***
Seurat is an R toolkit for quality control, analysis, and exploration of single cell RNA sequencing data, developed and maintained by the Satija Lab at NYGC. "Seurat" aims to enable users to identify and interpret sources of heterogeneity from single cell transcriptomic measurements, and to integrate diverse types of single cell data.
```{r, include=TRUE}
if (!require("Seurat")) {
install.packages("Seurat")
library(Seurat)
}
```
***scatterplot3d***
"scatterplot3d" plots a three dimensional (3D) point cloud.
```{r, include=TRUE}
if (!require("scatterplot3d")) {
install.packages("scatterplot3d")
library(scatterplot3d)
}
```
***gplots***
"gplots" provides various R programming tools for plotting data, including enhanced versions of standard plots, manipulating colors, calculating and plotting two-dimensional data summaries, and etc.
```{r, include=TRUE}
if (!require("gplots")) {
install.packages("gplots")
library(gplots)
}
```
***fields***
"fields" provides tools for Spatial Data. The major methods include cubic, and thin plate splines, Kriging, and compactly supported covariance functions for large data sets.
```{r, include=TRUE}
if (!require("fields")) {
install.packages("fields")
library(fields)
}
```
***hablar***
"hablar" give users an easy and effective way to work with data types. Additionally, it provides non-astonishing results when summarizing data.
```{r, include=TRUE}
if (!require("hablar")) {
install.packages("hablar")
library(hablar)
}
```
***gprofiler2***
"gprofiler2" is a toolset for functional enrichment analysis and visualization, gene/protein/SNP identifier conversion and mapping orthologous genes across species. The main tools are: (1) 'g:GOSt' - functional enrichment analysis and visualization of gene lists; (2) 'g:Convert' - gene/protein/transcript identifier conversion across various namespaces; (3) 'g:Orth' - orthology search across species; (4) 'g:SNPense' - mapping SNP rs identifiers to chromosome positions, genes and variant effects.
```{r, include=TRUE}
if (!require('gprofiler2')) {
install.packages("gprofiler2")
library(gprofiler2)
}
```
***devtools***
The aim of "devtools" is to make package development easier by providing R functions that simplify and expedite common tasks.
```{r, include=TRUE}
if (!require("devtools")) {
install.packages("devtools")
library(devtools)
}
```
***ggdendro***
This is a set of tools for dendrograms and tree plots using "ggplot2". The "ggplot2" philosophy is to clearly separate data from the presentation. Unfortunately the plot method for dendrograms plots directly to a plot device without exposing the data. The "ggplot2" package resolves this by making available functions that extract the dendrogram plot data.
```{r, include=TRUE}
if (!require("ggdendro")) {
install.packages("ggdendro")
library(ggdendro)
}
```
***mosaic***
The mosaic package is designed to facilitate the use of R in statistics and calculus instruction by providing a number of functions that (a) make many common tasks fit into a common template, and (b) simplify some tasks that would otherwise be too complicated for beginners.
```{r, include=TRUE}
if (!require("mosaic")) {
install.packages("mosaic")
library(mosaic)
}
```
***plotly***
"Plotly" is an R graphing library that makes interactive, publication-quality graphs. Examples of how to make line plots, scatter plots, area charts, bar charts, error bars, box plots, histograms, heatmaps, subplots, multiple-axes, and 3D (WebGL based) charts.
```{r, include=TRUE}
if (!require("plotly")) {
install.packages("plotly")
library(plotly)
}
```
***patchwork***
The goal of "patchwork" is to make it ridiculously simple to combine separate "ggplots" into the same graphic.
```{r, include=TRUE}
if (!require("patchwork")) {
install.packages("patchwork")
library(patchwork)
}
```
***ggridges***
```{r, include=TRUE}
if (!require("ggridges")) {
install.packages("ggridges")
library(ggridges)
}
```
***viridis***
```{r}
if (!require('viridis')) {
install.packages("viridis")
library(viridis)
}
```
***rrvgo***
```{r, include=TRUE}
if (!require('rrvgo')) {
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("rrvgo")
library(rrvgo)
}
```
***org.Hs.eg.db***
```{r, include=TRUE}
if (!require('org.Hs.eg.db')) {
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("org.Hs.eg.db")
library(org.Hs.eg.db)
}
```