diff --git a/data/cellchat/CellChatDB.csv b/CellChatDB.csv similarity index 100% rename from data/cellchat/CellChatDB.csv rename to CellChatDB.csv diff --git a/data/differential-expression/DEgenes_MtvsWt_2mo_6celltypes.rds b/DEgenes_MtvsWt_2mo_6celltypes.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_2mo_6celltypes.rds rename to DEgenes_MtvsWt_2mo_6celltypes.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_2mo_other8celltypes.rds b/DEgenes_MtvsWt_2mo_other8celltypes.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_2mo_other8celltypes.rds rename to DEgenes_MtvsWt_2mo_other8celltypes.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_4mo_allcelltypes.rds b/DEgenes_MtvsWt_4mo_allcelltypes.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_4mo_allcelltypes.rds rename to DEgenes_MtvsWt_4mo_allcelltypes.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_6mo_6celltypes.rds b/DEgenes_MtvsWt_6mo_6celltypes.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_6mo_6celltypes.rds rename to DEgenes_MtvsWt_6mo_6celltypes.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_6mo_other8celltypes.rds b/DEgenes_MtvsWt_6mo_other8celltypes.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_6mo_other8celltypes.rds rename to DEgenes_MtvsWt_6mo_other8celltypes.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_Ast_2mo.rds b/DEgenes_MtvsWt_Ast_2mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_Ast_2mo.rds rename to DEgenes_MtvsWt_Ast_2mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_Ast_6mo.rds b/DEgenes_MtvsWt_Ast_6mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_Ast_6mo.rds rename to DEgenes_MtvsWt_Ast_6mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_ExDp1_2mo.rds b/DEgenes_MtvsWt_ExDp1_2mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_ExDp1_2mo.rds rename to DEgenes_MtvsWt_ExDp1_2mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_ExDp1_6mo.rds b/DEgenes_MtvsWt_ExDp1_6mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_ExDp1_6mo.rds rename to DEgenes_MtvsWt_ExDp1_6mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_ExDp2_2mo.rds b/DEgenes_MtvsWt_ExDp2_2mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_ExDp2_2mo.rds rename to DEgenes_MtvsWt_ExDp2_2mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_ExDp2_6mo.rds b/DEgenes_MtvsWt_ExDp2_6mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_ExDp2_6mo.rds rename to DEgenes_MtvsWt_ExDp2_6mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_ExM-U_2mo.rds b/DEgenes_MtvsWt_ExM-U_2mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_ExM-U_2mo.rds rename to DEgenes_MtvsWt_ExM-U_2mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_ExM-U_6mo.rds b/DEgenes_MtvsWt_ExM-U_6mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_ExM-U_6mo.rds rename to DEgenes_MtvsWt_ExM-U_6mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_ExM_2mo.rds b/DEgenes_MtvsWt_ExM_2mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_ExM_2mo.rds rename to DEgenes_MtvsWt_ExM_2mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_ExM_6mo.rds b/DEgenes_MtvsWt_ExM_6mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_ExM_6mo.rds rename to DEgenes_MtvsWt_ExM_6mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_ExN_2mo.rds b/DEgenes_MtvsWt_ExN_2mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_ExN_2mo.rds rename to DEgenes_MtvsWt_ExN_2mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_ExN_6mo.rds b/DEgenes_MtvsWt_ExN_6mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_ExN_6mo.rds rename to DEgenes_MtvsWt_ExN_6mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_IP_2mo.rds b/DEgenes_MtvsWt_IP_2mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_IP_2mo.rds rename to DEgenes_MtvsWt_IP_2mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_IP_6mo.rds b/DEgenes_MtvsWt_IP_6mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_IP_6mo.rds rename to DEgenes_MtvsWt_IP_6mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_InCGE_2mo.rds b/DEgenes_MtvsWt_InCGE_2mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_InCGE_2mo.rds rename to DEgenes_MtvsWt_InCGE_2mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_InCGE_6mo.rds b/DEgenes_MtvsWt_InCGE_6mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_InCGE_6mo.rds rename to DEgenes_MtvsWt_InCGE_6mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_InMGE_2mo.rds b/DEgenes_MtvsWt_InMGE_2mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_InMGE_2mo.rds rename to DEgenes_MtvsWt_InMGE_2mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_InMGE_6mo.rds b/DEgenes_MtvsWt_InMGE_6mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_InMGE_6mo.rds rename to DEgenes_MtvsWt_InMGE_6mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_OPC_2mo.rds b/DEgenes_MtvsWt_OPC_2mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_OPC_2mo.rds rename to DEgenes_MtvsWt_OPC_2mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_OPC_6mo.rds b/DEgenes_MtvsWt_OPC_6mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_OPC_6mo.rds rename to DEgenes_MtvsWt_OPC_6mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_PgG2M_2mo.rds b/DEgenes_MtvsWt_PgG2M_2mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_PgG2M_2mo.rds rename to DEgenes_MtvsWt_PgG2M_2mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_PgG2M_6mo.rds b/DEgenes_MtvsWt_PgG2M_6mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_PgG2M_6mo.rds rename to DEgenes_MtvsWt_PgG2M_6mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_PgS_2mo.rds b/DEgenes_MtvsWt_PgS_2mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_PgS_2mo.rds rename to DEgenes_MtvsWt_PgS_2mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_PgS_6mo.rds b/DEgenes_MtvsWt_PgS_6mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_PgS_6mo.rds rename to DEgenes_MtvsWt_PgS_6mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_alltimepts_allcelltypes.csv b/DEgenes_MtvsWt_alltimepts_allcelltypes.csv similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_alltimepts_allcelltypes.csv rename to DEgenes_MtvsWt_alltimepts_allcelltypes.csv diff --git a/data/differential-expression/DEgenes_MtvsWt_oRG_2mo.rds b/DEgenes_MtvsWt_oRG_2mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_oRG_2mo.rds rename to DEgenes_MtvsWt_oRG_2mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_oRG_6mo.rds b/DEgenes_MtvsWt_oRG_6mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_oRG_6mo.rds rename to DEgenes_MtvsWt_oRG_6mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_vRG_2mo.rds b/DEgenes_MtvsWt_vRG_2mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_vRG_2mo.rds rename to DEgenes_MtvsWt_vRG_2mo.rds diff --git a/data/differential-expression/DEgenes_MtvsWt_vRG_6mo.rds b/DEgenes_MtvsWt_vRG_6mo.rds similarity index 100% rename from data/differential-expression/DEgenes_MtvsWt_vRG_6mo.rds rename to DEgenes_MtvsWt_vRG_6mo.rds diff --git a/data/overall-distributions/FetchDataOutput-AllCells.rds b/FetchDataOutput-AllCells.rds similarity index 100% rename from data/overall-distributions/FetchDataOutput-AllCells.rds rename to FetchDataOutput-AllCells.rds diff --git a/data/raw/FinalMergedData-downsampled.rds b/FinalMergedData-downsampled.rds similarity index 100% rename from data/raw/FinalMergedData-downsampled.rds rename to FinalMergedData-downsampled.rds diff --git a/data/raw/FinalMergedData_linesG6A02-G6E11_all_timepts.rds b/FinalMergedData_linesG6A02-G6E11_all_timepts.rds similarity index 100% rename from data/raw/FinalMergedData_linesG6A02-G6E11_all_timepts.rds rename to FinalMergedData_linesG6A02-G6E11_all_timepts.rds diff --git a/R/plot_generation.R b/R/plot_generation.R deleted file mode 100644 index e69de29..0000000 diff --git a/R/utilities.R b/R/utilities.R deleted file mode 100644 index e69de29..0000000 diff --git a/data/cell-group-gene-enrichment/REVIGO_reducedTerms_Ast.rds b/REVIGO_reducedTerms_Ast.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_reducedTerms_Ast.rds rename to REVIGO_reducedTerms_Ast.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_reducedTerms_Astrocytes.rds b/REVIGO_reducedTerms_Astrocytes.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_reducedTerms_Astrocytes.rds rename to REVIGO_reducedTerms_Astrocytes.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_reducedTerms_ExDp1.rds b/REVIGO_reducedTerms_ExDp1.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_reducedTerms_ExDp1.rds rename to REVIGO_reducedTerms_ExDp1.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_reducedTerms_ExDp2.rds b/REVIGO_reducedTerms_ExDp2.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_reducedTerms_ExDp2.rds rename to REVIGO_reducedTerms_ExDp2.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_reducedTerms_ExM.rds b/REVIGO_reducedTerms_ExM.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_reducedTerms_ExM.rds rename to REVIGO_reducedTerms_ExM.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_reducedTerms_ExN.rds b/REVIGO_reducedTerms_ExN.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_reducedTerms_ExN.rds rename to REVIGO_reducedTerms_ExN.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_reducedTerms_IP.rds b/REVIGO_reducedTerms_IP.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_reducedTerms_IP.rds rename to REVIGO_reducedTerms_IP.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_reducedTerms_InCGE.rds b/REVIGO_reducedTerms_InCGE.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_reducedTerms_InCGE.rds rename to REVIGO_reducedTerms_InCGE.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_reducedTerms_InMGE.rds b/REVIGO_reducedTerms_InMGE.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_reducedTerms_InMGE.rds rename to REVIGO_reducedTerms_InMGE.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_reducedTerms_OPC.rds b/REVIGO_reducedTerms_OPC.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_reducedTerms_OPC.rds rename to REVIGO_reducedTerms_OPC.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_reducedTerms_PgG2M.rds b/REVIGO_reducedTerms_PgG2M.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_reducedTerms_PgG2M.rds rename to REVIGO_reducedTerms_PgG2M.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_reducedTerms_PgS.rds b/REVIGO_reducedTerms_PgS.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_reducedTerms_PgS.rds rename to REVIGO_reducedTerms_PgS.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_reducedTerms_oRG.rds b/REVIGO_reducedTerms_oRG.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_reducedTerms_oRG.rds rename to REVIGO_reducedTerms_oRG.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_reducedTerms_vRG.rds b/REVIGO_reducedTerms_vRG.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_reducedTerms_vRG.rds rename to REVIGO_reducedTerms_vRG.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_simMatrix_Ast.rds b/REVIGO_simMatrix_Ast.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_simMatrix_Ast.rds rename to REVIGO_simMatrix_Ast.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_simMatrix_Astrocytes.rds b/REVIGO_simMatrix_Astrocytes.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_simMatrix_Astrocytes.rds rename to REVIGO_simMatrix_Astrocytes.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_simMatrix_ExDp1.rds b/REVIGO_simMatrix_ExDp1.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_simMatrix_ExDp1.rds rename to REVIGO_simMatrix_ExDp1.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_simMatrix_ExDp2.rds b/REVIGO_simMatrix_ExDp2.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_simMatrix_ExDp2.rds rename to REVIGO_simMatrix_ExDp2.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_simMatrix_ExM.rds b/REVIGO_simMatrix_ExM.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_simMatrix_ExM.rds rename to REVIGO_simMatrix_ExM.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_simMatrix_ExN.rds b/REVIGO_simMatrix_ExN.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_simMatrix_ExN.rds rename to REVIGO_simMatrix_ExN.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_simMatrix_IP.rds b/REVIGO_simMatrix_IP.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_simMatrix_IP.rds rename to REVIGO_simMatrix_IP.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_simMatrix_InCGE.rds b/REVIGO_simMatrix_InCGE.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_simMatrix_InCGE.rds rename to REVIGO_simMatrix_InCGE.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_simMatrix_InMGE.rds b/REVIGO_simMatrix_InMGE.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_simMatrix_InMGE.rds rename to REVIGO_simMatrix_InMGE.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_simMatrix_OPC.rds b/REVIGO_simMatrix_OPC.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_simMatrix_OPC.rds rename to REVIGO_simMatrix_OPC.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_simMatrix_PgG2M.rds b/REVIGO_simMatrix_PgG2M.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_simMatrix_PgG2M.rds rename to REVIGO_simMatrix_PgG2M.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_simMatrix_PgS.rds b/REVIGO_simMatrix_PgS.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_simMatrix_PgS.rds rename to REVIGO_simMatrix_PgS.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_simMatrix_oRG.rds b/REVIGO_simMatrix_oRG.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_simMatrix_oRG.rds rename to REVIGO_simMatrix_oRG.rds diff --git a/data/cell-group-gene-enrichment/REVIGO_simMatrix_vRG.rds b/REVIGO_simMatrix_vRG.rds similarity index 100% rename from data/cell-group-gene-enrichment/REVIGO_simMatrix_vRG.rds rename to REVIGO_simMatrix_vRG.rds diff --git a/data/cellchat/adjacency_matrix_2m.csv b/adjacency_matrix_2m.csv similarity index 100% rename from data/cellchat/adjacency_matrix_2m.csv rename to adjacency_matrix_2m.csv diff --git a/data/cellchat/adjacency_matrix_2v.csv b/adjacency_matrix_2v.csv similarity index 100% rename from data/cellchat/adjacency_matrix_2v.csv rename to adjacency_matrix_2v.csv diff --git a/data/cellchat/adjacency_matrix_4m.csv b/adjacency_matrix_4m.csv similarity index 100% rename from data/cellchat/adjacency_matrix_4m.csv rename to adjacency_matrix_4m.csv diff --git a/data/cellchat/adjacency_matrix_4v.csv b/adjacency_matrix_4v.csv similarity index 100% rename from data/cellchat/adjacency_matrix_4v.csv rename to adjacency_matrix_4v.csv diff --git a/data/cellchat/adjacency_matrix_6m.csv b/adjacency_matrix_6m.csv similarity index 100% rename from data/cellchat/adjacency_matrix_6m.csv rename to adjacency_matrix_6m.csv diff --git a/data/cellchat/adjacency_matrix_6v.csv b/adjacency_matrix_6v.csv similarity index 100% rename from data/cellchat/adjacency_matrix_6v.csv rename to adjacency_matrix_6v.csv diff --git a/app.R b/app.R index fb13c35..4afe8bb 100755 --- a/app.R +++ b/app.R @@ -333,19 +333,19 @@ DotPlot_mod <- function( # full dataset for all other app features -seurat.all <- readRDS("data/raw/FinalMergedData-downsampled.rds") +seurat.all <- readRDS("FinalMergedData-downsampled.rds") # Switch active identities to cell type labels for plotting Idents(seurat.all) <- "CellType" # Data for main panel 1 bar graph -celltype_data_with_codes <- readRDS("data/overall-distributions/FetchDataOutput-AllCells.rds") %>% relocate(CellType) -celltype_props <- readRDS("data/overall-distributions/overall_celltype_props_data.rds") +celltype_data_with_codes <- readRDS("FetchDataOutput-AllCells.rds") %>% relocate(CellType) +celltype_props <- readRDS("overall_celltype_props_data.rds") # Average expression data for Gene Explorer Tab 2 line plots -res_combined_ann <- readRDS("data/genewise-avgexp-percentexp/average_expression_allcelltypes_timepoints_mtvswt_withpvals.rds") +res_combined_ann <- readRDS("average_expression_allcelltypes_timepoints_mtvswt_withpvals.rds") # Marker gene statistics for CellType Explorer Tab 3 -data <- read.csv("data/differential-expression/DEgenes_MtvsWt_alltimepts_allcelltypes.csv") +data <- read.csv("DEgenes_MtvsWt_alltimepts_allcelltypes.csv") # convert cell type codes to real names @@ -391,48 +391,48 @@ cLinesList <- c(levels(as.factor(seurat.all$Line)),"All") # cell-cell communication data #cellchat <- readRDS("cellchat.rds") -cellchat_2m <- readRDS("data/cellchat/cellchat_2M.rds") -cellchat_2v <- readRDS("data/cellchat/cellchat_2V.rds") -cellchat_4m <- readRDS("data/cellchat/cellchat_4M.rds") -cellchat_4v <- readRDS("data/cellchat/cellchat_4V.rds") -cellchat_6m <- readRDS("data/cellchat/cellchat_6M.rds") -cellchat_6v <- readRDS("data/cellchat/cellchat_6V.rds") +cellchat_2m <- readRDS("cellchat_2M.rds") +cellchat_2v <- readRDS("cellchat_2V.rds") +cellchat_4m <- readRDS("cellchat_4M.rds") +cellchat_4v <- readRDS("cellchat_4V.rds") +cellchat_6m <- readRDS("cellchat_6M.rds") +cellchat_6v <- readRDS("cellchat_6V.rds") # cell net pathway data #net_df <- read.csv(file = 'net_pathway.csv') #net_df$prob <- format(net_df$prob, scientific = TRUE) #colnames(net_df) <- c("X", "source", "target", "pathway", "prob", "pval") -net_pathway_2m <- read.csv(file = 'data/cellchat/net_pathway_2m.csv') +net_pathway_2m <- read.csv(file = 'net_pathway_2m.csv') net_pathway_2m$prob <- format(net_pathway_2m$prob, scientific = TRUE) colnames(net_pathway_2m) <- c("X", "source", "target", "pathway", "prob", "pval") -net_pathway_2v <- read.csv(file = 'data/cellchat/net_pathway_2v.csv') +net_pathway_2v <- read.csv(file = 'net_pathway_2v.csv') net_pathway_2v$prob <- format(net_pathway_2v$prob, scientific = TRUE) colnames(net_pathway_2v) <- c("X", "source", "target", "pathway", "prob", "pval") -net_pathway_4m <- read.csv(file = 'data/cellchat/net_pathway_4m.csv') +net_pathway_4m <- read.csv(file = 'net_pathway_4m.csv') net_pathway_4m$prob <- format(net_pathway_4m$prob, scientific = TRUE) colnames(net_pathway_4m) <- c("X", "source", "target", "pathway", "prob", "pval") -net_pathway_4v <- read.csv(file = 'data/cellchat/net_pathway_4v.csv') +net_pathway_4v <- read.csv(file = 'net_pathway_4v.csv') net_pathway_4v$prob <- format(net_pathway_4v$prob, scientific = TRUE) colnames(net_pathway_4v) <- c("X", "source", "target", "pathway", "prob", "pval") -net_pathway_6m <- read.csv(file = 'data/cellchat/net_pathway_6m.csv') +net_pathway_6m <- read.csv(file = 'net_pathway_6m.csv') net_pathway_6m$prob <- format(net_pathway_6m$prob, scientific = TRUE) colnames(net_pathway_6m) <- c("X", "source", "target", "pathway", "prob", "pval") -net_pathway_6v <- read.csv(file = 'data/cellchat/net_pathway_6v.csv') +net_pathway_6v <- read.csv(file = 'net_pathway_6v.csv') net_pathway_6v$prob <- format(net_pathway_6v$prob, scientific = TRUE) colnames(net_pathway_6v) <- c("X", "source", "target", "pathway", "prob", "pval") # cell pathway names #choices <- cellchat@netP$pathways -pathway_op <- read.csv(file = 'data/cellchat/pathway_choices.csv') +pathway_op <- read.csv(file = 'pathway_choices.csv') # signaling pathway annotation -CellChatDB <- read.csv(file = 'data/cellchat/CellChatDB.csv') +CellChatDB <- read.csv(file = 'CellChatDB.csv') # comparative analysis of ccc conditions ccc_comparsion_List <- c("tau-V337M organoids at two months", @@ -1934,7 +1934,7 @@ server <- function(input, output, session) { ct_select <- input$celltype ct_code <- ctcode_map[[ct_select]] - ct_data_to_show <- readRDS(sprintf("data/cell-group-gene-enrichment/celltype_marker_genes_%s.rds",ct_code)) + ct_data_to_show <- readRDS(sprintf("celltype_marker_genes_%s.rds",ct_code)) showdata <- tibble::rownames_to_column(ct_data_to_show, "Gene") showdata <- showdata %>% dplyr::select(Gene,avg_log2FC,p_val) showdata @@ -1947,7 +1947,7 @@ server <- function(input, output, session) { # File read-in must be here because data depends on a reactive input value - reducedTerms <- readRDS(sprintf("data/cell-group-gene-enrichment/REVIGO_reducedTerms_%s.rds",ct_code)) + reducedTerms <- readRDS(sprintf("REVIGO_reducedTerms_%s.rds",ct_code)) # treemapPlot(reducedTerms,title=sprintf("Summary of enriched Gene Ontology terms in %s cells, all timepoints.",ct_code), # fontsize.title=10) treemapPlot(reducedTerms) @@ -2554,8 +2554,8 @@ server <- function(input, output, session) { req(input$condition_1, input$condition_2) cond_1 <- setCCCNames(input$condition_1) cond_2 <- setCCCNames(input$condition_2) - my_data_1 <- readRDS(sprintf("data/cellchat/cellchat_%s%s.rds",str_extract_all(cond_1, "[0-9]+"), str_extract_all(cond_1, "[aA-zZ]+"))) - file_names <- paste0('data/cellchat/cellchat_', cond_2, '.rds') + my_data_1 <- readRDS(sprintf("cellchat_%s%s.rds",str_extract_all(cond_1, "[0-9]+"), str_extract_all(cond_1, "[aA-zZ]+"))) + file_names <- paste0('cellchat_', cond_2, '.rds') my_data_2 <- readRDS(file_names) #my_data_2 <- readRDS(sprintf("cellchat_%s%s.rds",str_extract_all(cond_2, "[0-9]+"), str_extract_all(cond_2, "[aA-zZ]+"))) name_1 <- as.character(input$condition_1) @@ -2572,8 +2572,8 @@ server <- function(input, output, session) { req(input$condition_1, input$condition_2) cond_1 <- setCCCNames(input$condition_1) cond_2 <- setCCCNames(input$condition_2) - my_data_1 <- readRDS(sprintf("data/cellchat/cellchat_%s%s.rds",str_extract_all(cond_1, "[0-9]+"), str_extract_all(cond_1, "[aA-zZ]+"))) - file_names <- paste0('data/cellchat/cellchat_', cond_2, '.rds') + my_data_1 <- readRDS(sprintf("cellchat_%s%s.rds",str_extract_all(cond_1, "[0-9]+"), str_extract_all(cond_1, "[aA-zZ]+"))) + file_names <- paste0('cellchat_', cond_2, '.rds') my_data_2 <- readRDS(file_names) #my_data_2 <- readRDS(sprintf("cellchat_%s%s.rds",str_extract_all(cond_2, "[0-9]+"), str_extract_all(cond_2, "[aA-zZ]+"))) name_1 <- as.character(input$condition_1) @@ -2608,10 +2608,10 @@ server <- function(input, output, session) { req(input$condition_1, input$condition_2) cond_1 <- setCCCNames(input$condition_1) cond_2 <- setCCCNames(input$condition_2) - my_data_1 <- readRDS(sprintf("data/cellchat/cellchat_%s%s.rds",str_extract_all(cond_1, "[0-9]+"), str_extract_all(cond_1, "[aA-zZ]+"))) + my_data_1 <- readRDS(sprintf("cellchat_%s%s.rds",str_extract_all(cond_1, "[0-9]+"), str_extract_all(cond_1, "[aA-zZ]+"))) #my_data_2 <- readRDS(sprintf("cellchat_%s%s.rds",str_extract_all(cond_2, "[0-9]+"), str_extract_all(cond_2, "[aA-zZ]+"))) if (cond_2 == "2M") { - my_data_2 <- readRDS("data/cellchat/cellchat_2M.rds") + my_data_2 <- readRDS("cellchat_2M.rds") name_1 <- as.character(input$condition_1) name_2 <- as.character(input$condition_2) object.list <- dplyr::lst(!!name_1 := my_data_1, !!name_2 := my_data_2) @@ -2628,7 +2628,7 @@ server <- function(input, output, session) { } } if (cond_2 == "2V") { - my_data_2 <- readRDS("data/cellchat/cellchat_2V.rds") + my_data_2 <- readRDS("cellchat_2V.rds") name_1 <- as.character(input$condition_1) name_2 <- as.character(input$condition_2) object.list <- dplyr::lst(!!name_1 := my_data_1, !!name_2 := my_data_2) @@ -2645,7 +2645,7 @@ server <- function(input, output, session) { } } if (cond_2 == "4M") { - my_data_2 <- readRDS("data/cellchat/cellchat_4M.rds") + my_data_2 <- readRDS("cellchat_4M.rds") name_1 <- as.character(input$condition_1) name_2 <- as.character(input$condition_2) object.list <- dplyr::lst(!!name_1 := my_data_1, !!name_2 := my_data_2) @@ -2662,7 +2662,7 @@ server <- function(input, output, session) { } } if (cond_2 == "4V") { - my_data_2 <- readRDS("data/cellchat/cellchat_4V.rds") + my_data_2 <- readRDS("cellchat_4V.rds") name_1 <- as.character(input$condition_1) name_2 <- as.character(input$condition_2) object.list <- dplyr::lst(!!name_1 := my_data_1, !!name_2 := my_data_2) @@ -2679,7 +2679,7 @@ server <- function(input, output, session) { } } if (cond_2 == "6M") { - my_data_2 <- readRDS("data/cellchat/cellchat_6M.rds") + my_data_2 <- readRDS("cellchat_6M.rds") name_1 <- as.character(input$condition_1) name_2 <- as.character(input$condition_2) object.list <- dplyr::lst(!!name_1 := my_data_1, !!name_2 := my_data_2) @@ -2696,7 +2696,7 @@ server <- function(input, output, session) { } } if (cond_2 == "6V") { - my_data_2 <- readRDS("data/cellchat/cellchat_6V.rds") + my_data_2 <- readRDS("cellchat_6V.rds") name_1 <- as.character(input$condition_1) name_2 <- as.character(input$condition_2) object.list <- dplyr::lst(!!name_1 := my_data_1, !!name_2 := my_data_2) @@ -2733,8 +2733,8 @@ server <- function(input, output, session) { req(input$condition_1, input$condition_2) cond_1 <- setCCCNames(input$condition_1) cond_2 <- setCCCNames(input$condition_2) - my_data_1 <- readRDS(sprintf("data/cellchat/cellchat_%s%s.rds",str_extract_all(cond_1, "[0-9]+"), str_extract_all(cond_1, "[aA-zZ]+"))) - file_names <- paste0('data/cellchat/cellchat_', cond_2, '.rds') + my_data_1 <- readRDS(sprintf("cellchat_%s%s.rds",str_extract_all(cond_1, "[0-9]+"), str_extract_all(cond_1, "[aA-zZ]+"))) + file_names <- paste0('cellchat_', cond_2, '.rds') my_data_2 <- readRDS(file_names) #my_data_2 <- readRDS(sprintf("cellchat_%s%s.rds",str_extract_all(cond_2, "[0-9]+"), str_extract_all(cond_2, "[aA-zZ]+"))) name_1 <- as.character(input$condition_1) @@ -2793,7 +2793,7 @@ server <- function(input, output, session) { output$VolcanoPlots <- renderPlotly({ if(input$ct != "All") { - allcelltype_data <- read.csv("data/differential-expression/DEgenes_MtvsWt_alltimepts_allcelltypes.csv") + allcelltype_data <- read.csv("DEgenes_MtvsWt_alltimepts_allcelltypes.csv") celltype_data <- allcelltype_data[allcelltype_data$celltype == input$ct,] if(input$time == "All") { df_all <- celltype_data %>% @@ -2824,7 +2824,7 @@ server <- function(input, output, session) { output$manhattanplot <- renderPlotly({ if(input$ct != "All") { - allcelltype_data <- read.csv("data/differential-expression/DEgenes_MtvsWt_alltimepts_allcelltypes.csv") + allcelltype_data <- read.csv("DEgenes_MtvsWt_alltimepts_allcelltypes.csv") celltype_data <- allcelltype_data[allcelltype_data$celltype == input$ct,] if(input$time == "All") { df_all <- celltype_data %>% @@ -2855,7 +2855,7 @@ server <- function(input, output, session) { output$enrichmentplot <- renderPlot({ if(input$ct != "All") { - allcelltype_data <- read.csv("data/differential-expression/DEgenes_MtvsWt_alltimepts_allcelltypes.csv") + allcelltype_data <- read.csv("DEgenes_MtvsWt_alltimepts_allcelltypes.csv") celltype_data <- allcelltype_data[allcelltype_data$celltype == input$ct,] if(input$time == "All") { up = subset(celltype_data, avg_log2FC > 0) diff --git a/data/genewise-avgexp-percentexp/average_expression_allcelltypes_timepoints_mtvswt_withpvals.rds b/average_expression_allcelltypes_timepoints_mtvswt_withpvals.rds similarity index 100% rename from data/genewise-avgexp-percentexp/average_expression_allcelltypes_timepoints_mtvswt_withpvals.rds rename to average_expression_allcelltypes_timepoints_mtvswt_withpvals.rds diff --git a/data/cellchat/cellchat_2M.rds b/cellchat_2M.rds similarity index 100% rename from data/cellchat/cellchat_2M.rds rename to cellchat_2M.rds diff --git a/data/cellchat/cellchat_2V.rds b/cellchat_2V.rds similarity index 100% rename from data/cellchat/cellchat_2V.rds rename to cellchat_2V.rds diff --git a/data/cellchat/cellchat_4M.rds b/cellchat_4M.rds similarity index 100% rename from data/cellchat/cellchat_4M.rds rename to cellchat_4M.rds diff --git a/data/cellchat/cellchat_4V.rds b/cellchat_4V.rds similarity index 100% rename from data/cellchat/cellchat_4V.rds rename to cellchat_4V.rds diff --git a/data/cellchat/cellchat_6M.rds b/cellchat_6M.rds similarity index 100% rename from data/cellchat/cellchat_6M.rds rename to cellchat_6M.rds diff --git a/data/cellchat/cellchat_6V.rds b/cellchat_6V.rds similarity index 100% rename from data/cellchat/cellchat_6V.rds rename to cellchat_6V.rds diff --git a/data/cell-group-gene-enrichment/celltype_marker_genes_Ast.rds b/celltype_marker_genes_Ast.rds similarity index 100% rename from data/cell-group-gene-enrichment/celltype_marker_genes_Ast.rds rename to celltype_marker_genes_Ast.rds diff --git a/data/cell-group-gene-enrichment/celltype_marker_genes_ExDp1.rds b/celltype_marker_genes_ExDp1.rds similarity index 100% rename from data/cell-group-gene-enrichment/celltype_marker_genes_ExDp1.rds rename to celltype_marker_genes_ExDp1.rds diff --git a/data/cell-group-gene-enrichment/celltype_marker_genes_ExDp2.rds b/celltype_marker_genes_ExDp2.rds similarity index 100% rename from data/cell-group-gene-enrichment/celltype_marker_genes_ExDp2.rds rename to celltype_marker_genes_ExDp2.rds diff --git a/data/cell-group-gene-enrichment/celltype_marker_genes_ExM.rds b/celltype_marker_genes_ExM.rds similarity index 100% rename from data/cell-group-gene-enrichment/celltype_marker_genes_ExM.rds rename to celltype_marker_genes_ExM.rds diff --git a/data/cell-group-gene-enrichment/celltype_marker_genes_ExN.rds b/celltype_marker_genes_ExN.rds similarity index 100% rename from data/cell-group-gene-enrichment/celltype_marker_genes_ExN.rds rename to celltype_marker_genes_ExN.rds diff --git a/data/cell-group-gene-enrichment/celltype_marker_genes_IP.rds b/celltype_marker_genes_IP.rds similarity index 100% rename from data/cell-group-gene-enrichment/celltype_marker_genes_IP.rds rename to celltype_marker_genes_IP.rds diff --git a/data/cell-group-gene-enrichment/celltype_marker_genes_InCGE.rds b/celltype_marker_genes_InCGE.rds similarity index 100% rename from data/cell-group-gene-enrichment/celltype_marker_genes_InCGE.rds rename to celltype_marker_genes_InCGE.rds diff --git a/data/cell-group-gene-enrichment/celltype_marker_genes_InMGE.rds b/celltype_marker_genes_InMGE.rds similarity index 100% rename from data/cell-group-gene-enrichment/celltype_marker_genes_InMGE.rds rename to celltype_marker_genes_InMGE.rds diff --git a/data/cell-group-gene-enrichment/celltype_marker_genes_OPC.rds b/celltype_marker_genes_OPC.rds similarity index 100% rename from data/cell-group-gene-enrichment/celltype_marker_genes_OPC.rds rename to celltype_marker_genes_OPC.rds diff --git a/data/cell-group-gene-enrichment/celltype_marker_genes_PgG2M.rds b/celltype_marker_genes_PgG2M.rds similarity index 100% rename from data/cell-group-gene-enrichment/celltype_marker_genes_PgG2M.rds rename to celltype_marker_genes_PgG2M.rds diff --git a/data/cell-group-gene-enrichment/celltype_marker_genes_PgS.rds b/celltype_marker_genes_PgS.rds similarity index 100% rename from data/cell-group-gene-enrichment/celltype_marker_genes_PgS.rds rename to celltype_marker_genes_PgS.rds diff --git a/data/cell-group-gene-enrichment/celltype_marker_genes_oRG.rds b/celltype_marker_genes_oRG.rds similarity index 100% rename from data/cell-group-gene-enrichment/celltype_marker_genes_oRG.rds rename to celltype_marker_genes_oRG.rds diff --git a/data/cell-group-gene-enrichment/celltype_marker_genes_vRG.rds b/celltype_marker_genes_vRG.rds similarity index 100% rename from data/cell-group-gene-enrichment/celltype_marker_genes_vRG.rds rename to celltype_marker_genes_vRG.rds diff --git a/data-generation/overall-DE-analysis-each-timepoint-allcelltypes.Rmd b/data-generation/overall-DE-analysis-each-timepoint-allcelltypes.Rmd deleted file mode 100644 index 776c451..0000000 --- a/data-generation/overall-DE-analysis-each-timepoint-allcelltypes.Rmd +++ /dev/null @@ -1,246 +0,0 @@ ---- -title: Differential expression testing of FTD Organoid scRNAseq data to identify marker - genes for all experimental groups and timepoints -author: "Rachael White" -date: "July 4 2022" -output: - pdf_document: default - html_document: default ---- - -```{r setup, include=FALSE} -knitr::opts_chunk$set(echo = TRUE) - -# Required R package installation - -if (!require("Seurat")) { - install.packages("Seurat") - library(Seurat) -} -if (!require("knitr")) { - install.packages("knitr") - library(knitr) -} - -``` - -# Overview - -This notebook documents the workflow and statistical methods used to create the [Bowles dataset](https://www.cell.com/cell/fulltext/S0092-8674(21)00829-1?_returnURL=https%3A%2F%2Flinkinghub.elsevier.com%2Fretrieve%2Fpii%2FS0092867421008291%3Fshowall%3Dtrue) differential gene expression analyzer tool available at https://whiter9.shinyapps.io/DEtableDemo/. - -# Data subsetting - -## Split full dataset by timepoint into 3 separate `Seurat` objects and save for re-loading - -```{r} - -# # clear workspace and memory -# rm(list=ls()) -# gc() - -# objs_by_age <- SplitObject(readRDS("~/Alzheimers_DS/FinalMergedData.rds"),split.by="Age") - -# DefaultAssay(objs_by_age[["2mo"]]) <- "RNA" -# DefaultAssay(objs_by_age[["4mo"]]) <- "RNA" -# DefaultAssay(objs_by_age[["6mo"]]) <- "RNA" -# saveRDS(objs_by_age[["2mo"]],"/data/Alzheimers_DS/FinalMergedData-2mo.rds") -# saveRDS(objs_by_age[["4mo"]],"/data/Alzheimers_DS/FinalMergedData-4mo.rds") -# saveRDS(objs_by_age[["6mo"]],"/data/Alzheimers_DS/FinalMergedData-6mo.rds") - -# # clear workspace and memory -# rm(list=ls()) -# gc() - -``` - - -## Re-normalize data wrt time - -```{r} -# Warning: -# Running this code chunk is memory-intensive -# and can take several hours -# Make sure workspace environment is cleared before running - -# Variable name containing the loaded data is recycled to conserve memory - -# # clear workspace and memory -# rm(list=ls()) -# gc() - -# 2 month data -# cells <- readRDS("/data/Alzheimers_DS/FinalMergedData-2mo.rds") -# DefaultAssay(cells) <- "RNA" -# cells <- NormalizeData(cells) -# saveRDS(cells,"/data/Alzheimers_DS/FinalMergedData-2mo-lognormalized.rds") - -# 4 month data -# cells <- readRDS("/data/Alzheimers_DS/FinalMergedData-4mo.rds") -# DefaultAssay(cells) <- "RNA" -# cells <- NormalizeData(cells) -# saveRDS(cells,"/data/Alzheimers_DS/FinalMergedData-4mo-lognormalized.rds") - -# 6 month data -# cells <- readRDS("/data/Alzheimers_DS/FinalMergedData-6mo.rds") -# DefaultAssay(cells) <- "RNA" -# cells <- NormalizeData(cells) -# saveRDS(cells,"/data/Alzheimers_DS/FinalMergedData-6mo-lognormalized.rds") - - -``` - -### Run Differential Expression Testing - -Helper functions for running the differential expression analysis and processing the results: - -```{r} -# Take all cells at this timepoint, group by one cell type at a time, -# and find markers that separate cells in group 'V337M'(FTD-mutant) -# for this celltype. -# Keep both positive and negative markers. -findTimeptMarkerGenes <- function(seurat_obj,celltype){ - markers <- FindMarkers(seurat_obj, - # run DE using cells of this celltype only - subset.ident = celltype, - # population to test differences for - ident.1 = "V337M", - # grouping variable associated with - # the population being tested - group.by = 'Mt', - # assay data to use in testing - assay = "RNA", - slot = "counts", - # use the hurdle model designed for single-cell data - test.use= "MAST", - # sources of variation to regress out in the DE testing protocol - latent.vars = c("percent.mt","QCcells","nFeature_RNA", "nCount_RNA")) - return(markers) -} - -#Add columns for ID, timepoint and celltype to the results -formatRes <- function(DEres,timept,celltype) { - # create column for gene id - DEres <- DEres %>% tibble::rownames_to_column("gene") - # create column for timepoint - DEres$timepoint <- rep(timept,nrow(DEres)) - DEres$timepoint <- as.factor(DEres$timepoint) - # create column for celltype - DEres$celltype <- rep(celltype,nrow(DEres)) - DEres$celltype <- as.factor(DEres$celltype) - - return(DEres) -} - - -``` - - -This workflow runs DE for a specific timepoint; the same code was used to obtain results for each timepoint. - -```{r} -# Run DE analysis on the normalized 6 month data - -# cells <- readRDS("/data/Alzheimers_DS/FinalMergedData-6mo-lognormalized.rds") -# Idents(cells) <- "CellType" -# -# Ast <- findTimeptMarkerGenes(cells,"Ast") -# ExDp1 <- findTimeptMarkerGenes(cells,"ExDp1") -# ExDp2 <- findTimeptMarkerGenes(cells,"ExDp2") -# vRG <- findTimeptMarkerGenes(cells,"vRG") -# oRG <- findTimeptMarkerGenes(cells,"oRG") -# OPC <- findTimeptMarkerGenes(cells,"OPC") -# ExM <- findTimeptMarkerGenes(cells,"ExM") -# ExMU <- findTimeptMarkerGenes(cells,"ExM-U") -# ExN <- findTimeptMarkerGenes(cells,"ExN") -# InMGE <- findTimeptMarkerGenes(cells,"InMGE") -# InCGE <- findTimeptMarkerGenes(cells,"InCGE") -# PgS <- findTimeptMarkerGenes(cells,"PgS") -# PgG2M <- findTimeptMarkerGenes(cells,"PgG2M") -# IP <- findTimeptMarkerGenes(cells,"IP") - -``` - -### Format results - -```{r} - -# Astres <- formatRes(ExM,6,"Ast") -# ExDp1res <- formatRes(ExM,6,"ExDp1") -# ExDp2res <- formatRes(ExM,6,"ExDp2") -# vRGrres <- formatRes(vRG,6,"vRG") -# oRGres <- formatRes(oPC,6,"oRG") -# OPCres <- formatRes(ExM,6,"OPC") -# ExMres <- formatRes(ExM,6,"ExM") -# ExMUres <- formatRes(ExMU,6,"ExM-U") -# ExNres <- formatRes(ExN,6,"ExN") -# InMGEres <- formatRes(InMGE,6,"InMGE") -# InCGEres <- formatRes(InCGE,6,"InCGE") -# PgSres <- formatRes(PgS,6,"PgS") -# PgG2Mres <- formatRes(PgG2M,6,"PgG2M") -# IPres <- formatRes(IP,6,"IP") - -``` - -### Save results for individual celltypes - -```{r} -# saveRDS(Astres,"~/AlzApp/DEgenes_MtvsWt_Ast_6mo.rds") -# saveRDS(ExDp1res,"~/AlzApp/DEgenes_MtvsWt_ExDp1_6mo.rds") -# saveRDS(ExDp2res,"~/AlzApp/DEgenes_MtvsWt_ExDp2_6mo.rds") -# saveRDS(vRGres,"~/AlzApp/DEgenes_MtvsWt_vRG_6mo.rds") -# saveRDS(oRGres,"~/AlzApp/DEgenes_MtvsWt_oRG_6mo.rds") -# saveRDS(res,"~/AlzApp/DEgenes_MtvsWt_OPC_6mo.rds") -# saveRDS(ExMres,"~/AlzApp/DEgenes_MtvsWt_ExM_6mo.rds") -# saveRDS(ExMUres,"~/AlzApp/DEgenes_MtvsWt_ExM-U_6mo.rds") -# saveRDS(ExNres,"~/AlzApp/DEgenes_MtvsWt_ExN_6mo.rds") -# saveRDS(InMGEres,"~/AlzApp/DEgenes_MtvsWt_InMGE_6mo.rds") -# saveRDS(InCGEres,"~/AlzApp/DEgenes_MtvsWt_InCGE_6mo.rds") -# saveRDS(PgSres,"~/AlzApp/DEgenes_MtvsWt_PgS_6mo.rds") -# saveRDS(PgG2Mres,"~/AlzApp/DEgenes_MtvsWt_PgG2M_6mo.rds") -# saveRDS(IPres,"~/AlzApp/DEgenes_MtvsWt_IP_6mo.rds") - -``` - -### Combine results for this timepoint - -Vertically combine or "stack" the results dataframes for each celltype -into one overall results dataframe for this timepoint - -```{r} -# DE_genes.df <- dplyr::bind_rows(Astres, ExDp1res, ExDp2res, - # vRGres, oRGres, OPCres, - # ExMres,ExMUres,ExNres, - # InMGEres,InCGEres,PgSres, - # PgG2Mres,IPres) - -``` - -### Designate DE status for each gene in the results using a specified significance cutoff - -```{r} -# Create column for DE status -# specifying the significance cutoff -# -pvalue_cutoff = 0.01 - -# topDE_genes.df <- DE_genes.df %>% mutate( DE_status = -# ifelse(p_val_adj < pvalue_cutoff, -# "Significantly expressed in V337M", "Not significant")) -# # factorize relevant columns -# topDE_genes.df$timepoint <- as.factor(topDE_genes.df$timepoint) -# topDE_genes.df$DE_status <- as.factor(topDE_genes.df$DE_status) -# topDE_genes.df$celltype <- as.factor(topDE_genes.df$celltype) -# -# dim(topDE_genes.df) -# head(topDE_genes.df) - -``` - -### Save overall results - -```{r} -# saveRDS(topDE_genes.df,"~/AlzApp/DEgenes_MtvsWt_2mo_allcelltypes.rds") -``` - - - diff --git a/R/jse_test.R b/jse_test.R similarity index 100% rename from R/jse_test.R rename to jse_test.R diff --git a/man/app-usage.Rmd b/man/app-usage.Rmd deleted file mode 100644 index 07e2c3d..0000000 --- a/man/app-usage.Rmd +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: "Guide to preparing and uploading your single-cell RNAseq dataset for use with this application" -output: - html_document: default - pdf_document: default ---- - -## Overview - -This notebook outlines the requirements for preparing your own single-cell RNAseq dataset (provided in `Seurat` format) in order to be hosted by FTD Minder for interactive data visualization and exploration. - -## Process outline - -The following data pre-processing workflow must be completed **_prior to initial app execution_**: - - 1. Dataset format and attribute requirements - 2. Dataset upload - 3. Automated data generation - - -## Step 1. Ensure dataset format and attribute requirements are met - -We use core subprocesses implemented in the `Seurat` toolkit for single-cell data analysis to generate the plotting data and analyses shown in this application. As such, user datasets uploaded must be in `Seurat` object format (latest version) and provided as a `.rds` file. - - -This app anticipates (and requires) two specific cell classifications to be present for all cells. The dataset should contain metadata attributes of a) an explicit primary cell group annotation (clusters, celltypes, etc.), and also -b) annotations of cell membership in either an experimental group or control group (or any similar paired grouping). - - -User should set the `default identity` of their specific `Seurat` object to the first grouping variable prior to the next step (data upload), as this is what the app will use as the default grouping in all analyses. The second variable (experimental condition) must be specified in Step 3. - - -## Step 2. Dataset upload - -Upload the formatted `Seurat` object containing your complete dataset (with the intended default `identity` and `assay` variables set) into the `user-data-upload` subdirectory of this repository. - -Your dataset will not be modified by this application; it will exclusively be drawn on for the following data processing steps. - - -## Step 3. Run the provided automated data generation workflow to produce specific app dependencies from your dataset - -This step generates the plotting data frames containing specific data to be drawn on by the visualizations featured in FTD Minder. - -To complete: - - * In your local filesystem and PRIOR to initial app runtime, execute the R script provided in the `data-generation` subdirectory of this repository. - - * Before executing, make sure to adjust the specific parameters in the `Parameter configuration` section in the header of the script to accommodate your dataset specifications. - - * Do not interrupt the execution of the script while it is running. If errors are thrown, verify that your filepaths and other manually-specified parameters are correct. - * After program completion, verify that each of the `data/` folder subdirectories are now populated with datafiles. - -## Step 4. Run the App. - - diff --git a/man/app-usage.html b/man/app-usage.html deleted file mode 100644 index 5dfe161..0000000 --- a/man/app-usage.html +++ /dev/null @@ -1,487 +0,0 @@ - - - - - - - - - - - - - -Guide to preparing and uploading your single-cell RNAseq dataset for use with this application - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
-

Overview

-

This notebook outlines the requirements for preparing your own -single-cell RNAseq dataset (provided in Seurat format) in -order to be hosted by FTD Minder for interactive data visualization and -exploration.

-
-
-

Process outline

-

The following data pre-processing workflow must be completed -prior to initial app execution:

-
    -
  1. Dataset format and attribute requirements
  2. -
  3. Dataset upload
  4. -
  5. Automated data generation
  6. -
-
-
-

Step 1. Ensure dataset format and attribute requirements are -met

-

We use core subprocesses implemented in the Seurat -toolkit for single-cell data analysis to generate the plotting data and -analyses shown in this application. As such, user datasets uploaded must -be in Seurat object format (latest version) and provided as -a .rds file.

-

This app anticipates (and requires) two specific cell classifications -to be present for all cells. The dataset should contain metadata -attributes of a) an explicit primary cell group annotation (clusters, -celltypes, etc.), and also b) annotations of cell membership in either -an experimental group or control group (or any similar paired -grouping).

-

User should set the default identity of their specific -Seurat object to the first grouping variable prior to the -next step (data upload), as this is what the app will use as the default -grouping in all analyses. The second variable (experimental condition) -must be specified in Step 3.

-
-
-

Step 2. Dataset upload

-

Upload the formatted Seurat object containing your -complete dataset (with the intended default identity and -assay variables set) into the user-data-upload -subdirectory of this repository.

-

Your dataset will not be modified by this application; it will -exclusively be drawn on for the following data processing steps.

-
-
-

Step 3. Run the provided automated data generation workflow to -produce specific app dependencies from your dataset

-

This step generates the plotting data frames containing specific data -to be drawn on by the visualizations featured in FTD Minder.

-

To complete:

- -
-
-

Step 4. Run the App.

-
- - - - -
- - - - - - - - - - - - - - - diff --git a/data/cellchat/net_pathway_2m.csv b/net_pathway_2m.csv similarity index 100% rename from data/cellchat/net_pathway_2m.csv rename to net_pathway_2m.csv diff --git a/data/cellchat/net_pathway_2v.csv b/net_pathway_2v.csv similarity index 100% rename from data/cellchat/net_pathway_2v.csv rename to net_pathway_2v.csv diff --git a/data/cellchat/net_pathway_4m.csv b/net_pathway_4m.csv similarity index 100% rename from data/cellchat/net_pathway_4m.csv rename to net_pathway_4m.csv diff --git a/data/cellchat/net_pathway_4v.csv b/net_pathway_4v.csv similarity index 100% rename from data/cellchat/net_pathway_4v.csv rename to net_pathway_4v.csv diff --git a/data/cellchat/net_pathway_6m.csv b/net_pathway_6m.csv similarity index 100% rename from data/cellchat/net_pathway_6m.csv rename to net_pathway_6m.csv diff --git a/data/cellchat/net_pathway_6v.csv b/net_pathway_6v.csv similarity index 100% rename from data/cellchat/net_pathway_6v.csv rename to net_pathway_6v.csv diff --git a/data/overall-distributions/overall_celltype_props_data.rds b/overall_celltype_props_data.rds similarity index 100% rename from data/overall-distributions/overall_celltype_props_data.rds rename to overall_celltype_props_data.rds diff --git a/data/cellchat/pathway_choices.csv b/pathway_choices.csv similarity index 100% rename from data/cellchat/pathway_choices.csv rename to pathway_choices.csv diff --git a/data/cellchat/pathway_choices_001.csv b/pathway_choices_001.csv similarity index 100% rename from data/cellchat/pathway_choices_001.csv rename to pathway_choices_001.csv diff --git a/data/cellchat/pathway_choices_005.csv b/pathway_choices_005.csv similarity index 100% rename from data/cellchat/pathway_choices_005.csv rename to pathway_choices_005.csv diff --git a/data/cellchat/significant_pathway_6v.csv b/significant_pathway_6v.csv similarity index 100% rename from data/cellchat/significant_pathway_6v.csv rename to significant_pathway_6v.csv diff --git a/user-dataset-upload/temp.R b/user-dataset-upload/temp.R deleted file mode 100644 index e69de29..0000000