Skip to content

Commit

Permalink
renumbers tables
Browse files Browse the repository at this point in the history
  • Loading branch information
skafdasschaf committed Mar 9, 2023
1 parent 3d35c10 commit a6108ca
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 54 deletions.
33 changes: 4 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
TODO

- rename figures:
- 3c use new version
- 3f/g use old versions
- 4b -> S4b
- 4c -> 4b
- 4d -> 4c
- 4e -> 4d
- S1b -> S1c
- S1c -> S1d
- S1d -> S1e
- S4b -> S4c
- S5d+e -> S5d
- rename tables
- S4 -> S5
- S5 -> S6
- S6 -> S4
- S7 -> S8
- S8 -> S7
- upload R objects to Zenodo
- add CITATION.cff (after manuscript has been published)



# Dissecting the cellular architecture of neuroblastoma bone marrow metastasis using single-cell transcriptomics and epigenomics unravels the role of monocytes at the metastatic niche

## Folders
Expand Down Expand Up @@ -63,9 +38,9 @@ Create a folder `data_raw` that will contain raw data in the following subfolder
- `GSM4654672_T200_gene_cell_exprs_table.xls.gz`
- `GSM4654673_T214_gene_cell_exprs_table.xls.gz`
- `GSM4654674_T230_gene_cell_exprs_table.xls.gz`
- `snp_array`: Extract the contents of `snp_array.tgz` provided in Zenodo repository [https://doi.org/10.5281/zenodo.7707614]
- `snp_array`: Extract the contents of `snp_array.tgz` provided in Zenodo repository https://doi.org/10.5281/zenodo.7707614

Optionally, obtain intermediary data: Extract the contents of `R_data_generated.tgz` from Zenodo repository [https://doi.org/10.5281/zenodo.7707614] to folder `data_generated`.
Optionally, obtain intermediary data: Extract the contents of `R_data_generated.tgz` from Zenodo repository https://doi.org/10.5281/zenodo.7707614 to folder `data_generated`.



Expand Down Expand Up @@ -108,8 +83,8 @@ Run these R scripts in arbitrary order to generate publication figures and table

- [plot_figure_1_S1.R](plot_figure_1_S1.R) - includes Tables S2, S3, and S10
- [plot_figure_2_S2.R](plot_figure_2_S2.R)
- [plot_figure_3_S3.R](plot_figure_3_S3.R) - includes Table S6
- [plot_figure_4_S4_S7b.R](plot_figure_4_S4_S7b.R) - includes Tables S4 and S5
- [plot_figure_3_S3.R](plot_figure_3_S3.R) - includes Table S4
- [plot_figure_4_S4_S7b.R](plot_figure_4_S4_S7b.R) - includes Tables S5 and S6
- [plot_figure_S5_S7c.R](plot_figure_S5_S7c.R) - includes Table S7 and S8
- [plot_figures_revision.R](plot_figures_revision.R) – plots for the reply to reviewers

Expand Down
4 changes: 2 additions & 2 deletions plot_figure_3_S3.R
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ plot_netvisual()

# Tables ------------------------------------------------------------------

## S6 ----
## S4 ----

sig_data %>%
select(
Expand All @@ -479,4 +479,4 @@ sig_data %>%
Pathway = pathway_name,
"Type of interaction" = annotation
) %>%
save_table("S6_ccc", sheet_name = "Interactions")
save_table("S4_ccc", sheet_name = "Interactions")
8 changes: 4 additions & 4 deletions plot_figure_4_S4_S7b.R
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ ggsave_publication("S7b_gsea", width = 8, height = 10.8)

# Tables ------------------------------------------------------------------

## S4 ----
## S5 ----

gene_pathways <-
CellChatDB.human$interaction %>%
Expand Down Expand Up @@ -803,11 +803,11 @@ dge$results_wide_filtered %>%
left_join(gene_pathways, by = c(gene = "Gene")) %>%
split(.$cell_type) %>%
map(select, !cell_type) %>%
save_table("S4_dge")
save_table("S5_dge")



## S5 ----
## S6 ----

dge$gsea %>%
arrange(db, comparison, cell_type, desc(NES)) %>%
Expand All @@ -831,4 +831,4 @@ dge$gsea %>%
) %>%
split(.$`Cell type`) %>%
map(select, !`Cell type`) %>%
save_table("S5_gsea")
save_table("S6_gsea")
40 changes: 21 additions & 19 deletions plot_figure_S5_S7c.R
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,6 @@ ggsave_publication("S7c_IL10", type = "png",

# Tables ------------------------------------------------------------------

## S7 ----

gene_pathways <-
CellChatDB.human$interaction %>%
as_tibble() %>%
Expand All @@ -566,24 +564,9 @@ rename_columns <- function(s) {
)
}

dge_my$results_wide_filtered %>%
arrange(comparison, cell_type, desc(logFC)) %>%
mutate(
logFC = logFC / log(2), # nebula returns natural log fold changes
comparison = rename_contrast_long_alt(comparison),
) %>%
select(!c(p, frq, frq_ref, direction)) %>%
pivot_wider(names_from = comparison, values_from = c(logFC, p_adj)) %>%
relocate(1, 2, 3, 7, 4, 8, 5, 9, 6, 10) %>%
rename_with(rename_columns) %>%
left_join(gene_pathways, by = c(gene = "Gene")) %>%
split(.$cell_type) %>%
map(select, !cell_type) %>%
save_table("S7_dge_myeloid")



## S8 ----
## S7 ----

dge_my$gsea %>%
arrange(db, comparison, cell_type, desc(NES)) %>%
Expand All @@ -606,4 +589,23 @@ dge_my$gsea %>%
) %>%
split(.$`Cell type`) %>%
map(select, !`Cell type`) %>%
save_table("S8_gsea_myeloid")
save_table("S7_gsea_myeloid")



## S8 ----

dge_my$results_wide_filtered %>%
arrange(comparison, cell_type, desc(logFC)) %>%
mutate(
logFC = logFC / log(2), # nebula returns natural log fold changes
comparison = rename_contrast_long_alt(comparison),
) %>%
select(!c(p, frq, frq_ref, direction)) %>%
pivot_wider(names_from = comparison, values_from = c(logFC, p_adj)) %>%
relocate(1, 2, 3, 7, 4, 8, 5, 9, 6, 10) %>%
rename_with(rename_columns) %>%
left_join(gene_pathways, by = c(gene = "Gene")) %>%
split(.$cell_type) %>%
map(select, !cell_type) %>%
save_table("S8_dge_myeloid")

0 comments on commit a6108ca

Please sign in to comment.