Skip to content

Commit

Permalink
prepare large-scale computations
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim committed Aug 31, 2021
1 parent e665c59 commit 54566bf
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified sceptre_paper/.DS_Store
Binary file not shown.
Binary file modified sceptre_paper/analysis_drivers/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ offsite_dir <- .get_config_path("LOCAL_SCEPTRE_DATA_DIR")
library(monocle)
source(paste0(code_dir, "/sceptre_paper/analysis_drivers/analysis_drivers_xie/paths_to_dirs.R"))
source(paste0(code_dir, "/sceptre_paper/analysis_drivers/analysis_drivers_xie/gasp_custom_functs.R"))
cds <- readRDS(paste0(processed_dir, "/monocole_obj.rds"))
analysis_ready_dir <- paste0(offsite_dir, "data/xie/analysis_ready")

cds <- readRDS(paste0(analysis_ready_dir, "/monocole_obj.rds"))
pairs <- fst::read_fst(paste0(processed_dir, "/gRNA_gene_pairs.fst"))
pairs <- pairs[1:100,]

Expand Down Expand Up @@ -32,4 +34,4 @@ res <- purrr::map_dfr(.x = seq(1, nrow(pairs)), .f = function(i) {
return(out)
})

saveRDS(res, paste0(results_dir_negative_binomial, "/monocle_nb_results.rds"))
saveRDS(res, paste0(results_dir_negative_binomial, "/monocle_nb_results.rds"))
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# offsite_dir <- .get_config_path("LOCAL_SCEPTRE_DATA_DIR")
small_example <- FALSE
small_example <- TRUE
library(sceptre)

processed_dir <- paste0(offsite_dir, "/data/xie/processed")
analysis_ready_dir <- paste0(offsite_dir, "/data/xie/analysis_ready")
results_dir_negbin <- paste0(offsite_dir, "/results/xie/negative_binomial")
bulk_regions <- readRDS(paste0(processed_dir, "/bulk_region_names.rds"))
bulk_regions <- readRDS(paste0(plrocessed_dir, "/bulk_region_names.rds"))
gRNA_gene_pairs <- fst::read.fst(paste0(processed_dir, "/gRNA_gene_pairs.fst"))
covariate_matrix <- fst::read.fst(paste0(analysis_ready_dir, "/covariate_model_matrix.fst"))
cell_gene_expression_matrix_info <- readRDS(paste0(analysis_ready_dir, "/exp_mat_sub_metadata.rds"))
Expand Down
12 changes: 6 additions & 6 deletions sceptre_paper/utilities/run_xie_analysis.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ source ~/.research_config
# Set the number of processors.
n_processors=50
machine=$MACHINE_NAME
precomputation_complete=FALSE

echo Running on machine $machine with $n_processors processors.

Expand All @@ -22,23 +23,22 @@ bash build_and_install_package.bash sceptre $machine
bash build_and_install_package.bash katsevich2020 $machine

echo Initialize the offsite directory structure.
Rscript $code_dir"/sceptre_paper/analysis_drivers/analysis_drivers_xie/"check_directory_structure_1.R
# Rscript $code_dir"/sceptre_paper/analysis_drivers/analysis_drivers_xie/"check_directory_structure_1.R

echo Download the data.
# Rscript $code_dir"/sceptre_paper/analysis_drivers/analysis_drivers_xie/"download_data_2.R

echo Pre-process the data.
Rscript $code_dir"/sceptre_paper/analysis_drivers/analysis_drivers_xie/"pre_process_data_3.R
# Rscript $code_dir"/sceptre_paper/analysis_drivers/analysis_drivers_xie/"pre_process_data_3.R

echo Construct model covariate matrix and perform quality control.
Rscript $code_dir"/sceptre_paper/analysis_drivers/analysis_drivers_xie/"quality_control_4.R
# Rscript $code_dir"/sceptre_paper/analysis_drivers/analysis_drivers_xie/"quality_control_4.R

echo Determine the gene-gRNA pairs to analyze.
Rscript $code_dir"/sceptre_paper/analysis_drivers/analysis_drivers_xie/"select_gRNA_gene_pair_5.R
# Rscript $code_dir"/sceptre_paper/analysis_drivers/analysis_drivers_xie/"select_gRNA_gene_pair_5.R

echo Create monocole object for monocole NB analysis.
Rscript $code_dir"/sceptre_paper/analysis_drivers/analysis_drivers_xie/"create_monocle_object_5.1.R

# Rscript $code_dir"/sceptre_paper/analysis_drivers/analysis_drivers_xie/"create_monocle_object_5.1.R

# Locate the parameter file
parameter_file=$code_dir"/sceptre_paper/analysis_drivers/analysis_drivers_xie/"sceptre_function_args.R
Expand Down

0 comments on commit 54566bf

Please sign in to comment.