This file contains 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
## This code was entirely generated using OpenAIs Code Interpreter and prompting for the type of analysis that was desired | |
import pandas as pd | |
# Load the data | |
data = pd.read_csv('/mnt/data/example_rs_fish.csv') | |
# Calculate various quantiles | |
quantiles = data['intensity'].quantile([0.10, 0.25, 0.50, 0.75]) | |
quantiles |
This file contains 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
## This is only on compute canada clusters where modules are available! | |
module load python/3.7.4 | |
## Create virtual environment using python | |
python3 -m venv ./kb_python_env | |
## activate environment | |
source ./kb_python_env/bin/activate | |
## Install kb-python inside environment |
This file contains 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
## This is only on compute canada clusters where modules are available! | |
module load python/3.7.4 | |
## Create virtual environment using python | |
python3 -m venv ./kb_python_env | |
## activate environment | |
source ./kb_python_env/bin/activate | |
## Install kb-python inside environment |
This file contains 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
feature_schex <- function(seurat_object, | |
gene_ids, | |
label = FALSE, | |
nbins = 150, | |
reduction = "UMAP", | |
assay = "SCT", | |
slot = "data", | |
action = "mean"){ | |
require(Seurat) |
This file contains 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
ip <- as.data.frame(installed.packages()[,c(1,3:4)]) | |
rownames(ip) <- NULL | |
ip <- ip[is.na(ip$Priority),1:2,drop=FALSE] | |
print(ip, row.names=FALSE) |
This file contains 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
## Includes most packages commonly used in my workflows | |
install.packages("roxygen2") | |
install.packages("Rcpp") | |
install.packages("promises") | |
install.packages("httpuv") | |
install.packages("htmltools") | |
install.packages("xml2") | |
install.packages("digest") | |
install.packages("devtools") | |
library(devtools) |
This file contains 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
## Testing of JSD function in philentrop package | |
## Documentation at: | |
## https://www.rdocumentation.org/packages/philentropy/versions/0.2.0/topics/JSD | |
## Load library | |
library(philentropy) | |
## We will test the Jensen-Shannon divergence with the aplpication of scoring gene regulatory networks as described in this \ | |
## paper: https://www.cell.com/cell-reports/fulltext/S2211-1247(18)31634-6?dgcid=raven_jbs_etoc_email#secsectitle0070 |
This file contains 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
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
``` | |
# Load libraries | |
```{r} | |
library(refGenome) | |
library(dplyr) |
This file contains 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
## Read in summary file from Drop-seq pipe | |
infile = | |
DGE_info <- read.table(infile, | |
sep="\t", | |
header=T) | |
## Correlation Number of genic reads vs num of genes detected per cell | |
ggplot(DGE_info,aes(NUM_GENIC_READS,NUM_GENES,col=NUM_TRANSCRIPTS)) + | |
geom_point() |
This file contains 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
## Create vector with timepoints | |
time_points <- c("E14.5","E16.5","E18.5","P1","P4","P7") | |
for(time in time_points){ | |
rds_object <- readRDS(paste("/home/wueflo00/project/Dropseq/Andelfingerlab_Dropseq/Heart_Maturation/Analysis/Objects/",time,".expression_seurat.renamed_clusters.Rds",sep="")) | |
raw_umi <- as.matrix([email protected]) | |
metadata <- [email protected] | |
raw_umi <- raw_umi[,rownames(metadata)] |
NewerOlder