updating rnaseq data
Browse files
degron_counts.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d9cab86bf569ddcac5a2c984cc73cf7f37bcb5cda3b5e4fcd99dd450865f484d
|
| 3 |
+
size 95464752
|
mnase_fusion_rnaseq_counts.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a8e0b72f02ec7ce99dbc1fe300678328fba84557a35f1cccf7d4a2a50570a19a
|
| 3 |
+
size 1341547
|
scripts/dto_preparation.R
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
library(tidyverse)
|
| 2 |
+
library(arrow)
|
| 3 |
+
library(here)
|
scripts/parse_mahendrawada_rnaseq.R
CHANGED
|
@@ -7,7 +7,7 @@ names(counts_files) = str_extract(counts_files, "GSM\\d+")
|
|
| 7 |
|
| 8 |
genomic_features = arrow::read_parquet("~/code/hf/yeast_genome_resources/brentlab_features.parquet")
|
| 9 |
|
| 10 |
-
test_count_df = read_tsv(file.path(count_parent_dir, counts_files[[1]]), col_names = c('
|
| 11 |
|
| 12 |
find_matching_locus <- function(target, genomic_df) {
|
| 13 |
match_idx <- which(str_detect(genomic_df$alias, fixed(target)))
|
|
@@ -27,16 +27,29 @@ find_matching_locus <- function(target, genomic_df) {
|
|
| 27 |
}
|
| 28 |
|
| 29 |
alias_matched_locus_tags <- test_count_df %>%
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
left_join(genomic_features,
|
| 31 |
by = c('target_locus_tag' = 'locus_tag')) %>%
|
| 32 |
filter(is.na(chr), str_detect(target_locus_tag, "^__", negate=TRUE)) %>%
|
| 33 |
-
select(target_locus_tag) %>%
|
| 34 |
-
mutate(orig_locus_tag = target_locus_tag) %>%
|
| 35 |
mutate(target_locus_tag = str_replace_all(target_locus_tag, "\\(|\\)", "_")) %>%
|
| 36 |
mutate(match_info = map(target_locus_tag, ~find_matching_locus(.x, genomic_features))) %>%
|
| 37 |
unnest(match_info) %>%
|
| 38 |
-
|
| 39 |
-
|
|
|
|
|
|
|
| 40 |
orig_locus_tag == "LSR1" ~ "YNCB0019C",
|
| 41 |
orig_locus_tag == "SCR1" ~ "YNCE0024W",
|
| 42 |
orig_locus_tag == "snR18" ~ "YNCA0003W",
|
|
@@ -47,14 +60,9 @@ alias_matched_locus_tags <- test_count_df %>%
|
|
| 47 |
orig_locus_tag == "snR5" ~ "YNCO0028W",
|
| 48 |
orig_locus_tag == "snR6" ~ "YNCL0006W",
|
| 49 |
orig_locus_tag == "snR8" ~ "YNCO0026W",
|
| 50 |
-
.default =
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
locus_tag_map = test_count_df %>%
|
| 54 |
-
filter(target_locus_tag %in% genomic_features$locus_tag) %>%
|
| 55 |
-
select(target_locus_tag) %>%
|
| 56 |
-
dplyr::rename(orig_locus_tag = target_locus_tag) %>%
|
| 57 |
-
mutate(locus_tag = orig_locus_tag) %>%
|
| 58 |
bind_rows(alias_matched_locus_tags) %>%
|
| 59 |
left_join(select(genomic_features, locus_tag, symbol)) %>%
|
| 60 |
dplyr::rename(target_locus_tag = locus_tag,
|
|
@@ -286,32 +294,32 @@ metadata_with_counts_meta_with_sample_id$degron =
|
|
| 286 |
dplyr::relocate(sra_accession, gsm_accession,
|
| 287 |
regulator_locus_tag, regulator_symbol)
|
| 288 |
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
|
|
|
|
| 7 |
|
| 8 |
genomic_features = arrow::read_parquet("~/code/hf/yeast_genome_resources/brentlab_features.parquet")
|
| 9 |
|
| 10 |
+
test_count_df = read_tsv(file.path(count_parent_dir, counts_files[[1]]), col_names = c('orig_locus_tag', 'count'))
|
| 11 |
|
| 12 |
find_matching_locus <- function(target, genomic_df) {
|
| 13 |
match_idx <- which(str_detect(genomic_df$alias, fixed(target)))
|
|
|
|
| 27 |
}
|
| 28 |
|
| 29 |
alias_matched_locus_tags <- test_count_df %>%
|
| 30 |
+
mutate(target_locus_tag = case_when(
|
| 31 |
+
orig_locus_tag == "LSR1" ~ "YNCB0019C",
|
| 32 |
+
orig_locus_tag == "SCR1" ~ "YNCE0024W",
|
| 33 |
+
orig_locus_tag == "snR18" ~ "YNCA0003W",
|
| 34 |
+
orig_locus_tag == "snR19" ~ "YNCN0005C",
|
| 35 |
+
orig_locus_tag == "snR3" ~ "YNCJ0030W",
|
| 36 |
+
orig_locus_tag == "snR39" ~ "YNCG0014C",
|
| 37 |
+
orig_locus_tag == "snR4" ~ "YNCE0019W",
|
| 38 |
+
orig_locus_tag == "snR5" ~ "YNCO0028W",
|
| 39 |
+
orig_locus_tag == "snR6" ~ "YNCL0006W",
|
| 40 |
+
orig_locus_tag == "snR8" ~ "YNCO0026W",
|
| 41 |
+
.default = orig_locus_tag)) %>%
|
| 42 |
left_join(genomic_features,
|
| 43 |
by = c('target_locus_tag' = 'locus_tag')) %>%
|
| 44 |
filter(is.na(chr), str_detect(target_locus_tag, "^__", negate=TRUE)) %>%
|
| 45 |
+
select(orig_locus_tag, target_locus_tag) %>%
|
|
|
|
| 46 |
mutate(target_locus_tag = str_replace_all(target_locus_tag, "\\(|\\)", "_")) %>%
|
| 47 |
mutate(match_info = map(target_locus_tag, ~find_matching_locus(.x, genomic_features))) %>%
|
| 48 |
unnest(match_info) %>%
|
| 49 |
+
select(orig_locus_tag, locus_tag)
|
| 50 |
+
|
| 51 |
+
locus_tag_map = test_count_df %>%
|
| 52 |
+
mutate(locus_tag = case_when(
|
| 53 |
orig_locus_tag == "LSR1" ~ "YNCB0019C",
|
| 54 |
orig_locus_tag == "SCR1" ~ "YNCE0024W",
|
| 55 |
orig_locus_tag == "snR18" ~ "YNCA0003W",
|
|
|
|
| 60 |
orig_locus_tag == "snR5" ~ "YNCO0028W",
|
| 61 |
orig_locus_tag == "snR6" ~ "YNCL0006W",
|
| 62 |
orig_locus_tag == "snR8" ~ "YNCO0026W",
|
| 63 |
+
.default = orig_locus_tag)) %>%
|
| 64 |
+
filter(locus_tag %in% genomic_features$locus_tag) %>%
|
| 65 |
+
select(-count) %>%
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
bind_rows(alias_matched_locus_tags) %>%
|
| 67 |
left_join(select(genomic_features, locus_tag, symbol)) %>%
|
| 68 |
dplyr::rename(target_locus_tag = locus_tag,
|
|
|
|
| 294 |
dplyr::relocate(sra_accession, gsm_accession,
|
| 295 |
regulator_locus_tag, regulator_symbol)
|
| 296 |
|
| 297 |
+
for(n in names(metadata_with_counts_meta_with_sample_id)){
|
| 298 |
+
meta = list(
|
| 299 |
+
path = file.path("/home/chase/code/hf/mahendrawada_2025",
|
| 300 |
+
paste0(n, "_counts_meta.parquet")),
|
| 301 |
+
data = metadata_with_counts_meta_with_sample_id[[n]]
|
| 302 |
+
)
|
| 303 |
+
|
| 304 |
+
counts = list(
|
| 305 |
+
path = file.path("/home/chase/code/hf/mahendrawada_2025",
|
| 306 |
+
paste0(n, "_counts.parquet")),
|
| 307 |
+
data = counts_parsed_list[[n]]$counts
|
| 308 |
+
)
|
| 309 |
+
|
| 310 |
+
arrow::write_parquet(
|
| 311 |
+
meta$data,
|
| 312 |
+
meta$path,
|
| 313 |
+
compression = "zstd",
|
| 314 |
+
write_statistics = TRUE)
|
| 315 |
+
|
| 316 |
+
arrow::write_parquet(
|
| 317 |
+
counts$data,
|
| 318 |
+
counts$path,
|
| 319 |
+
chunk_size = 7036,
|
| 320 |
+
compression = "zstd",
|
| 321 |
+
write_statistics = TRUE,
|
| 322 |
+
use_dictionary = c(
|
| 323 |
+
sra_accession = TRUE))
|
| 324 |
+
}
|
| 325 |
|
scripts/rnaseq_differential_expression.R
CHANGED
|
@@ -45,8 +45,7 @@ run_degron_deseq2 <- function(regulator_sym, env_cond, timepoint_val,
|
|
| 45 |
select(target_locus_tag, sra_accession, count) %>%
|
| 46 |
pivot_wider(
|
| 47 |
names_from = sra_accession,
|
| 48 |
-
values_from = count
|
| 49 |
-
values_fill = 0) %>%
|
| 50 |
column_to_rownames("target_locus_tag")
|
| 51 |
|
| 52 |
# Create sample metadata
|
|
@@ -100,6 +99,8 @@ degron = list(
|
|
| 100 |
meta = arrow::read_parquet("~/code/hf/mahendrawada_2025/degron_counts_meta.parquet")
|
| 101 |
)
|
| 102 |
|
|
|
|
|
|
|
| 103 |
x = map(unique(degron$meta$regulator_symbol),
|
| 104 |
~run_degron_deseq2(., 'standard_30C', 30, degron, baseline_control))
|
| 105 |
|
|
|
|
| 45 |
select(target_locus_tag, sra_accession, count) %>%
|
| 46 |
pivot_wider(
|
| 47 |
names_from = sra_accession,
|
| 48 |
+
values_from = count) %>%
|
|
|
|
| 49 |
column_to_rownames("target_locus_tag")
|
| 50 |
|
| 51 |
# Create sample metadata
|
|
|
|
| 99 |
meta = arrow::read_parquet("~/code/hf/mahendrawada_2025/degron_counts_meta.parquet")
|
| 100 |
)
|
| 101 |
|
| 102 |
+
z = run_degron_deseq2("CYC8", 'standard_30C', 30, degron, baseline_control)
|
| 103 |
+
|
| 104 |
x = map(unique(degron$meta$regulator_symbol),
|
| 105 |
~run_degron_deseq2(., 'standard_30C', 30, degron, baseline_control))
|
| 106 |
|
wt_baseline_counts.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3cc80db75497486452c4dabbe0b81279577b548c1d0aa0d22898fb98d1e75f22
|
| 3 |
+
size 1008838
|
wt_degron_control_counts.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3f6c52c34baaf234b6090f5b4bed4fa33d1989ef19c54329b3801def6fb4efb3
|
| 3 |
+
size 657865
|