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(Seurat) | |
## Prep for 10x loupe browser inegration | |
seurat.object | |
### first we need to extract out the seurat cell barcodes and convert them back into Loupe space | |
### note this is tested on integrated objects in seurat with multi samples | |
seurat.object$loupe_barcodes <- gsub(names(Idents(seurat.object)),pattern = "-1_",replacement = "-") | |
## pull the embeddings from UMAP | |
embeds <- (seurat.object@[email protected]) |
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
#!/usr/bin/python | |
import pysam | |
import numpy as np | |
import deeptools.mapReduce | |
import csv | |
import argparse | |
#Tb927_10_v5.1:3648504-3654301 #Tb927.10.14930 | |
#Tb927_10_v5.1:3648504-3654301 (+) |
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
### handles the Seurat to phate conversio | |
### first, grab the input required for phate (here we are using the normalized data stored in Seurat | |
seurat_data <- as.data.frame(seurat.object@assays$RNA@data) | |
## reshape for input into PHATE | |
phate_data_input <- t(seurat_data) | |
## run phate -- this is a default run, feel free to tune params |
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
wt.subset <- subset(immune.combined, subset = stim == c("CTRL")) | |
ko.subset <- subset(immune.combined, subset = stim == c("Trp63-")) | |
FeaturePlot(immune.combined,features = c("Foxi2","Foxc1"),split.by = "stim") | |
gg1 <- plot_split_by_feature(wt.subset,ko.subset,c("Foxi2")) | |
gg2 <- plot_split_by_feature(wt.subset,ko.subset,c("Foxc1")) | |
ggsave(file="Foxi2_Foxc1.png",plot_grid(gg1,gg2,ncol=1)) | |
plot_split_by_feature<- function(wildType, knockout, feature ) { | |
ptSize = .4 |
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(velocyto.R) | |
library(pagoda2) | |
library(Seurat) | |
### ASSUMES Seurat object has already been computed -- in this case the object cells.combined is the result of seurat | |
# IMPORTANT!!! create a loom file using the velocyto command line tools first | |
ldat <- read.loom.matrices("filtered.loom") | |
# get the spliced and unspliced ratios from the loom file |