Skip to content

Commit 28d2c1e

Browse files
Merge pull request #33 from rnabioco/GSE131957
GSE131957 Ref matrices
2 parents 343d4af + b1dede1 commit 28d2c1e

39 files changed

+422
-8
lines changed

R/GSE148946/DiabetesFibroblastGSE148946Nuclei.r

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,22 @@ library(patchwork)
44
library(clustifyr)
55
library(tidyverse)
66

7-
mat_FibroblastNucleiDiabetes <- read_csv("ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE148nnn/GSE148946/suppl/GSE148946_wholecell_normdata.csv.gz")
7+
mat_FibroblastNucleiDiabetesExtraCol <- read_csv("ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE148nnn/GSE148946/suppl/GSE148946_wholecell_normdata.csv.gz")
8+
mat_FibroblastNucleiDiabetes = subset(mat_FibroblastNucleiDiabetesExtraCol, select = -c(gene_1))
89
mat_FibroblastNucleiDiabetes <- mat_FibroblastNucleiDiabetes %>%
9-
as.data.frame() %>%
10-
column_to_rownames('gene') %>%
11-
as.matrix() %>%
12-
t()
10+
#as.data.frame() %>%
11+
column_to_rownames('gene')
12+
#as.matrix() %>%
13+
#t()
1314
mat_FibroblastNucleiDiabetes[1:5, 1:5]
1415

1516
meta_FibroblastNucleiDiabetes <- read_csv("ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE148nnn/GSE148946/suppl/GSE148946_wholecell_metadata.csv.gz")
1617
sum(colnames(mat_FibroblastNucleiDiabetes) %in% meta_FibroblastNucleiDiabetes$orig.ident)
1718
ncol(mat_FibroblastNucleiDiabetes)
1819

20+
source("~/Reference-Matrix-Generation/R/utils/utils.r")
21+
checkRawCounts(as.matrix(mat_FibroblastNucleiDiabetes))
22+
1923
new_ref_matrix <- average_clusters(mat = mat_FibroblastNucleiDiabetes, metadata = meta_FibroblastNucleiDiabetes$trt, if_log = TRUE)
2024
head(new_ref_matrix)
2125
tail(new_ref_matrix)

R/musMusculus/GSE124952/GSE124952.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ checkRawCounts(as.matrix(mat_PFC))
3434
GSE124952Normalized <- NormalizeData(mat_PFC)
3535
GSE124952Normalized
3636

37-
new_ref_matrix <- average_clusters(mat = mat_PFC, metadata = meta_PFC$CellType, if_log = TRUE)
37+
new_ref_matrix <- average_clusters(mat = GSE124952Normalized, metadata = meta_PFC$CellType, if_log = FALSE)
3838
new_ref_matrix_hashed <- average_clusters(mat = mat_PFC, metadata = meta_PFC$CellType, if_log = FALSE)
3939
head(new_ref_matrix)
4040
tail(new_ref_matrix)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
library(dplyr)
2+
library(Seurat)
3+
library(patchwork)
4+
library(clustifyr)
5+
library(tidyverse)
6+
library(digest)
7+
library(here)
8+
9+
proj_dir <- here()
10+
GSE131957 <- file.path(proj_dir, "Reference-Matrix-Generation", "data", "GSE131957_Raw 2", "GSM3832743_beadneg_dc1_1.csv.gz")
11+
12+
mat_mouseLungLesions <- read.csv(GSE131957)
13+
mat_mouseLungLesions <- mat_mouseLungLesions %>%
14+
# as.data.frame() %>%
15+
column_to_rownames('X')
16+
# as.matrix() %>%
17+
# t()
18+
mat_mouseLungLesions[1:5, 1:5]
19+
20+
meta_mouseLungLesions <- read_csv("ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE131nnn/GSE131957/suppl/GSE131957_single_cell_metadata.csv.gz")
21+
meta_mouseLungLesions <- meta_mouseLungLesions %>% column_to_rownames("X1") %>% t() %>% as.data.frame()
22+
meta2 <- meta_mouseLungLesions[colnames(mat_mouseLungLesions),]
23+
meta_mouseLungLesions
24+
sum(colnames(mat_mouseLungLesions) %in% meta_mouseLungLesions$cluster)
25+
ncol(mat_mouseLungLesions)
26+
27+
source("~/Reference-Matrix-Generation/R/utils/utils.r")
28+
checkRawCounts(as.matrix(mat_mouseLungLesions))
29+
30+
GSE131957WTNaiveNormalized <- NormalizeData(mat_mouseLungLesions)
31+
32+
new_ref_matrix <- average_clusters(mat = GSE131957WTNaiveNormalized, metadata = meta2, cluster_col = "cluster_annotation", if_log = FALSE)
33+
new_ref_matrix_hashed <- average_clusters(mat = mat_mouseLungLesions, metadata = meta_mouseLungLesions, if_log = FALSE)
34+
head(new_ref_matrix)
35+
tail(new_ref_matrix)
36+
newcols <- sapply(colnames(new_ref_matrix_hashed), digest, algo = "sha1")
37+
colnames(new_ref_matrix_hashed) <- newcols
38+
head(new_ref_matrix_hashed)
39+
tail(new_ref_matrix_hashed)
40+
saveRDS(new_ref_matrix_hashed, "GSE131957Hashed.rds")
41+
saveRDS(new_ref_matrix, "GSE131957Beadneg1.rds")
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
library(dplyr)
2+
library(Seurat)
3+
library(patchwork)
4+
library(clustifyr)
5+
library(tidyverse)
6+
library(digest)
7+
library(here)
8+
9+
proj_dir <- here()
10+
GSE131957 <- file.path(proj_dir, "Reference-Matrix-Generation", "data", "GSE131957_Raw 2", "GSM3832744_beadneg_dc1_2.csv.gz")
11+
12+
mat_mouseLungLesions <- read.csv(GSE131957)
13+
mat_mouseLungLesions <- mat_mouseLungLesions %>%
14+
# as.data.frame() %>%
15+
column_to_rownames('X')
16+
# as.matrix() %>%
17+
# t()
18+
mat_mouseLungLesions[1:5, 1:5]
19+
20+
meta_mouseLungLesions <- read_csv("ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE131nnn/GSE131957/suppl/GSE131957_single_cell_metadata.csv.gz")
21+
meta_mouseLungLesions <- meta_mouseLungLesions %>% column_to_rownames("X1") %>% t() %>% as.data.frame()
22+
meta2 <- meta_mouseLungLesions[colnames(mat_mouseLungLesions),]
23+
meta_mouseLungLesions
24+
sum(colnames(mat_mouseLungLesions) %in% meta_mouseLungLesions$cluster)
25+
ncol(mat_mouseLungLesions)
26+
27+
source("~/Reference-Matrix-Generation/R/utils/utils.r")
28+
checkRawCounts(as.matrix(mat_mouseLungLesions))
29+
30+
GSE131957WTNaiveNormalized <- NormalizeData(mat_mouseLungLesions)
31+
32+
new_ref_matrix <- average_clusters(mat = GSE131957WTNaiveNormalized, metadata = meta2, cluster_col = "cluster_annotation", if_log = FALSE)
33+
new_ref_matrix_hashed <- average_clusters(mat = mat_mouseLungLesions, metadata = meta_mouseLungLesions, if_log = FALSE)
34+
head(new_ref_matrix)
35+
tail(new_ref_matrix)
36+
newcols <- sapply(colnames(new_ref_matrix_hashed), digest, algo = "sha1")
37+
colnames(new_ref_matrix_hashed) <- newcols
38+
head(new_ref_matrix_hashed)
39+
tail(new_ref_matrix_hashed)
40+
saveRDS(new_ref_matrix_hashed, "GSE131957Hashed.rds")
41+
saveRDS(new_ref_matrix, "GSE131957Beadneg1.rds")
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
library(dplyr)
2+
library(Seurat)
3+
library(patchwork)
4+
library(clustifyr)
5+
library(tidyverse)
6+
library(digest)
7+
library(here)
8+
9+
proj_dir <- here()
10+
GSE131957 <- file.path(proj_dir, "Reference-Matrix-Generation", "data", "GSE131957_Raw 2", "GSM3832738_wt_tumor_adt.csv.gz")
11+
12+
mat_mouseLungLesions <- read.csv(GSE131957)
13+
mat_mouseLungLesions <- mat_mouseLungLesions %>%
14+
# as.data.frame() %>%
15+
column_to_rownames('X')
16+
# as.matrix() %>%
17+
# t()
18+
mat_mouseLungLesions[1:5, 1:5]
19+
20+
meta_mouseLungLesions <- read_csv("ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE131nnn/GSE131957/suppl/GSE131957_single_cell_metadata.csv.gz")
21+
meta_mouseLungLesions <- meta_mouseLungLesions %>% column_to_rownames("X1") %>% t() %>% as.data.frame()
22+
meta2 <- meta_mouseLungLesions[colnames(mat_mouseLungLesions),]
23+
meta_mouseLungLesions
24+
sum(colnames(mat_mouseLungLesions) %in% meta_mouseLungLesions$cluster)
25+
ncol(mat_mouseLungLesions)
26+
27+
source("~/Reference-Matrix-Generation/R/utils/utils.r")
28+
checkRawCounts(as.matrix(mat_mouseLungLesions))
29+
30+
GSE131957WTNaiveNormalized <- NormalizeData(mat_mouseLungLesions)
31+
32+
new_ref_matrix <- average_clusters(mat = GSE131957WTNaiveNormalized, metadata = meta2, cluster_col = "cluster_annotation", if_log = FALSE)
33+
new_ref_matrix_hashed <- average_clusters(mat = mat_mouseLungLesions, metadata = meta_mouseLungLesions, if_log = FALSE)
34+
head(new_ref_matrix)
35+
tail(new_ref_matrix)
36+
newcols <- sapply(colnames(new_ref_matrix_hashed), digest, algo = "sha1")
37+
colnames(new_ref_matrix_hashed) <- newcols
38+
head(new_ref_matrix_hashed)
39+
tail(new_ref_matrix_hashed)
40+
saveRDS(new_ref_matrix_hashed, "GSE131957Hashed.rds")
41+
saveRDS(new_ref_matrix, "GSE131957WTTumorADT.rds")
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
library(dplyr)
2+
library(Seurat)
3+
library(patchwork)
4+
library(clustifyr)
5+
library(tidyverse)
6+
library(digest)
7+
library(here)
8+
9+
proj_dir <- here()
10+
GSE131957 <- file.path(proj_dir, "Reference-Matrix-Generation", "data", "GSE131957_Raw 2", "GSM3832737_wt_tumor_gex.csv.gz")
11+
12+
mat_mouseLungLesions <- read.csv(GSE131957)
13+
mat_mouseLungLesions <- mat_mouseLungLesions %>%
14+
# as.data.frame() %>%
15+
column_to_rownames('X')
16+
# as.matrix() %>%
17+
# t()
18+
mat_mouseLungLesions[1:5, 1:5]
19+
20+
meta_mouseLungLesions <- read_csv("ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE131nnn/GSE131957/suppl/GSE131957_single_cell_metadata.csv.gz")
21+
meta_mouseLungLesions <- meta_mouseLungLesions %>% column_to_rownames("X1") %>% t() %>% as.data.frame()
22+
meta2 <- meta_mouseLungLesions[colnames(mat_mouseLungLesions),]
23+
meta_mouseLungLesions
24+
sum(colnames(mat_mouseLungLesions) %in% meta_mouseLungLesions$cluster)
25+
ncol(mat_mouseLungLesions)
26+
27+
source("~/Reference-Matrix-Generation/R/utils/utils.r")
28+
checkRawCounts(as.matrix(mat_mouseLungLesions))
29+
30+
GSE131957WTNaiveNormalized <- NormalizeData(mat_mouseLungLesions)
31+
32+
new_ref_matrix <- average_clusters(mat = GSE131957WTNaiveNormalized, metadata = meta2, cluster_col = "cluster_annotation", if_log = FALSE)
33+
new_ref_matrix_hashed <- average_clusters(mat = mat_mouseLungLesions, metadata = meta_mouseLungLesions, if_log = FALSE)
34+
head(new_ref_matrix)
35+
tail(new_ref_matrix)
36+
newcols <- sapply(colnames(new_ref_matrix_hashed), digest, algo = "sha1")
37+
colnames(new_ref_matrix_hashed) <- newcols
38+
head(new_ref_matrix_hashed)
39+
tail(new_ref_matrix_hashed)
40+
saveRDS(new_ref_matrix_hashed, "GSE131957Hashed.rds")
41+
saveRDS(new_ref_matrix, "GSE131957WTTumor.rds")
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
library(dplyr)
2+
library(Seurat)
3+
library(patchwork)
4+
library(clustifyr)
5+
library(tidyverse)
6+
library(digest)
7+
library(here)
8+
9+
proj_dir <- here()
10+
GSE131957 <- file.path(proj_dir, "Reference-Matrix-Generation", "data", "GSE131957_Raw 2", "GSM3832735_wt_naive_gex.csv.gz")
11+
12+
mat_mouseLungLesions <- read.csv(GSE131957)
13+
mat_mouseLungLesions <- mat_mouseLungLesions %>%
14+
# as.data.frame() %>%
15+
column_to_rownames('X')
16+
# as.matrix() %>%
17+
# t()
18+
mat_mouseLungLesions[1:5, 1:5]
19+
20+
meta_mouseLungLesions <- read_csv("ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE131nnn/GSE131957/suppl/GSE131957_single_cell_metadata.csv.gz")
21+
meta_mouseLungLesions <- meta_mouseLungLesions %>% column_to_rownames("X1") %>% t() %>% as.data.frame()
22+
meta2 <- meta_mouseLungLesions[colnames(mat_mouseLungLesions),]
23+
meta_mouseLungLesions
24+
sum(colnames(mat_mouseLungLesions) %in% meta_mouseLungLesions$cluster)
25+
ncol(mat_mouseLungLesions)
26+
27+
source("~/Reference-Matrix-Generation/R/utils/utils.r")
28+
checkRawCounts(as.matrix(mat_mouseLungLesions))
29+
30+
GSE131957WTNaiveNormalized <- NormalizeData(mat_mouseLungLesions)
31+
32+
new_ref_matrix <- average_clusters(mat = GSE131957WTNaiveNormalized, metadata = meta2, cluster_col = "cluster_annotation", if_log = FALSE)
33+
new_ref_matrix_hashed <- average_clusters(mat = mat_mouseLungLesions, metadata = meta_mouseLungLesions, if_log = FALSE)
34+
head(new_ref_matrix)
35+
tail(new_ref_matrix)
36+
newcols <- sapply(colnames(new_ref_matrix_hashed), digest, algo = "sha1")
37+
colnames(new_ref_matrix_hashed) <- newcols
38+
head(new_ref_matrix_hashed)
39+
tail(new_ref_matrix_hashed)
40+
saveRDS(new_ref_matrix_hashed, "GSE131957Hashed.rds")
41+
saveRDS(new_ref_matrix, "GSE131957.rds")
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
library(dplyr)
2+
library(Seurat)
3+
library(patchwork)
4+
library(clustifyr)
5+
library(tidyverse)
6+
library(digest)
7+
library(here)
8+
9+
proj_dir <- here()
10+
GSE131957 <- file.path(proj_dir, "Reference-Matrix-Generation", "data", "GSE131957_Raw 2", "GSM3832736_wt_naive_adt.csv.gz")
11+
12+
mat_mouseLungLesions <- read.csv(GSE131957)
13+
mat_mouseLungLesions <- mat_mouseLungLesions %>%
14+
# as.data.frame() %>%
15+
column_to_rownames('X')
16+
# as.matrix() %>%
17+
# t()
18+
mat_mouseLungLesions[1:5, 1:5]
19+
20+
meta_mouseLungLesions <- read_csv("ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE131nnn/GSE131957/suppl/GSE131957_single_cell_metadata.csv.gz")
21+
meta_mouseLungLesions <- meta_mouseLungLesions %>% column_to_rownames("X1") %>% t() %>% as.data.frame()
22+
meta2 <- meta_mouseLungLesions[colnames(mat_mouseLungLesions),]
23+
meta_mouseLungLesions
24+
sum(colnames(mat_mouseLungLesions) %in% meta_mouseLungLesions$cluster)
25+
ncol(mat_mouseLungLesions)
26+
27+
source("~/Reference-Matrix-Generation/R/utils/utils.r")
28+
checkRawCounts(as.matrix(mat_mouseLungLesions))
29+
30+
GSE131957WTNaiveNormalized <- NormalizeData(mat_mouseLungLesions)
31+
32+
new_ref_matrix <- average_clusters(mat = GSE131957WTNaiveNormalized, metadata = meta2, cluster_col = "cluster_annotation", if_log = FALSE)
33+
new_ref_matrix_hashed <- average_clusters(mat = mat_mouseLungLesions, metadata = meta_mouseLungLesions, if_log = FALSE)
34+
head(new_ref_matrix)
35+
tail(new_ref_matrix)
36+
newcols <- sapply(colnames(new_ref_matrix_hashed), digest, algo = "sha1")
37+
colnames(new_ref_matrix_hashed) <- newcols
38+
head(new_ref_matrix_hashed)
39+
tail(new_ref_matrix_hashed)
40+
saveRDS(new_ref_matrix_hashed, "GSE131957Hashed.rds")
41+
saveRDS(new_ref_matrix, "GSE131957WTNaiveADT.rds")
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
library(dplyr)
2+
library(Seurat)
3+
library(patchwork)
4+
library(clustifyr)
5+
library(tidyverse)
6+
library(digest)
7+
library(here)
8+
9+
proj_dir <- here()
10+
GSE131957 <- file.path(proj_dir, "Reference-Matrix-Generation", "data", "GSE131957_Raw 2", "GSM3832739_ccr7ko_naive_gex.csv.gz")
11+
12+
mat_mouseLungLesions <- read.csv(GSE131957)
13+
mat_mouseLungLesions <- mat_mouseLungLesions %>%
14+
# as.data.frame() %>%
15+
column_to_rownames('X')
16+
# as.matrix() %>%
17+
# t()
18+
mat_mouseLungLesions[1:5, 1:5]
19+
20+
meta_mouseLungLesions <- read_csv("ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE131nnn/GSE131957/suppl/GSE131957_single_cell_metadata.csv.gz")
21+
meta_mouseLungLesions <- meta_mouseLungLesions %>% column_to_rownames("X1") %>% t() %>% as.data.frame()
22+
meta2 <- meta_mouseLungLesions[colnames(mat_mouseLungLesions),]
23+
meta_mouseLungLesions
24+
sum(colnames(mat_mouseLungLesions) %in% meta_mouseLungLesions$cluster)
25+
ncol(mat_mouseLungLesions)
26+
27+
source("~/Reference-Matrix-Generation/R/utils/utils.r")
28+
checkRawCounts(as.matrix(mat_mouseLungLesions))
29+
30+
GSE131957WTNaiveNormalized <- NormalizeData(mat_mouseLungLesions)
31+
32+
new_ref_matrix <- average_clusters(mat = GSE131957WTNaiveNormalized, metadata = meta2, cluster_col = "cluster_annotation", if_log = FALSE)
33+
new_ref_matrix_hashed <- average_clusters(mat = mat_mouseLungLesions, metadata = meta_mouseLungLesions, if_log = FALSE)
34+
head(new_ref_matrix)
35+
tail(new_ref_matrix)
36+
newcols <- sapply(colnames(new_ref_matrix_hashed), digest, algo = "sha1")
37+
colnames(new_ref_matrix_hashed) <- newcols
38+
head(new_ref_matrix_hashed)
39+
tail(new_ref_matrix_hashed)
40+
saveRDS(new_ref_matrix_hashed, "GSE131957Hashed.rds")
41+
saveRDS(new_ref_matrix, "GSE131957ccr7koNaive.rds")
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
library(dplyr)
2+
library(Seurat)
3+
library(patchwork)
4+
library(clustifyr)
5+
library(tidyverse)
6+
library(digest)
7+
library(here)
8+
9+
proj_dir <- here()
10+
GSE131957 <- file.path(proj_dir, "Reference-Matrix-Generation", "data", "GSE131957_Raw 2", "GSM3832740_ccr7ko_naive_adt.csv.gz")
11+
12+
mat_mouseLungLesions <- read.csv(GSE131957)
13+
mat_mouseLungLesions <- mat_mouseLungLesions %>%
14+
# as.data.frame() %>%
15+
column_to_rownames('X')
16+
# as.matrix() %>%
17+
# t()
18+
mat_mouseLungLesions[1:5, 1:5]
19+
20+
meta_mouseLungLesions <- read_csv("ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE131nnn/GSE131957/suppl/GSE131957_single_cell_metadata.csv.gz")
21+
meta_mouseLungLesions <- meta_mouseLungLesions %>% column_to_rownames("X1") %>% t() %>% as.data.frame()
22+
meta2 <- meta_mouseLungLesions[colnames(mat_mouseLungLesions),]
23+
meta_mouseLungLesions
24+
sum(colnames(mat_mouseLungLesions) %in% meta_mouseLungLesions$cluster)
25+
ncol(mat_mouseLungLesions)
26+
27+
source("~/Reference-Matrix-Generation/R/utils/utils.r")
28+
checkRawCounts(as.matrix(mat_mouseLungLesions))
29+
30+
GSE131957WTNaiveNormalized <- NormalizeData(mat_mouseLungLesions)
31+
32+
new_ref_matrix <- average_clusters(mat = GSE131957WTNaiveNormalized, metadata = meta2, cluster_col = "cluster_annotation", if_log = FALSE)
33+
new_ref_matrix_hashed <- average_clusters(mat = mat_mouseLungLesions, metadata = meta_mouseLungLesions, if_log = FALSE)
34+
head(new_ref_matrix)
35+
tail(new_ref_matrix)
36+
newcols <- sapply(colnames(new_ref_matrix_hashed), digest, algo = "sha1")
37+
colnames(new_ref_matrix_hashed) <- newcols
38+
head(new_ref_matrix_hashed)
39+
tail(new_ref_matrix_hashed)
40+
saveRDS(new_ref_matrix_hashed, "GSE131957Hashed.rds")
41+
saveRDS(new_ref_matrix, "GSE131957ccr7koNaiveADT.rds")

0 commit comments

Comments
 (0)