diff --git a/analyses/cell-type-wilms-tumor-14/README.md b/analyses/cell-type-wilms-tumor-14/README.md index ba9ff9346..e962b3c2e 100644 --- a/analyses/cell-type-wilms-tumor-14/README.md +++ b/analyses/cell-type-wilms-tumor-14/README.md @@ -31,7 +31,7 @@ This would include: ## Usage -* Run Rscripts with command line +* Run main pipeline with command line ```bash cd /path/to/OpenScPCA-analysis cd analyses/cell-type-wilms-tumor-14 @@ -74,4 +74,7 @@ sudo apt install -y libglpk40 \ ## Computational resources -Analysis could be executed on a virtual computer ([Standard-4XL](https://openscpca.readthedocs.io/en/latest/aws/lsfr/creating-vcs/)) via AWS Lightsail for Research. \ No newline at end of file +Analysis could be executed on a virtual computer ([Standard-4XL](https://openscpca.readthedocs.io/en/latest/aws/lsfr/creating-vcs/)) via AWS Lightsail for Research. + +## Exploratory analysis +In addition to the main pipeline, some exploratory analysis in R notebooks are added into the `./exploratory_analysis` folder, including CNV analysis. Check `./exploratory_analysis/README.md` for more details. \ No newline at end of file diff --git a/analyses/cell-type-wilms-tumor-14/components/dependencies.R b/analyses/cell-type-wilms-tumor-14/components/dependencies.R index ae80dc0ac..774e95b61 100644 --- a/analyses/cell-type-wilms-tumor-14/components/dependencies.R +++ b/analyses/cell-type-wilms-tumor-14/components/dependencies.R @@ -1,2 +1,3 @@ # R dependencies not captured by `renv` # library("missing_package") +library(rtracklayer) diff --git a/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/03_copykat_SCPCL000850.Rmd b/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/03_copykat_SCPCL000850.Rmd new file mode 100644 index 000000000..e342a560d --- /dev/null +++ b/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/03_copykat_SCPCL000850.Rmd @@ -0,0 +1,124 @@ +--- +title: "Exploratory analysis using Copykat" +author: "Jingxuan Chen" +date: "`r Sys.Date()`" +output: html_document +--- + +## Introduction + +Here we test `CopyKat` to analyze the CNV profile for Wilms tumor sample (SCPCL000850), aiming to identify potential tumor cells from normal cells. + +Before running this notebook, one should first generate `CopyKat` outputs as in `03_runCopyKat.R`. + +## Setup + +### Packages + +```{r packages} +suppressPackageStartupMessages({ + library(dplyr) + library(Seurat) + library(copykat) + library(ggplot2) +}) +``` + +### Paths + + +#### Base directories + +```{r base paths} +# The base path for the OpenScPCA repository, found by its (hidden) .git directory +path_repo <- rprojroot::find_root(rprojroot::is_git_root) + +# The path to this module +path_anal <- file.path(path_repo,"analyses","cell-type-wilms-tumor-14") +``` + +#### Input and output files + +Only run for one sample + +```{r paths} +library_id <- "SCPCL000850" +scratch_out_dir <- file.path(path_anal, "scratch", "03_cnv","copykat") +dir.create(scratch_out_dir, showWarnings = FALSE, recursive = TRUE) +library_out_dir <- file.path(scratch_out_dir, library_id) +dir.create(library_out_dir, showWarnings = FALSE, recursive = TRUE) + +## Input files +# load pre-processed sample objs & anchor transfer results +obj <- SeuratObject::LoadSeuratRds( file.path(path_anal,"scratch","00_preprocessing_rds",paste0(library_id,".rdsSeurat")) ) +level <- "compartment" +predictions <- read.csv( file.path(path_anal, "results", "01_anchor_transfer_seurat", paste0(library_id, "_", level,".csv")) ) +obj <- AddMetaData(object = obj, metadata = predictions) +copykat_result <- readr::read_rds( file = file.path(library_out_dir, paste0(library_id, "_copykat_resultobj.rds")) ) +copykat_result_noref <- readr::read_rds( file = file.path(library_out_dir, paste0(library_id, "_noref_copykat_resultobj.rds")) ) + +``` + +```{r images} +heatmap_wref <- file.path(library_out_dir, paste0(library_id, "_copykat_heatmap.jpeg")) +heatmap_noref <- file.path(library_out_dir, paste0(library_id, "_noref_copykat_heatmap.jpeg")) +``` + +## Analysis content + +#### Run CopyKat with normal cells + +Here, "immune" cells annotated with anchor transfer were used as reference normal cells. Here is the heatmap generated by the software: + +```{r, echo=FALSE, out.width = '100%'} +knitr::include_graphics(heatmap_wref) +``` + +Frequency of predicted `aneuploid`, `diploid`, and `not.defined` categories. + +```{r} +copykat_df <- copykat_result$prediction %>% + select(copykat.pred) %>% + rename(c("ref.copykat" = "copykat.pred")) +table(copykat_df) +``` + +Plot CopyKat identifications onto UMAP. + +```{r} +obj <- AddMetaData(object = obj, metadata = copykat_df) +DimPlot(obj, group.by = "ref.copykat", alpha = 0.3) +``` + +#### Run CopyKat without normal cells + +Here, no normal cells were provided to CopyKat. + +```{r, echo=FALSE, out.width = '100%'} +knitr::include_graphics(heatmap_noref) +``` + +Frequency of predicted `aneuploid`, `diploid`, and `not.defined` categories. + +```{r} +copykat_noref_df <- copykat_result_noref$prediction %>% + select(copykat.pred) %>% + rename(c("noref.copykat" = "copykat.pred")) +table(copykat_noref_df) +``` + +Plot CopyKat identifications onto UMAP. + +```{r} +obj <- AddMetaData(object = obj, metadata = copykat_noref_df) +DimPlot(obj, group.by = "noref.copykat", alpha = 0.3) +``` + +In this Wilms tumor sample (SCPCL000850), it's likely that CopyKat is not working well: (i) The result with or without specifying normal cells are not consistent; (ii) From the heatmap, no much differences in CNV profile could be observed. + +## Session Info + +```{r session info} +# record the versions of the packages used in this analysis and other environment information +sessionInfo() +``` diff --git a/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/03_copykat_SCPCL000850.html b/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/03_copykat_SCPCL000850.html new file mode 100644 index 000000000..0fe0c828c --- /dev/null +++ b/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/03_copykat_SCPCL000850.html @@ -0,0 +1,574 @@ + + + + + + + + + + + + + + + +Exploratory analysis using Copykat + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+

Introduction

+

Here we test CopyKat to analyze the CNV profile for +Wilms tumor sample (SCPCL000850), aiming to identify potential tumor +cells from normal cells.

+

Before running this notebook, one should first generate +CopyKat outputs as in 03_runCopyKat.R.

+
+
+

Setup

+
+

Packages

+
suppressPackageStartupMessages({
+  library(dplyr)
+  library(Seurat)
+  library(copykat)
+  library(ggplot2)
+})
+
+
+

Paths

+
+

Base directories

+
# The base path for the OpenScPCA repository, found by its (hidden) .git directory
+path_repo <- rprojroot::find_root(rprojroot::is_git_root)
+
+# The path to this module
+path_anal <- file.path(path_repo,"analyses","cell-type-wilms-tumor-14") 
+
+
+

Input and output files

+

Only run for one sample

+
library_id <- "SCPCL000850"
+scratch_out_dir <- file.path(path_anal, "scratch", "03_cnv","copykat")
+dir.create(scratch_out_dir, showWarnings = FALSE, recursive = TRUE)
+library_out_dir <- file.path(scratch_out_dir, library_id)
+dir.create(library_out_dir, showWarnings = FALSE, recursive = TRUE)
+
+## Input files
+# load pre-processed sample objs & anchor transfer results
+obj <- SeuratObject::LoadSeuratRds( file.path(path_anal,"scratch","00_preprocessing_rds",paste0(library_id,".rdsSeurat")) )
+level <- "compartment"
+predictions <- read.csv( file.path(path_anal, "results", "01_anchor_transfer_seurat", paste0(library_id, "_", level,".csv")) ) 
+obj <- AddMetaData(object = obj, metadata = predictions)
+copykat_result <- readr::read_rds( file = file.path(library_out_dir, paste0(library_id, "_copykat_resultobj.rds")) )
+copykat_result_noref <- readr::read_rds( file = file.path(library_out_dir, paste0(library_id, "_noref_copykat_resultobj.rds")) )
+
heatmap_wref <- file.path(library_out_dir, paste0(library_id, "_copykat_heatmap.jpeg"))
+heatmap_noref <- file.path(library_out_dir, paste0(library_id, "_noref_copykat_heatmap.jpeg"))
+
+
+
+
+

Analysis content

+
+

Run CopyKat with normal cells

+

Here, “immune” cells annotated with anchor transfer were used as +reference normal cells. Here is the heatmap generated by the +software:

+

+

Frequency of predicted aneuploid, diploid, +and not.defined categories.

+
copykat_df <- copykat_result$prediction %>%
+  select(copykat.pred) %>% 
+  rename(c("ref.copykat" = "copykat.pred"))
+table(copykat_df)
+
## ref.copykat
+##   aneuploid     diploid not.defined 
+##        1089        1276         578
+

Plot CopyKat identifications onto UMAP.

+
obj <- AddMetaData(object = obj, metadata = copykat_df)
+DimPlot(obj, group.by = "ref.copykat", alpha = 0.3)
+

+
+
+

Run CopyKat without normal cells

+

Here, no normal cells were provided to CopyKat.

+

+

Frequency of predicted aneuploid, diploid, +and not.defined categories.

+
copykat_noref_df <- copykat_result_noref$prediction %>%
+  select(copykat.pred) %>% 
+  rename(c("noref.copykat" = "copykat.pred"))
+table(copykat_noref_df)
+
## noref.copykat
+##   aneuploid     diploid not.defined 
+##        1458         907         578
+

Plot CopyKat identifications onto UMAP.

+
obj <- AddMetaData(object = obj, metadata = copykat_noref_df)
+DimPlot(obj, group.by = "noref.copykat", alpha = 0.3)
+

+

In this Wilms tumor sample (SCPCL000850), it’s likely that CopyKat is +not working well: (i) The result with or without specifying normal cells +are not consistent; (ii) From the heatmap, no much differences in CNV +profile could be observed.

+
+
+
+

Session Info

+
# record the versions of the packages used in this analysis and other environment information
+sessionInfo()
+
## R version 4.4.0 (2024-04-24)
+## Platform: x86_64-pc-linux-gnu
+## Running under: Ubuntu 22.04.4 LTS
+## 
+## Matrix products: default
+## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
+## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0
+## 
+## locale:
+##  [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
+##  [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
+##  [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
+## [10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   
+## 
+## time zone: Etc/UTC
+## tzcode source: system (glibc)
+## 
+## attached base packages:
+## [1] stats     graphics  grDevices datasets  utils     methods   base     
+## 
+## other attached packages:
+## [1] ggplot2_3.5.1      copykat_1.1.0      Seurat_5.1.0       SeuratObject_5.0.2
+## [5] sp_2.1-4           dplyr_1.1.4       
+## 
+## loaded via a namespace (and not attached):
+##   [1] RColorBrewer_1.1-3     jsonlite_1.8.9         magrittr_2.0.3        
+##   [4] spatstat.utils_3.1-0   farver_2.1.2           rmarkdown_2.28        
+##   [7] vctrs_0.6.5            ROCR_1.0-11            spatstat.explore_3.3-2
+##  [10] htmltools_0.5.8.1      sass_0.4.9             sctransform_0.4.1     
+##  [13] parallelly_1.38.0      KernSmooth_2.23-22     bslib_0.8.0           
+##  [16] htmlwidgets_1.6.4      ica_1.0-3              plyr_1.8.9            
+##  [19] plotly_4.10.4          zoo_1.8-12             cachem_1.1.0          
+##  [22] igraph_2.0.3           mime_0.12              lifecycle_1.0.4       
+##  [25] pkgconfig_2.0.3        Matrix_1.7-0           R6_2.5.1              
+##  [28] fastmap_1.2.0          fitdistrplus_1.2-1     future_1.34.0         
+##  [31] shiny_1.9.1            digest_0.6.37          colorspace_2.1-1      
+##  [34] patchwork_1.3.0        rprojroot_2.0.4        tensor_1.5            
+##  [37] RSpectra_0.16-2        irlba_2.3.5.1          labeling_0.4.3        
+##  [40] progressr_0.14.0       fansi_1.0.6            spatstat.sparse_3.1-0 
+##  [43] httr_1.4.7             polyclip_1.10-7        abind_1.4-8           
+##  [46] compiler_4.4.0         withr_3.0.1            fastDummies_1.7.4     
+##  [49] highr_0.11             MASS_7.3-60.2          tools_4.4.0           
+##  [52] lmtest_0.9-40          httpuv_1.6.15          future.apply_1.11.2   
+##  [55] goftest_1.2-3          glue_1.8.0             nlme_3.1-164          
+##  [58] promises_1.3.0         grid_4.4.0             Rtsne_0.17            
+##  [61] cluster_2.1.6          reshape2_1.4.4         generics_0.1.3        
+##  [64] gtable_0.3.5           spatstat.data_3.1-2    tzdb_0.4.0            
+##  [67] tidyr_1.3.1            data.table_1.16.0      hms_1.1.3             
+##  [70] utf8_1.2.4             spatstat.geom_3.3-3    RcppAnnoy_0.0.22      
+##  [73] ggrepel_0.9.6          RANN_2.6.2             pillar_1.9.0          
+##  [76] stringr_1.5.1          spam_2.10-0            RcppHNSW_0.6.0        
+##  [79] later_1.3.2            splines_4.4.0          lattice_0.22-6        
+##  [82] renv_1.0.7             survival_3.5-8         deldir_2.0-4          
+##  [85] tidyselect_1.2.1       miniUI_0.1.1.1         pbapply_1.7-2         
+##  [88] knitr_1.48             gridExtra_2.3          scattermore_1.2       
+##  [91] xfun_0.47              matrixStats_1.4.1      stringi_1.8.4         
+##  [94] lazyeval_0.2.2         yaml_2.3.10            evaluate_1.0.0        
+##  [97] codetools_0.2-20       tibble_3.2.1           BiocManager_1.30.25   
+## [100] cli_3.6.3              uwot_0.2.2             xtable_1.8-4          
+## [103] reticulate_1.39.0      munsell_0.5.1          jquerylib_0.1.4       
+## [106] Rcpp_1.0.13            globals_0.16.3         spatstat.random_3.3-2 
+## [109] png_0.1-8              spatstat.univar_3.0-1  parallel_4.4.0        
+## [112] readr_2.1.5            dotCall64_1.1-1        listenv_0.9.1         
+## [115] viridisLite_0.4.2      scales_1.3.0           ggridges_0.5.6        
+## [118] leiden_0.4.3.1         purrr_1.0.2            rlang_1.1.4           
+## [121] cowplot_1.1.3
+
+ + + + +
+ + + + + + + + + + + + + + + diff --git a/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/03_infercnv_SCPCL000850.Rmd b/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/03_infercnv_SCPCL000850.Rmd new file mode 100644 index 000000000..1f654f330 --- /dev/null +++ b/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/03_infercnv_SCPCL000850.Rmd @@ -0,0 +1,171 @@ +--- +title: "Exploratory CNV analysis using inferCNV" +author: "Jingxuan Chen" +date: "`r Sys.Date()`" +output: html_document +--- + +## Introduction + +Here we test `inferCNV` to analyze the CNV profile for Wilms tumor sample (SCPCL000850), aiming to identify potential tumor cells from normal cells. + +Before running this notebook, one should first generate `inferCNV` outputs as in `03_runInferCNV.R`. + +## Setup + +### Packages + +```{r packages} +suppressPackageStartupMessages({ + library(dplyr) + library(Seurat) + library(infercnv) + library(ggplot2) +}) +``` + +### Paths + +#### Base directories + +```{r base paths} +# The base path for the OpenScPCA repository, found by its (hidden) .git directory +path_repo <- rprojroot::find_root(rprojroot::is_git_root) + +# The path to this module +path_anal <- file.path(path_repo,"analyses","cell-type-wilms-tumor-14") +``` + +#### Input and output files + +Only run for one sample + +```{r paths} +library_id <- "SCPCL000850" +scratch_out_dir <- file.path(path_anal, "scratch", "03_cnv","infercnv") +dir.create(scratch_out_dir, showWarnings = FALSE, recursive = TRUE) +library_out_dir <- file.path(scratch_out_dir, library_id) +dir.create(library_out_dir, showWarnings = FALSE, recursive = TRUE) + +## Input files +# load pre-processed sample objs & anchor transfer results +obj <- SeuratObject::LoadSeuratRds( file.path(path_anal,"scratch","00_preprocessing_rds",paste0(library_id,".rdsSeurat")) ) +level <- "compartment" +predictions <- read.csv( file.path(path_anal, "results", "01_anchor_transfer_seurat", paste0(library_id, "_", level,".csv")) ) +obj <- AddMetaData(object = obj, metadata = predictions) +infercnv_result <- readr::read_rds( file = file.path(library_out_dir, "run.final.infercnv_obj") ) +# add infercnv output to seurat object +obj_cnv <- infercnv::add_to_seurat( + seurat_obj = obj, + infercnv_output_path = library_out_dir +) +``` + +```{r images} +heatmap_wref <- file.path(library_out_dir, "infercnv.png") +normal_level <- "immune" +``` + +## Analysis content + +Here, "immune" cells annotated with anchor transfer were used as reference normal cells. Here is the heatmap generated by the software: + +```{r, echo=FALSE, out.width = '100%'} +knitr::include_graphics(heatmap_wref) +``` + +We could observe some different CNV profiles between "fetal_nephron" and "stroma", especially chr1 and chr11. However, it's hard to observe any different CNV profiles within the "fetal_nephron" subgroups. + +`inferCNV` outputs results for each Chromosome. Thus, I applied several ways to summarize the overall CNV profile. + +#### CNV score - proportion of genes with CNV + +Based on [this](https://www.biostars.org/p/9573777/) Biostars discussion, I calculated a `cnv_score`, which basically indicates the proportion of CNVs across all genes. + +```{r} +## summary strategy 1 https://www.biostars.org/p/9573777/ +scores <- apply(infercnv_result@expr.data, 2 ,function(x){ sum(x < 0.95 | x > 1.05)/length(x) }) %>% + as.data.frame() %>% + mutate(pred = obj$predicted.id) %>% + mutate(cnv_score = ifelse( + pred == normal_level, + NA, + . + )) +``` + +Ideally, we should observe bimodal distribution for this score, indicating the CNV difference between normal and tumor cells. However, here we could get a distribution close to normal. +```{r} +hist(scores$cnv_score, breaks = 100) +``` + +By plotting the CNV score onto UMAP, no clear pattern is shown. +```{r} +obj <- AddMetaData(object = obj, metadata = scores) +FeaturePlot(obj, features = "cnv_score", alpha = 0.3) + + scale_color_viridis_c() +``` + +#### Summary based upon number of chromosomes that have CNV +This strategy to summary CNV results is based on [`cell-type-ewings`](https://github.com/AlexsLemonade/OpenScPCA-analysis/tree/main/analyses/cell-type-ewings/template_notebooks/cnv-workflow) module. + +```{r} +## summary strategy 2 ewings analysis, based on number of chr that have cnv +cnv_df <- obj_cnv@meta.data %>% + select(matches("predicted.id") | starts_with("has_cnv_chr") & !matches("has_cnv_chrMT")) %>% + mutate(count_cnv_chr = ifelse(predicted.id == normal_level, + NA, + rowSums(across(starts_with("has_cnv_chr"))) + ) ) +``` + +```{r} +hist(cnv_df$count_cnv_chr) +``` + +```{r} +obj <- AddMetaData(object = obj, metadata = cnv_df) +FeaturePlot(obj, features = "count_cnv_chr", alpha = 0.3) + + scale_color_viridis_c() +``` + +#### Summary based upon weighted means of CNV proportion +This strategy to summary CNV results is based on [`cell-type-ewings`](https://github.com/AlexsLemonade/OpenScPCA-analysis/tree/main/analyses/cell-type-ewings/template_notebooks/cnv-workflow) module. + +```{r} +## summary strategy 3 ewings analysis, based on number of chr that have cn +chr_weights <- infercnv_result@gene_order |> + as.data.frame() |> + dplyr::count(chr) |> + # only keep chr 1-22, drops MT and GL chr + dplyr::filter(chr %in% glue::glue("chr{seq(1,22)}")) |> + dplyr::pull(n) + +cnv_df <- obj_cnv@meta.data %>% + select(matches("predicted.id") | starts_with("proportion_scaled_cnv_chr") & !ends_with("chrMT")) %>% + rowwise() %>% + mutate(weight_mean = ifelse( + predicted.id == normal_level, + NA, + weighted.mean(across(starts_with("proportion_scaled_cnv_chr")), chr_weights/sum(chr_weights)) + ) ) +``` + +```{r} +hist(cnv_df$weight_mean) +``` + +```{r} +obj <- AddMetaData(object = obj, metadata = cnv_df) +FeaturePlot(obj, features = "weight_mean", alpha = 0.3) + + scale_color_viridis_c() +``` + +In conclusion, the heatmap generated by `inferCNV` indicates different CNV profiles between `fetal_nephron` and `stroma`, especially in Chr1. However, none of the three summary strategies seem working. + +## Session Info + +```{r session info} +# record the versions of the packages used in this analysis and other environment information +sessionInfo() +``` diff --git a/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/03_infercnv_SCPCL000850.html b/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/03_infercnv_SCPCL000850.html new file mode 100644 index 000000000..98665b647 --- /dev/null +++ b/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/03_infercnv_SCPCL000850.html @@ -0,0 +1,671 @@ + + + + + + + + + + + + + + + +Exploratory CNV analysis using inferCNV + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+

Introduction

+

Here we test inferCNV to analyze the CNV profile for +Wilms tumor sample (SCPCL000850), aiming to identify potential tumor +cells from normal cells.

+

Before running this notebook, one should first generate +inferCNV outputs as in 03_runInferCNV.R.

+
+
+

Setup

+
+

Packages

+
suppressPackageStartupMessages({
+  library(dplyr)
+  library(Seurat)
+  library(infercnv)
+  library(ggplot2)
+})
+
+
+

Paths

+
+

Base directories

+
# The base path for the OpenScPCA repository, found by its (hidden) .git directory
+path_repo <- rprojroot::find_root(rprojroot::is_git_root)
+
+# The path to this module
+path_anal <- file.path(path_repo,"analyses","cell-type-wilms-tumor-14") 
+
+
+

Input and output files

+

Only run for one sample

+
library_id <- "SCPCL000850"
+scratch_out_dir <- file.path(path_anal, "scratch", "03_cnv","infercnv")
+dir.create(scratch_out_dir, showWarnings = FALSE, recursive = TRUE)
+library_out_dir <- file.path(scratch_out_dir, library_id)
+dir.create(library_out_dir, showWarnings = FALSE, recursive = TRUE)
+
+## Input files
+# load pre-processed sample objs & anchor transfer results
+obj <- SeuratObject::LoadSeuratRds( file.path(path_anal,"scratch","00_preprocessing_rds",paste0(library_id,".rdsSeurat")) )
+level <- "compartment"
+predictions <- read.csv( file.path(path_anal, "results", "01_anchor_transfer_seurat", paste0(library_id, "_", level,".csv")) ) 
+obj <- AddMetaData(object = obj, metadata = predictions)
+infercnv_result <- readr::read_rds( file = file.path(library_out_dir, "run.final.infercnv_obj") )
+# add infercnv output to seurat object
+obj_cnv <- infercnv::add_to_seurat(
+  seurat_obj = obj,
+  infercnv_output_path = library_out_dir
+)
+
heatmap_wref <- file.path(library_out_dir, "infercnv.png")
+normal_level <- "immune"
+
+
+
+
+

Analysis content

+

Here, “immune” cells annotated with anchor transfer were used as +reference normal cells. Here is the heatmap generated by the +software:

+

+

We could observe some different CNV profiles between “fetal_nephron” +and “stroma”, especially chr1 and chr11. However, it’s hard to observe +any different CNV profiles within the “fetal_nephron” subgroups.

+

inferCNV outputs results for each Chromosome. Thus, I +applied several ways to summarize the overall CNV profile.

+
+

CNV score - proportion of genes with CNV

+

Based on this +Biostars discussion, I calculated a cnv_score, which +basically indicates the proportion of CNVs across all genes.

+
## summary strategy 1 https://www.biostars.org/p/9573777/
+scores <- apply(infercnv_result@expr.data, 2 ,function(x){ sum(x < 0.95 | x > 1.05)/length(x) }) %>% 
+  as.data.frame() %>%
+  mutate(pred = obj$predicted.id) %>%
+  mutate(cnv_score = ifelse(
+    pred == normal_level,
+    NA,
+    .
+  ))
+

Ideally, we should observe bimodal distribution for this score, +indicating the CNV difference between normal and tumor cells. However, +here we could get a distribution close to normal.

+
hist(scores$cnv_score, breaks = 100)
+

+

By plotting the CNV score onto UMAP, no clear pattern is shown.

+
obj <- AddMetaData(object = obj, metadata = scores)
+FeaturePlot(obj, features = "cnv_score", alpha = 0.3) +
+  scale_color_viridis_c()
+
## Scale for colour is already present.
+## Adding another scale for colour, which will replace the existing scale.
+

+
+
+

Summary based upon number of chromosomes that have CNV

+

This strategy to summary CNV results is based on cell-type-ewings +module.

+
## summary strategy 2 ewings analysis, based on number of chr that have cnv
+cnv_df <- obj_cnv@meta.data %>%
+  select(matches("predicted.id") | starts_with("has_cnv_chr") & !matches("has_cnv_chrMT")) %>%
+  mutate(count_cnv_chr = ifelse(predicted.id == normal_level,
+                            NA,
+                            rowSums(across(starts_with("has_cnv_chr")))
+                            ) )
+
hist(cnv_df$count_cnv_chr)
+

+
obj <- AddMetaData(object = obj, metadata = cnv_df)
+FeaturePlot(obj, features = "count_cnv_chr", alpha = 0.3) +
+  scale_color_viridis_c()
+
## Scale for colour is already present.
+## Adding another scale for colour, which will replace the existing scale.
+

+
+
+

Summary based upon weighted means of CNV proportion

+

This strategy to summary CNV results is based on cell-type-ewings +module.

+
## summary strategy 3 ewings analysis, based on number of chr that have cn
+chr_weights <- infercnv_result@gene_order |> 
+  as.data.frame() |> 
+  dplyr::count(chr) |> 
+  # only keep chr 1-22, drops MT and GL chr
+  dplyr::filter(chr %in% glue::glue("chr{seq(1,22)}")) |> 
+  dplyr::pull(n)
+
+cnv_df <- obj_cnv@meta.data %>%
+  select(matches("predicted.id") | starts_with("proportion_scaled_cnv_chr") & !ends_with("chrMT")) %>%
+  rowwise() %>%
+  mutate(weight_mean = ifelse(
+    predicted.id == normal_level,
+    NA,
+    weighted.mean(across(starts_with("proportion_scaled_cnv_chr")), chr_weights/sum(chr_weights))
+  ) )
+
hist(cnv_df$weight_mean)
+

+
obj <- AddMetaData(object = obj, metadata = cnv_df)
+
## Warning: Setting row names on a tibble is deprecated.
+
FeaturePlot(obj, features = "weight_mean", alpha = 0.3) +
+  scale_color_viridis_c()
+
## Scale for colour is already present.
+## Adding another scale for colour, which will replace the existing scale.
+

+

In conclusion, the heatmap generated by inferCNV +indicates different CNV profiles between fetal_nephron and +stroma, especially in Chr1. However, none of the three +summary strategies seem working.

+
+
+
+

Session Info

+
# record the versions of the packages used in this analysis and other environment information
+sessionInfo()
+
## R version 4.4.0 (2024-04-24)
+## Platform: x86_64-pc-linux-gnu
+## Running under: Ubuntu 22.04.4 LTS
+## 
+## Matrix products: default
+## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
+## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0
+## 
+## locale:
+##  [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
+##  [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
+##  [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
+## [10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   
+## 
+## time zone: Etc/UTC
+## tzcode source: system (glibc)
+## 
+## attached base packages:
+## [1] stats     graphics  grDevices datasets  utils     methods   base     
+## 
+## other attached packages:
+## [1] ggplot2_3.5.1      infercnv_1.20.0    Seurat_5.1.0       SeuratObject_5.0.2
+## [5] sp_2.1-4           dplyr_1.1.4       
+## 
+## loaded via a namespace (and not attached):
+##   [1] RcppAnnoy_0.0.22            splines_4.4.0              
+##   [3] later_1.3.2                 bitops_1.0-8               
+##   [5] tibble_3.2.1                polyclip_1.10-7            
+##   [7] fastDummies_1.7.4           lifecycle_1.0.4            
+##   [9] rprojroot_2.0.4             fastcluster_1.2.6          
+##  [11] edgeR_4.2.1                 doParallel_1.0.17          
+##  [13] globals_0.16.3              lattice_0.22-6             
+##  [15] MASS_7.3-60.2               magrittr_2.0.3             
+##  [17] limma_3.60.4                plotly_4.10.4              
+##  [19] sass_0.4.9                  rmarkdown_2.28             
+##  [21] jquerylib_0.1.4             yaml_2.3.10                
+##  [23] httpuv_1.6.15               sctransform_0.4.1          
+##  [25] spam_2.10-0                 spatstat.sparse_3.1-0      
+##  [27] reticulate_1.39.0           cowplot_1.1.3              
+##  [29] pbapply_1.7-2               RColorBrewer_1.1-3         
+##  [31] multcomp_1.4-26             abind_1.4-8                
+##  [33] zlibbioc_1.50.0             Rtsne_0.17                 
+##  [35] GenomicRanges_1.56.1        purrr_1.0.2                
+##  [37] BiocGenerics_0.50.0         TH.data_1.1-2              
+##  [39] sandwich_3.1-1              GenomeInfoDbData_1.2.12    
+##  [41] IRanges_2.38.1              S4Vectors_0.42.1           
+##  [43] ggrepel_0.9.6               irlba_2.3.5.1              
+##  [45] listenv_0.9.1               spatstat.utils_3.1-0       
+##  [47] goftest_1.2-3               RSpectra_0.16-2            
+##  [49] spatstat.random_3.3-2       fitdistrplus_1.2-1         
+##  [51] parallelly_1.38.0           leiden_0.4.3.1             
+##  [53] codetools_0.2-20            coin_1.4-3                 
+##  [55] DelayedArray_0.30.1         tidyselect_1.2.1           
+##  [57] futile.logger_1.4.3         UCSC.utils_1.0.0           
+##  [59] farver_2.1.2                rjags_4-16                 
+##  [61] matrixStats_1.4.1           stats4_4.4.0               
+##  [63] spatstat.explore_3.3-2      jsonlite_1.8.9             
+##  [65] progressr_0.14.0            ggridges_0.5.6             
+##  [67] survival_3.5-8              iterators_1.0.14           
+##  [69] foreach_1.5.2               tools_4.4.0                
+##  [71] ica_1.0-3                   Rcpp_1.0.13                
+##  [73] glue_1.8.0                  gridExtra_2.3              
+##  [75] SparseArray_1.4.8           xfun_0.47                  
+##  [77] MatrixGenerics_1.16.0       GenomeInfoDb_1.40.1        
+##  [79] withr_3.0.1                 formatR_1.14               
+##  [81] BiocManager_1.30.25         fastmap_1.2.0              
+##  [83] fansi_1.0.6                 caTools_1.18.3             
+##  [85] digest_0.6.37               parallelDist_0.2.6         
+##  [87] R6_2.5.1                    mime_0.12                  
+##  [89] colorspace_2.1-1            scattermore_1.2            
+##  [91] gtools_3.9.5                tensor_1.5                 
+##  [93] spatstat.data_3.1-2         utf8_1.2.4                 
+##  [95] tidyr_1.3.1                 generics_0.1.3             
+##  [97] renv_1.0.7                  data.table_1.16.0          
+##  [99] httr_1.4.7                  htmlwidgets_1.6.4          
+## [101] S4Arrays_1.4.1              uwot_0.2.2                 
+## [103] pkgconfig_2.0.3             gtable_0.3.5               
+## [105] modeltools_0.2-23           lmtest_0.9-40              
+## [107] SingleCellExperiment_1.26.0 XVector_0.44.0             
+## [109] htmltools_0.5.8.1           dotCall64_1.1-1            
+## [111] scales_1.3.0                Biobase_2.64.0             
+## [113] png_0.1-8                   phyclust_0.1-34            
+## [115] spatstat.univar_3.0-1       knitr_1.48                 
+## [117] lambda.r_1.2.4              tzdb_0.4.0                 
+## [119] reshape2_1.4.4              coda_0.19-4.1              
+## [121] nlme_3.1-164                cachem_1.1.0               
+## [123] zoo_1.8-12                  stringr_1.5.1              
+## [125] KernSmooth_2.23-22          parallel_4.4.0             
+## [127] miniUI_0.1.1.1              libcoin_1.0-10             
+## [129] pillar_1.9.0                grid_4.4.0                 
+## [131] vctrs_0.6.5                 gplots_3.1.3.1             
+## [133] RANN_2.6.2                  promises_1.3.0             
+## [135] xtable_1.8-4                cluster_2.1.6              
+## [137] evaluate_1.0.0              readr_2.1.5                
+## [139] locfit_1.5-9.10             mvtnorm_1.3-1              
+## [141] cli_3.6.3                   compiler_4.4.0             
+## [143] futile.options_1.0.1        rlang_1.1.4                
+## [145] crayon_1.5.3                future.apply_1.11.2        
+## [147] labeling_0.4.3              argparse_2.2.3             
+## [149] plyr_1.8.9                  stringi_1.8.4              
+## [151] viridisLite_0.4.2           deldir_2.0-4               
+## [153] munsell_0.5.1               lazyeval_0.2.2             
+## [155] spatstat.geom_3.3-3         Matrix_1.7-0               
+## [157] RcppHNSW_0.6.0              hms_1.1.3                  
+## [159] patchwork_1.3.0             future_1.34.0              
+## [161] statmod_1.5.0               shiny_1.9.1                
+## [163] highr_0.11                  SummarizedExperiment_1.34.0
+## [165] ROCR_1.0-11                 igraph_2.0.3               
+## [167] RcppParallel_5.1.9          bslib_0.8.0                
+## [169] ape_5.8
+
+ + + + +
+ + + + + + + + + + + + + + + diff --git a/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/03_runCopyKat.R b/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/03_runCopyKat.R new file mode 100644 index 000000000..ed76beb48 --- /dev/null +++ b/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/03_runCopyKat.R @@ -0,0 +1,63 @@ +library(dplyr) +library(Seurat) +library(copykat) +library(ggplot2) + +path_repo <- rprojroot::find_root(rprojroot::is_git_root) +path_anal <- file.path(path_repo,"analyses","cell-type-wilms-tumor-14") + +library <- "SCPCL000850" + +# create output dirs +scratch_out_dir <- file.path(path_anal, "scratch", "03_cnv","copykat") +dir.create(scratch_out_dir, showWarnings = FALSE, recursive = TRUE) +library_out_dir <- file.path(scratch_out_dir, library) +dir.create(library_out_dir, showWarnings = FALSE, recursive = TRUE) + +# results_out_dir <- file.path(path_anal, "results", "03_cnv") +# dir.create(results_out_dir, showWarnings = FALSE, recursive = TRUE) +# plots_out_dir <- file.path(path_anal, "plots", "03_cnv") +# dir.create(results_out_dir, showWarnings = FALSE, recursive = TRUE) + + +# load pre-processed sample objs & anchor transfer results +obj <- SeuratObject::LoadSeuratRds( file.path(path_anal,"scratch","00_preprocessing_rds",paste0(library,".rdsSeurat")) ) +level <- "compartment" +predictions <- read.csv( file.path(path_anal, "results", "01_anchor_transfer_seurat", paste0(library, "_", level,".csv")) ) +obj <- AddMetaData(object = obj, metadata = predictions) + +# prepare copykat input matrix & normal cell list +count_mat <- SeuratObject::GetAssayData(obj, assay = "RNA", layer = "count") +normal_cells <- predictions %>% + tibble::column_to_rownames(var = "X") %>% + filter(predicted.id == "immune") + +# save copykat intermediate results by setting directory +setwd(library_out_dir) + +# run copykat with reference normal cells +copykat_result <- copykat( + rawmat = count_mat, + id.type = "E", + sam.name = library, + norm.cell.names = rownames(normal_cells), + ngene.chr = 2, + plot.genes = FALSE, + output.seg = FALSE, + n.cores = 8 +) +readr::write_rds(copykat_result, file = file.path(library_out_dir, paste0(library, "_copykat_resultobj.rds"))) + +# run copykat without normal cells +copykat_result_noref <- copykat( + rawmat = count_mat, + id.type = "E", + sam.name = paste0(library,"_noref"), + norm.cell.names = NULL, + ngene.chr = 2, + plot.genes = FALSE, + output.seg = FALSE, + n.cores = 8 +) +readr::write_rds(copykat_result_noref, file = file.path(library_out_dir, paste0(library, "_noref_copykat_resultobj.rds"))) + diff --git a/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/03_runInferCNV.R b/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/03_runInferCNV.R new file mode 100644 index 000000000..826ed578b --- /dev/null +++ b/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/03_runInferCNV.R @@ -0,0 +1,57 @@ +library(dplyr) +library(Seurat) +library(infercnv) +library(ggplot2) + +path_repo <- rprojroot::find_root(rprojroot::is_git_root) +path_anal <- file.path(path_repo,"analyses","cell-type-wilms-tumor-14") + +library <- "SCPCL000850" + +# create output dirs +scratch_out_dir <- file.path(path_anal, "scratch", "03_cnv","infercnv") +dir.create(scratch_out_dir, showWarnings = FALSE, recursive = TRUE) +library_out_dir <- file.path(scratch_out_dir, library) +dir.create(library_out_dir, showWarnings = FALSE, recursive = TRUE) + +# results_out_dir <- file.path(path_anal, "results", "03_cnv") +# dir.create(results_out_dir, showWarnings = FALSE, recursive = TRUE) +# plots_out_dir <- file.path(path_anal, "plots", "03_cnv") +# dir.create(results_out_dir, showWarnings = FALSE, recursive = TRUE) + + +# load pre-processed sample objs & anchor transfer results +obj <- SeuratObject::LoadSeuratRds( file.path(path_anal,"scratch","00_preprocessing_rds",paste0(library,".rdsSeurat")) ) +level <- "compartment" +predictions <- read.csv( file.path(path_anal, "results", "01_anchor_transfer_seurat", paste0(library, "_", level,".csv")) ) +obj <- AddMetaData(object = obj, metadata = predictions) + +# create annotation file for infercnv +annotation_file <- file.path(scratch_out_dir, paste0(library,"_annotations_file_infercnv.txt")) +# annotation_df <- data.frame(cell = obj$barcodes, cluster = obj$cluster) +annotation_df <- data.frame(cell = obj$barcodes, cluster = obj$predicted.id) +write.table(annotation_df, file = annotation_file, sep = "\t", quote = F, row.names = F, col.names = F) +# check gene order file, from infercnv ftp +gene_order_file <- file.path(scratch_out_dir,"Homo_sapiens.GRCh38.104.gene_order.txt") +gene_order <- read.table(file = gene_order_file) %>% + arrange(V2, V3) + +obj <- obj[rownames(obj) %in% gene_order$V1] +count_mat <- SeuratObject::GetAssayData(obj, assay = "RNA", layer = "count") + +infercnv_obj = CreateInfercnvObject(raw_counts_matrix=count_mat, + annotations_file=annotation_file, + delim="\t", + gene_order_file=gene_order_file, + ref_group_names="immune") + + +infercnv_out = infercnv::run(infercnv_obj, + cutoff = 0.1, # cutoff=1 works well for Smart-seq2, and cutoff=0.1 works well for 10x Genomics + out_dir = library_out_dir, + denoise = TRUE, + HMM = TRUE, + save_rds = FALSE, + num_threads = 8) + +readr::write_rds(infercnv_out, file = file.path(library_out_dir,"infercnv_out.rds")) \ No newline at end of file diff --git a/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/README.md b/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/README.md new file mode 100644 index 000000000..5b7f96377 --- /dev/null +++ b/analyses/cell-type-wilms-tumor-14/exploratory_analysis/03_cnv/README.md @@ -0,0 +1,34 @@ +## Exploratory analysis + +#### CNV analysis +The goal of this exploratory CNV analysis is to see if `CopyKat` and `inferCNV` can be useful methods for predicting tumor cells based on ploidy. This analysis uses the library `SCPCL000850` (sample `SCPCS000518`) to explore these methods. + +See below for details on how to run this exploratory CNV analysis. +- Note: Outputs from main pipeline step `00_preprocessing_rds` for library `SCPCL000850` are required to run the following analysis, see [scripts](https://github.com/AlexsLemonade/OpenScPCA-analysis/blob/main/analyses/cell-type-wilms-tumor-14/run_cell-type-wilms-14.sh) to run main pipeline. +```bash +# run this analysis from analysis module folder to make use of renv.lock +cd /path/to/OpenScPCA-analysis +cd analyses/cell-type-wilms-tumor-14/ + +# required for rendering Rmd files. +# This path exists on OpenScPCA Lightsail for Research instances, but you may need to specify a different path if running on a different platform, or run `rmarkdown::render` inside your rstudio session. +export RSTUDIO_PANDOC="/usr/lib/rstudio/resources/app/bin/quarto/bin/tools" + +## CopyKat +# generate CNV results using copykat +Rscript ./exploratory_analysis/03_cnv/03_runCopyKat.R +# render Rmd +Rscript -e "rmarkdown::render('./exploratory_analysis/03_cnv/03_copykat_SCPCL000850.Rmd')" + +## inferCNV +# generate inferCNV inputs +step_name="03_cnv" +scratch_dir_step="./scratch/${step_name}/infercnv" && mkdir -p ${scratch_dir_step} +Rscript ../cell-type-ewings/scripts/cnv-workflow/00-make-gene-order-file.R \ + --local_ref_dir ${scratch_dir_step} \ + --scratch_dir ${scratch_dir_step} +# run inferCNV (takes a while) +Rscript ./exploratory_analysis/03_cnv/03_runInferCNV.R +# render Rmd +Rscript -e "rmarkdown::render('./exploratory_analysis/03_cnv/03_infercnv_SCPCL000850.Rmd')" +``` \ No newline at end of file diff --git a/analyses/cell-type-wilms-tumor-14/exploratory_analysis/README.md b/analyses/cell-type-wilms-tumor-14/exploratory_analysis/README.md new file mode 100644 index 000000000..c1adcb2f2 --- /dev/null +++ b/analyses/cell-type-wilms-tumor-14/exploratory_analysis/README.md @@ -0,0 +1,4 @@ +## Exploratory analysis + +This folder includes scripts and notebooks for exploratory analysis. List of conducted analysis: +- `./03_cnv/`: CNV inference using `CopyKat` and `inferCNV`. \ No newline at end of file diff --git a/analyses/cell-type-wilms-tumor-14/renv.lock b/analyses/cell-type-wilms-tumor-14/renv.lock index a0e14bda8..1705449df 100644 --- a/analyses/cell-type-wilms-tumor-14/renv.lock +++ b/analyses/cell-type-wilms-tumor-14/renv.lock @@ -66,6 +66,20 @@ ], "Hash": "ef32d07aafdd12f24c5827374ae3590d" }, + "BiocIO": { + "Package": "BiocIO", + "Version": "1.14.0", + "Source": "Bioconductor", + "Repository": "Bioconductor 3.19", + "Requirements": [ + "BiocGenerics", + "R", + "S4Vectors", + "methods", + "tools" + ], + "Hash": "f97a7ef01d364cf20d1946d43a3d526f" + }, "BiocManager": { "Package": "BiocManager", "Version": "1.30.25", @@ -76,6 +90,25 @@ ], "Hash": "3aec5928ca10897d7a0a1205aae64627" }, + "BiocParallel": { + "Package": "BiocParallel", + "Version": "1.38.0", + "Source": "Bioconductor", + "Repository": "Bioconductor 3.19", + "Requirements": [ + "BH", + "R", + "codetools", + "cpp11", + "futile.logger", + "methods", + "parallel", + "snow", + "stats", + "utils" + ], + "Hash": "7b6e79f86e3d1c23f62c5e2052e848d4" + }, "BiocVersion": { "Package": "BiocVersion", "Version": "3.19.1", @@ -86,6 +119,26 @@ ], "Hash": "b892e27fc9659a4c8f8787d34c37b8b2" }, + "Biostrings": { + "Package": "Biostrings", + "Version": "2.72.1", + "Source": "Bioconductor", + "Repository": "Bioconductor 3.19", + "Requirements": [ + "BiocGenerics", + "GenomeInfoDb", + "IRanges", + "R", + "S4Vectors", + "XVector", + "crayon", + "grDevices", + "methods", + "stats", + "utils" + ], + "Hash": "886ff0ed958d6f839ed2e0d01f6853b3" + }, "DelayedArray": { "Package": "DelayedArray", "Version": "0.30.1", @@ -154,6 +207,28 @@ ], "Hash": "c3c792a7b7f2677be56e8632c5b7543d" }, + "GenomicAlignments": { + "Package": "GenomicAlignments", + "Version": "1.40.0", + "Source": "Bioconductor", + "Repository": "Bioconductor 3.19", + "Requirements": [ + "BiocGenerics", + "BiocParallel", + "Biostrings", + "GenomeInfoDb", + "GenomicRanges", + "IRanges", + "R", + "Rsamtools", + "S4Vectors", + "SummarizedExperiment", + "methods", + "stats", + "utils" + ], + "Hash": "e539709764587c581b31e446dc84d7b8" + }, "GenomicRanges": { "Package": "GenomicRanges", "Version": "1.56.1", @@ -173,6 +248,13 @@ ], "Hash": "a3c822ef3c124828e25e7a9611beeb50" }, + "HiddenMarkov": { + "Package": "HiddenMarkov", + "Version": "1.8-13", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "26d4e106f5429773167ccf8f55581cdd" + }, "IRanges": { "Package": "IRanges", "Version": "2.38.1", @@ -215,6 +297,26 @@ ], "Hash": "2f342c46163b0b54d7b64d1f798e2c78" }, + "MCMCpack": { + "Package": "MCMCpack", + "Version": "1.7-1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "MASS", + "R", + "coda", + "grDevices", + "graphics", + "lattice", + "mcmc", + "methods", + "quantreg", + "stats", + "utils" + ], + "Hash": "8e69ecc7ebf5e5113e89e1bf607c26bc" + }, "Matrix": { "Package": "Matrix", "Version": "1.7-0", @@ -300,6 +402,18 @@ ], "Hash": "45f0398006e83a5b10b72a90663d8d8c" }, + "RCurl": { + "Package": "RCurl", + "Version": "1.98-1.16", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "bitops", + "methods" + ], + "Hash": "ddbdf53d15b47be4407ede6914f56fbb" + }, "ROCR": { "Package": "ROCR", "Version": "1.0-11", @@ -389,6 +503,16 @@ ], "Hash": "1f2dc32c27746a35196aaf95adb357be" }, + "RcppParallel": { + "Package": "RcppParallel", + "Version": "5.1.9", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "f38a72a419b91faac0ce5d9eee04c120" + }, "RcppProgress": { "Package": "RcppProgress", "Version": "0.4.2", @@ -414,6 +538,41 @@ "Repository": "RSPM", "Hash": "c966ea2957ff75e77afa5c908dfc89e1" }, + "Rhtslib": { + "Package": "Rhtslib", + "Version": "3.0.0", + "Source": "Bioconductor", + "Repository": "Bioconductor 3.19", + "Requirements": [ + "tools", + "zlibbioc" + ], + "Hash": "5d6514cd44a0106581e3310f3972a82e" + }, + "Rsamtools": { + "Package": "Rsamtools", + "Version": "2.20.0", + "Source": "Bioconductor", + "Repository": "Bioconductor 3.19", + "Requirements": [ + "BiocGenerics", + "BiocParallel", + "Biostrings", + "GenomeInfoDb", + "GenomicRanges", + "IRanges", + "R", + "Rhtslib", + "S4Vectors", + "XVector", + "bitops", + "methods", + "stats", + "utils", + "zlibbioc" + ], + "Hash": "9762f24dcbdbd1626173c516bb64792c" + }, "Rtsne": { "Package": "Rtsne", "Version": "0.17", @@ -628,6 +787,18 @@ ], "Hash": "2f6c8cc972ed6aee07c96e3dff729d15" }, + "TH.data": { + "Package": "TH.data", + "Version": "1.1-2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "MASS", + "R", + "survival" + ], + "Hash": "5b250ad4c5863ee4a68e280fcb0a3600" + }, "UCSC.utils": { "Package": "UCSC.utils", "Version": "1.0.0", @@ -642,6 +813,18 @@ ], "Hash": "83d45b690bffd09d1980c224ef329f5b" }, + "XML": { + "Package": "XML", + "Version": "3.99-0.17", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "methods", + "utils" + ], + "Hash": "bc2a8a1139d8d4bd9c46086708945124" + }, "XVector": { "Package": "XVector", "Version": "0.44.0", @@ -671,6 +854,38 @@ ], "Hash": "2288423bb0f20a457800d7fc47f6aa54" }, + "ape": { + "Package": "ape", + "Version": "5.8", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "Rcpp", + "digest", + "graphics", + "lattice", + "methods", + "nlme", + "parallel", + "stats", + "utils" + ], + "Hash": "16b5ff4dff0ead9ea955f62f794b1535" + }, + "argparse": { + "Package": "argparse", + "Version": "2.2.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "findpython", + "jsonlite" + ], + "Hash": "e575af52e22a8e91174473809cfe107d" + }, "askpass": { "Package": "askpass", "Version": "1.2.0", @@ -729,6 +944,30 @@ ], "Hash": "39d6ecdea862d961c3dfe4d4d7c57920" }, + "bit": { + "Package": "bit", + "Version": "4.5.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "5dc7b2677d65d0e874fc4aaf0e879987" + }, + "bit64": { + "Package": "bit64", + "Version": "4.5.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "bit", + "methods", + "stats", + "utils" + ], + "Hash": "e84984bf5f12a18628d9a02322128dfd" + }, "bitops": { "Package": "bitops", "Version": "1.0-8", @@ -857,6 +1096,16 @@ ], "Hash": "b21916dd77a27642b447374a5d30ecf3" }, + "clipr": { + "Package": "clipr", + "Version": "0.8.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "utils" + ], + "Hash": "3f038e5ac7f41d4ac41ce658c85e3042" + }, "cluster": { "Package": "cluster", "Version": "2.1.6", @@ -871,6 +1120,17 @@ ], "Hash": "0aaa05204035dc43ea0004b9c76611dd" }, + "coda": { + "Package": "coda", + "Version": "0.19-4.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "lattice" + ], + "Hash": "af436915c590afc6fffc3ce3a5be1569" + }, "codetools": { "Package": "codetools", "Version": "0.2-20", @@ -881,6 +1141,27 @@ ], "Hash": "61e097f35917d342622f21cdc79c256e" }, + "coin": { + "Package": "coin", + "Version": "1.4-3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "libcoin", + "matrixStats", + "methods", + "modeltools", + "multcomp", + "mvtnorm", + "parallel", + "stats", + "stats4", + "survival", + "utils" + ], + "Hash": "4084b5070a40ad99dad581ed3b67bd55" + }, "colorspace": { "Package": "colorspace", "Version": "2.1-1", @@ -902,6 +1183,29 @@ "Repository": "CRAN", "Hash": "5d8225445acb167abf7797de48b2ee3c" }, + "copykat": { + "Package": "copykat", + "Version": "1.1.0", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteRepo": "copykat", + "RemoteUsername": "navinlabcode", + "RemoteRef": "HEAD", + "RemoteSha": "d7d6569ae9e30bf774908301af312f626de4cbd5", + "Requirements": [ + "MCMCpack", + "R", + "RColorBrewer", + "cluster", + "dlm", + "gplots", + "mixtools", + "parallel", + "parallelDist" + ], + "Hash": "e356046a6ab19635791f7ce46ecd5991" + }, "corrplot": { "Package": "corrplot", "Version": "0.94", @@ -1016,6 +1320,20 @@ ], "Hash": "41bd784b988874bccef2d4df2a69fd1a" }, + "dlm": { + "Package": "dlm", + "Version": "1.1-6.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "grDevices", + "graphics", + "methods", + "stats", + "utils" + ], + "Hash": "9f673cbcf481e0f89883217d2a82ff7c" + }, "doBy": { "Package": "doBy", "Version": "4.6.22", @@ -1040,6 +1358,20 @@ ], "Hash": "a9b56885b9596c284168df26d6179c40" }, + "doParallel": { + "Package": "doParallel", + "Version": "1.0.17", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "foreach", + "iterators", + "parallel", + "utils" + ], + "Hash": "451e5edf411987991ab6a5410c45011f" + }, "dotCall64": { "Package": "dotCall64", "Version": "1.1-1", @@ -1086,6 +1418,23 @@ ], "Hash": "6d7b942d8f615705f89a7883998fc839" }, + "edgeR": { + "Package": "edgeR", + "Version": "4.2.1", + "Source": "Bioconductor", + "Repository": "Bioconductor 3.19", + "Requirements": [ + "R", + "Rcpp", + "graphics", + "limma", + "locfit", + "methods", + "stats", + "utils" + ], + "Hash": "729daec53b663926458ccde421f5c2fb" + }, "evaluate": { "Package": "evaluate", "Version": "1.0.0", @@ -1128,6 +1477,16 @@ ], "Hash": "dc256683a45e31f9dc553440b909f198" }, + "fastcluster": { + "Package": "fastcluster", + "Version": "1.2.6", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "2ed9ecb93023f39a449726ed4d43dff8" + }, "fastmap": { "Package": "fastmap", "Version": "1.2.0", @@ -1145,6 +1504,13 @@ ], "Hash": "192053c276525c8495ccfd523aa8f2d1" }, + "findpython": { + "Package": "findpython", + "Version": "1.0.8", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "8f9aa3ce842296afaad4083b839481a1" + }, "fitdistrplus": { "Package": "fitdistrplus", "Version": "1.2-1", @@ -1173,6 +1539,29 @@ ], "Hash": "c2efdd5f0bcd1ea861c2d4e2a883a67d" }, + "foreach": { + "Package": "foreach", + "Version": "1.5.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "codetools", + "iterators", + "utils" + ], + "Hash": "618609b42c9406731ead03adf5379850" + }, + "formatR": { + "Package": "formatR", + "Version": "1.14", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "63cb26d12517c7863f5abb006c5e0f25" + }, "fs": { "Package": "fs", "Version": "1.6.4", @@ -1184,6 +1573,29 @@ ], "Hash": "15aeb8c27f5ea5161f9f6a641fafd93a" }, + "futile.logger": { + "Package": "futile.logger", + "Version": "1.4.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "futile.options", + "lambda.r", + "utils" + ], + "Hash": "99f0ace8c05ec7d3683d27083c4f1e7e" + }, + "futile.options": { + "Package": "futile.options", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "0d9bf02413ddc2bbe8da9ce369dcdd2b" + }, "future": { "Package": "future", "Version": "1.34.0", @@ -1472,6 +1884,20 @@ ], "Hash": "d65ba49117ca223614f71b60d85b8ab7" }, + "hms": { + "Package": "hms", + "Version": "1.1.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "lifecycle", + "methods", + "pkgconfig", + "rlang", + "vctrs" + ], + "Hash": "b59377caa7ed00fa41808342002138f9" + }, "htmltools": { "Package": "htmltools", "Version": "0.5.8.1", @@ -1563,6 +1989,53 @@ ], "Hash": "c3b7d801d722e26e4cd888e042bf9af5" }, + "infercnv": { + "Package": "infercnv", + "Version": "1.20.0", + "Source": "Bioconductor", + "Repository": "Bioconductor 3.19", + "Requirements": [ + "BiocGenerics", + "HiddenMarkov", + "Matrix", + "R", + "RANN", + "RColorBrewer", + "Seurat", + "SingleCellExperiment", + "SummarizedExperiment", + "ape", + "argparse", + "caTools", + "coda", + "coin", + "digest", + "doParallel", + "dplyr", + "edgeR", + "fastcluster", + "fitdistrplus", + "foreach", + "futile.logger", + "future", + "ggplot2", + "gplots", + "grDevices", + "graphics", + "gridExtra", + "igraph", + "methods", + "parallel", + "parallelDist", + "phyclust", + "reshape2", + "rjags", + "stats", + "tidyr", + "utils" + ], + "Hash": "eaf21e1aab39c0b466304b316cc8d031" + }, "irlba": { "Package": "irlba", "Version": "2.3.5.1", @@ -1587,6 +2060,17 @@ ], "Hash": "0080607b4a1a7b28979aecef976d8bc2" }, + "iterators": { + "Package": "iterators", + "Version": "1.0.14", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "utils" + ], + "Hash": "8954069286b4b2b0d023d1b288dce978" + }, "jquerylib": { "Package": "jquerylib", "Version": "0.1.4", @@ -1607,6 +2091,20 @@ ], "Hash": "4e993b65c2c3ffbffce7bb3e2c6f832b" }, + "kernlab": { + "Package": "kernlab", + "Version": "0.9-33", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "grDevices", + "graphics", + "methods", + "stats" + ], + "Hash": "97d266249d6c3b4f40e34e1ceaf9c558" + }, "knitr": { "Package": "knitr", "Version": "1.48", @@ -1634,6 +2132,17 @@ ], "Hash": "b64ec208ac5bc1852b285f665d6368b3" }, + "lambda.r": { + "Package": "lambda.r", + "Version": "1.2.4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "formatR" + ], + "Hash": "b1e925c4b9ffeb901bacf812cbe9a6ad" + }, "later": { "Package": "later", "Version": "1.3.2", @@ -1683,6 +2192,18 @@ ], "Hash": "b21c4ae2bb7935504c42bcdf749c04e6" }, + "libcoin": { + "Package": "libcoin", + "Version": "1.0-10", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "mvtnorm", + "stats" + ], + "Hash": "3f3775a14588ff5d013e5eab4453bf28" + }, "lifecycle": { "Package": "lifecycle", "Version": "1.0.4", @@ -1696,6 +2217,22 @@ ], "Hash": "b8552d117e1b808b09a832f589b79035" }, + "limma": { + "Package": "limma", + "Version": "3.60.4", + "Source": "Bioconductor", + "Repository": "Bioconductor 3.19", + "Requirements": [ + "R", + "grDevices", + "graphics", + "methods", + "statmod", + "stats", + "utils" + ], + "Hash": "b75950d7143715041064b21f3120f19e" + }, "listenv": { "Package": "listenv", "Version": "0.9.1", @@ -1745,6 +2282,17 @@ ], "Hash": "c6fafa6cccb1e1dfe7f7d122efd6e6a7" }, + "locfit": { + "Package": "locfit", + "Version": "1.5-9.10", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "lattice" + ], + "Hash": "7d8e0ac914051ca0254332387d9b5816" + }, "magrittr": { "Package": "magrittr", "Version": "2.0.3", @@ -1765,6 +2313,17 @@ ], "Hash": "8885ffb1f46e820dede6b2ca9442abca" }, + "mcmc": { + "Package": "mcmc", + "Version": "0.9-8", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "stats" + ], + "Hash": "d96d8fc4c4682220c601d294d2bc387e" + }, "memoise": { "Package": "memoise", "Version": "2.0.1", @@ -1837,6 +2396,23 @@ ], "Hash": "785ef8e22389d4a7634c6c944f2dc07d" }, + "mixtools": { + "Package": "mixtools", + "Version": "2.0.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "MASS", + "R", + "kernlab", + "plotly", + "scales", + "segmented", + "stats", + "survival" + ], + "Hash": "2b9414057d7f3725130e2f743ea05a2f" + }, "modelr": { "Package": "modelr", "Version": "0.1.11", @@ -1855,6 +2431,34 @@ ], "Hash": "4f50122dc256b1b6996a4703fecea821" }, + "modeltools": { + "Package": "modeltools", + "Version": "0.2-23", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "methods", + "stats", + "stats4" + ], + "Hash": "f5a957c02222589bdf625a67be68b2a9" + }, + "multcomp": { + "Package": "multcomp", + "Version": "1.4-26", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "TH.data", + "codetools", + "graphics", + "mvtnorm", + "sandwich", + "stats", + "survival" + ], + "Hash": "ec6f951a557132215fab91912acdd9ef" + }, "munsell": { "Package": "munsell", "Version": "0.5.1", @@ -1866,6 +2470,17 @@ ], "Hash": "4fd8900853b746af55b81fda99da7695" }, + "mvtnorm": { + "Package": "mvtnorm", + "Version": "1.3-1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "stats" + ], + "Hash": "77c61d51ce0f36e3c1a76e6b295aab31" + }, "nlme": { "Package": "nlme", "Version": "3.1-164", @@ -1931,6 +2546,19 @@ ], "Hash": "ce5f8381cd2c38d1fc14c83d8b21efd0" }, + "parallelDist": { + "Package": "parallelDist", + "Version": "0.2.6", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "Rcpp", + "RcppArmadillo", + "RcppParallel" + ], + "Hash": "3141cdd4fa667a29965fc9b6d6dbba42" + }, "parallelly": { "Package": "parallelly", "Version": "1.38.0", @@ -1991,6 +2619,17 @@ ], "Hash": "938e6bbc4ac57534f8b43224506a8966" }, + "phyclust": { + "Package": "phyclust", + "Version": "0.1-34", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "ape" + ], + "Hash": "18a29354ea762dd01042d8697b7089d4" + }, "pillar": { "Package": "pillar", "Version": "1.9.0", @@ -2092,6 +2731,30 @@ ], "Hash": "ceb5c2a59ba33d42d051285a3e8a5118" }, + "prettyunits": { + "Package": "prettyunits", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "6b01fc98b1e86c4f705ce9dcfd2f57c7" + }, + "progress": { + "Package": "progress", + "Version": "1.2.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "crayon", + "hms", + "prettyunits" + ], + "Hash": "f4625e061cb2865f111b47ff163a5ca6" + }, "progressr": { "Package": "progressr", "Version": "0.14.0", @@ -2163,6 +2826,29 @@ ], "Hash": "5e3c5dc0b071b21fa128676560dbe94d" }, + "readr": { + "Package": "readr", + "Version": "2.1.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "cli", + "clipr", + "cpp11", + "crayon", + "hms", + "lifecycle", + "methods", + "rlang", + "tibble", + "tzdb", + "utils", + "vroom" + ], + "Hash": "9de96463d2117f6ac49980577939dfb3" + }, "renv": { "Package": "renv", "Version": "1.0.7", @@ -2186,6 +2872,22 @@ ], "Hash": "bb5996d0bd962d214a11140d77589917" }, + "restfulr": { + "Package": "restfulr", + "Version": "0.0.15", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "RCurl", + "S4Vectors", + "XML", + "methods", + "rjson", + "yaml" + ], + "Hash": "44651c1e68eda9d462610aca9f15a815" + }, "reticulate": { "Package": "reticulate", "Version": "1.39.0", @@ -2208,6 +2910,27 @@ ], "Hash": "e1a5d04397edc1580c5e0ed1dbdccf76" }, + "rjags": { + "Package": "rjags", + "Version": "4-16", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "coda" + ], + "Hash": "a36ff5b8df160527e29037be8e1cdf7d" + }, + "rjson": { + "Package": "rjson", + "Version": "0.2.23", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "7a04e9eff95857dbf557b4e5f0b3d1a8" + }, "rlang": { "Package": "rlang", "Version": "1.1.4", @@ -2275,6 +2998,46 @@ ], "Hash": "5045fbb71b143878d8c51975d1d7d56d" }, + "rtracklayer": { + "Package": "rtracklayer", + "Version": "1.64.0", + "Source": "Bioconductor", + "Repository": "Bioconductor 3.19", + "Requirements": [ + "BiocGenerics", + "BiocIO", + "Biostrings", + "GenomeInfoDb", + "GenomicAlignments", + "GenomicRanges", + "IRanges", + "R", + "Rsamtools", + "S4Vectors", + "XML", + "XVector", + "curl", + "httr", + "methods", + "restfulr", + "tools", + "zlibbioc" + ], + "Hash": "3d6f004fce582bd7d68e2e18d44abbc1" + }, + "sandwich": { + "Package": "sandwich", + "Version": "3.1-1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "stats", + "utils", + "zoo" + ], + "Hash": "072bb2d27425f2a58fe71fe1080676ce" + }, "sass": { "Package": "sass", "Version": "0.4.9", @@ -2360,6 +3123,18 @@ ], "Hash": "0242402f321be0246fb67cf8c63b3572" }, + "segmented": { + "Package": "segmented", + "Version": "2.1-2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "MASS", + "R", + "nlme" + ], + "Hash": "afe75243aae06289eb4c1f4cb25aa702" + }, "shiny": { "Package": "shiny", "Version": "1.9.1", @@ -2404,6 +3179,17 @@ ], "Hash": "c956d93f6768a9789edbc13072b70c78" }, + "snow": { + "Package": "snow", + "Version": "0.4-4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "utils" + ], + "Hash": "40b74690debd20c57d93d8c246b305d4" + }, "sourcetools": { "Package": "sourcetools", "Version": "0.1.7-1", @@ -2564,6 +3350,18 @@ ], "Hash": "d580c24751e31aae523216b214a008dd" }, + "statmod": { + "Package": "statmod", + "Version": "1.5.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "graphics", + "stats" + ], + "Hash": "26e158d12052c279bdd4ba858b80fb1f" + }, "stringi": { "Package": "stringi", "Version": "1.8.4", @@ -2692,6 +3490,17 @@ ], "Hash": "9db859e8aabbb474293dde3097839420" }, + "tzdb": { + "Package": "tzdb", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cpp11" + ], + "Hash": "f561504ec2897f4d46f0c7657e488ae1" + }, "utf8": { "Package": "utf8", "Version": "1.2.4", @@ -2744,6 +3553,32 @@ ], "Hash": "c826c7c4241b6fc89ff55aaea3fa7491" }, + "vroom": { + "Package": "vroom", + "Version": "1.6.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "bit64", + "cli", + "cpp11", + "crayon", + "glue", + "hms", + "lifecycle", + "methods", + "progress", + "rlang", + "stats", + "tibble", + "tidyselect", + "tzdb", + "vctrs", + "withr" + ], + "Hash": "390f9315bc0025be03012054103d227c" + }, "withr": { "Package": "withr", "Version": "3.0.1",