This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(tidyr) | |
## Define S4 object with required components | |
Clustering_info <- setClass("clustering_module",slots=c(tsne="data.frame", | |
metadata="data.frame", | |
norm_exprs="data.frame", | |
marker_list="data.frame")) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(tidyr) | |
## Define S4 object with required components | |
Clustering_info <- setClass("clustering_module",slots=c(tsne="data.frame", | |
metadata="data.frame", | |
norm_exprs="data.frame", | |
marker_list="data.frame")) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(tidyr) | |
## Define S4 object with required components | |
Clustering_info <- setClass("clustering_module",slots=c(tsne="data.frame", | |
metadata="data.frame", | |
norm_exprs="data.frame", | |
marker_list="data.frame")) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Transform_to_feather" | |
author: "Florian Wuennemann" | |
date: "April 20, 2018" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Build the ClusterTree from Seurat object | |
expression_seurat <- BuildClusterTree(expression_seurat, | |
do.plot=TRUE) | |
## Plot custom phylogenetic tree that is more easily interpretable | |
png(filename="./with_Batch_Cycle_Correction/ClusterTree.png", width=1800, height=1700, bg = "white", res = 150) | |
plot(ladderize([email protected][[1]]), adj=0, | |
label.offset=50, | |
edge.width=1) | |
nodelabels(frame="circle",bg="grey") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(tidyr) | |
## Define S4 object with required components | |
Clustering_info <- setClass("clustering_module",slots=c(tsne="data.frame", | |
metadata="data.frame", | |
norm_exprs="data.frame", | |
marker_list="data.frame")) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(devtools) | |
#### Specific datasets | |
## Specific time point Rds | |
source_gist("https://gist.github.com/FloWuenne/df2dca6804f562ed90db26a04508af31", filename = "Create_clustering_module_Rds.R") | |
## Specific time point .Rdata | |
source_gist("https://gist.github.com/FloWuenne/dfd1e00c198b2ae1adeb16720a844441",, filename = "Create_clustering_module_Rds.R") | |
#### All datasets |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(tidyr) | |
## Define S4 object with required components | |
Clustering_info <- setClass("clustering_module",slots=c(tsne="data.frame", | |
metadata="data.frame", | |
norm_exprs="data.frame", | |
marker_list="data.frame")) | |
## Let user enter the time point to process |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(tidyr) | |
time_points <- c("E14.5","E16.5","E18.5","P1","P4","P7") | |
for(time_point in time_points){ | |
## Load Seurat object | |
seurat_object <- readRDS(paste("../Objects/",time_point,".Seurat_object.Rds",sep="")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(tidyr) | |
time_point <- readline(prompt="Enter time point: ") | |
## Load Seurat object | |
seurat_object <- readRDS(paste("../Objects/",time_point,".Seurat_object.Rds",sep="")) | |
## Normalized expression data | |
norm_exprs_sparse <- seurat_object@data |