Skip to content

Instantly share code, notes, and snippets.

View cplaisier's full-sized avatar

Christopher L Plaisier, PhD cplaisier

View GitHub Profile
# -*- coding: utf-8 -*-
"""
Created on Fri Nov 19 17:22:40 2021
@author: Pamela Appiah
"""
#Load Up Data
import pandas as pd
from scipy.stats import hypergeom
import scanpy as sc
import scvelo as scv
import pandas as pd
import numpy as np
#from matplotlib.backends.backend_pdf import PdfPages
#import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
# Load U5 data from Seurat
#adata_Seurat = scv.read_loom('U5_all_v3.loom')
@cplaisier
cplaisier / pipeline_rmTrimmed.py
Created March 25, 2021 19:42
Includes parts to remove trimmed files after running STAR
##########################################################
## OncoMerge: alignment.py ##
## ______ ______ __ __ ##
## /\ __ \ /\ ___\ /\ \/\ \ ##
## \ \ __ \ \ \___ \ \ \ \_\ \ ##
## \ \_\ \_\ \/\_____\ \ \_____\ ##
## \/_/\/_/ \/_____/ \/_____/ ##
## @Developed by: Plaisier Lab ##
## (https://plaisierlab.engineering.asu.edu/) ##
## Arizona State University ##
## Docker instance for analysis
# docker run -it -v "/home/bgasvoda/Pia:/files" cplaisier/scrna_seq_velocity
# Commands to run on Docker instance before starting
# cd /files
# pip3 install kneed
# python3
import pandas as pd
import numpy as np
import re
import pandas as pd
def compareMiRNANames(a, b):
if a==b:
return 1
if len(a)<len(b):
if a[-3:]=='-3p':
re1 = re.compile(a+'[a-oq-z]?(-\d)?-3p$')
else:
##########################################################
## OncoMerge: oncoMerge.py ##
## ______ ______ __ __ ##
## /\ __ \ /\ ___\ /\ \/\ \ ##
## \ \ __ \ \ \___ \ \ \ \_\ \ ##
## \ \_\ \_\ \/\_____\ \ \_____\ ##
## \/_/\/_/ \/_____/ \/_____/ ##
## @Developed by: Plaisier Lab ##
## (https://plaisierlab.engineering.asu.edu/) ##
## Arizona State University ##
@cplaisier
cplaisier / gist:e27cad50ca04aa7ff7e4baefb54d451d
Created June 17, 2020 05:13
PlotPCA For Anything - might need some tweaking
plotPCA_v2 <- function(x, intgroup = "condition", ntop = 500, col)
{
rv = rowVars(x)
select = order(rv, decreasing = TRUE)[seq_len(min(ntop, length(rv)))]
pca = prcomp(t(x[select, ]))
fac = factor(apply(as.data.frame(colData(x)[, intgroup, drop = FALSE]),
1, paste, collapse = " : "))
if (missing(col)) {
col = if (nlevels(fac) >= 3)
brewer.pal(nlevels(fac), "Paired")
#!/usr/bin/env Rscript
#suppressMessages(library(GOSim))
suppressMessages(library(GOSemSim))
suppressMessages(library(getopt))
spec = matrix(c(
'outdir', 'o', 1, 'character',
'help', 'h', 0, 'logical'
), byrow=TRUE, ncol=4)
## Semantic similarity
library(GOSim)
l1 = list()
#l1$Adaptive_Response = c('GO:0002250','GO:0002819')
l1$Akt_Signalling = c('GO:0043491','GO:0051896')
l1$Antigen_Presentation = c('GO:0019882','GO:0002472','GO:0002625','GO:0019886')
l1$Apoptosis = c('GO:0006915','GO:0033028','GO:0071888','GO:2000110','GO:2000111','GO:0012501','GO:0048102') # ,'GO:2001242'
l1$Cell_Cycle = c('GO:0007050','GO:0051726','GO:0006260','GO:0000075')
l1$Cell_Cycle_Checkpoint = c('GO:0000075')
cd /Users/baileyquinn/Desktop/BT145/
docker run -it -v "/Users/baileyquinn/Desktop/BT145:/files" cplaisier/scrna_seq_velocity
cd /files
pip3 install clusim
pip3 install statsmodels
python3