Skip to content

Commit

Permalink
Merge branch 'dev' into 607
Browse files Browse the repository at this point in the history
  • Loading branch information
jharenza committed Sep 24, 2024
2 parents 644eb77 + 945dfab commit 6203f91
Show file tree
Hide file tree
Showing 21 changed files with 121 additions and 317 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/run_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:

run_analysis:
name: Run Analysis
runs-on: ubuntu-latest
runs-on: ubuntu-latest-m
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -151,8 +151,8 @@ jobs:
entrypoint: mutational-signatures/run_mutational_signatures.sh
openpbta_testing: 1

#- name: Immune Deconvolution
# entrypoint: immune-deconv/run-immune-deconv.sh
- name: Immune Deconvolution
entrypoint: immune-deconv/run-immune-deconv.sh

#- name: EFO/MONDO annotation
# entrypoint: efo-mondo-mapping/run_search_and_qc.sh
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ To cite this work, please note the data release used in your work and cite the f
1. OpenPBTA:
Shapiro, J.A., Gaonkar, K.S., Spielman, S.J., Savonen, C.L., Bethell, C.J., Jin, R., Rathi, K.S., Zhu, Y., Egolf, L.E., Farrow, B.K., et al. (2023). OpenPBTA: The Open Pediatric Brain Tumor Atlas. Cell Genom., 100340. [10.1016/j.xgen.2023.100340](https://www.cell.com/cell-genomics/pdf/S2666-979X(23)00115-5.pdf).
2. OpenPedCan:
Geng, Z. et al. The Open Pediatric Cancer Project. bioRxiv (2024) [10.1101/2024.07.09.599086](https://www.biorxiv.org/content/10.1101/2024.07.09.599086v1)
DOI for [all releases](https://zenodo.org/search?q=parent.id%3A6473912&f=allversions%3Atrue&l=list&p=1&s=10&sort=version): `10.5281/zenodo.6473912`.

The OpenPedCan analyses currently include the following datasets, described more fully below:
Expand Down
3 changes: 3 additions & 0 deletions analyses/immune-deconv/01-immune-deconv.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ full_output <- plyr::dlply(.data = n_groups, .variables = "group", .fun = functi
expr_mat_sub <- expr_mat %>%
dplyr::select(kf_ids)

# remove features with all 0 values
expr_mat_sub <- expr_mat_sub[rowSums(expr_mat_sub) > 0,]

# deconvolute using specified method
print("Starting deconvolution...")
deconv_output <- deconvolute(gene_expression = as.matrix(expr_mat_sub),
Expand Down
43 changes: 0 additions & 43 deletions analyses/immune-deconv/02-summary-plots.R

This file was deleted.

16 changes: 0 additions & 16 deletions analyses/immune-deconv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,6 @@ results/{deconv_method}_output.rds

For `xCell`, the results in the rds file are predicted immune scores per cell type per input sample. These scores are not actual cell fractions but arbitrary scores representing enrichment of the cell types which can be compared across various cancer/gtex groups. The `quanTIseq` results, in contrast, provide an absolute score that can be interpreted as a cell fraction and the results in the rds file are the absolute scores per cell type per input sample. Depending on the user requirements, the output can also be used to create various visualizations.

#### 02-summary-plots.R

1. Input

```
results/{deconv_method}_output.rds
```

2. Function:

This script creates heatmaps from predicted immune scores.

3. Output

* `plots/{deconv_method}_heatmap_by_group.pdf`: heatmap of average immune scores per cell type per cancer group or GTEx group.

### Running the analysis

The following script will run the full analysis using either of the two methods of choice: `xCell` or `quanTIseq`. `xCell` is run by default, so to select `quanTIseq`, see code option in chunk below.
Expand Down
Binary file not shown.
Binary file not shown.
Binary file modified analyses/immune-deconv/results/quantiseq_output.rds
Binary file not shown.
Binary file modified analyses/immune-deconv/results/xcell_output.rds
Binary file not shown.
26 changes: 6 additions & 20 deletions analyses/immune-deconv/run-immune-deconv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,11 @@ Rscript --vanilla 01-immune-deconv.R \
--deconv_method 'xcell' \
--output_dir 'results'

# generate heatmaps of average normalized immune scores per cancer or gtex group
echo "Create summary plots xCell"
Rscript --vanilla 02-summary-plots.R \
--deconv_output 'results/xcell_output.rds' \
--output_dir 'plots'

### quanTIseq
# generate deconvolution output
echo "Deconvolution quanTIseq..."
Rscript --vanilla 01-immune-deconv.R \
--expr_mat '../../data/gene-expression-rsem-tpm-collapsed.rds' \
--clin_file '../../data/histologies.tsv' \
--deconv_method 'quantiseq' \
--output_dir 'results'

# generate heatmaps of average normalized immune scores per cancer or gtex group
echo "Create summary plots quanTIseq"
Rscript --vanilla 02-summary-plots.R \
--deconv_output 'results/quantiseq_output.rds' \
--output_dir 'plots'


#echo "Deconvolution quanTIseq..."
#Rscript --vanilla 01-immune-deconv.R \
#--expr_mat '../../data/gene-expression-rsem-tpm-collapsed.rds' \
#--clin_file '../../data/histologies.tsv' \
#--deconv_method 'quantiseq' \
#--output_dir 'results'
5 changes: 4 additions & 1 deletion analyses/immune-deconv/util/colors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ cohort:
'GTEx': '#7CAE00'
'PBTA': '#C77CFF'
'TARGET': '#00BFC4'

'DGD': '#FF61CC'
'Maris': '#619CFF'
'PPTC': '#CD9600'

sample_type:
'Normal' : '#7CAE00'
'Tumor' : 'brown1'
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ pb_meta <- histo %>%
dkfz_v12_methylation_subclass == "PIN_RB" ~ "PB, RB1",
dkfz_v12_methylation_subclass == "PB_GRP1A" ~ "PB, Group 1A",
dkfz_v12_methylation_subclass == "PB_GRP1B" ~ "PB, Group 1B",
dkfz_v12_methylation_subclass == "PB_GRP2" ~ "PB, Group 2"))
dkfz_v12_methylation_subclass == "PB_GRP2" ~ "PB, Group 2",
dkfz_v12_methylation_subclass == "PPTID_A" ~ "PB, PPTID"
))
```

Expand All @@ -62,19 +65,27 @@ pb_meta <- histo %>%
## PB_GRP2: pineoblastoma, miRNA processing-altered 2 (PB, Group 2)
## PIN_RB: pineoblastoma, RB1-altered (PB, RB1)

## Additional subtypes added on 07/22/2024
## Edited By: Sangeeta Shukla
## PPTID_A: Pineal Parenchymal Tumor of Intermediate Differentiation Type A


```{r}
pb_methy_with_subtype <- pb_meta %>%
filter(experimental_strategy == "Methylation" & dkfz_v12_methylation_subclass_score >= 0.8) %>%
mutate(molecular_subtype = case_when(molecular_subtype_methyl == "PB, MYC/FOXR2" ~ "PB, MYC/FOXR2",
molecular_subtype_methyl == "PB, RB1" ~ "PB, RB1",
molecular_subtype_methyl %in% c("PB, Group 1A", "PB, Group 1B") ~ "PB, Group 1",
molecular_subtype_methyl == "PB, Group 2" ~ "PB, Group 2"))
molecular_subtype_methyl == "PB, Group 2" ~ "PB, Group 2",
molecular_subtype_methyl == "PPTID" ~ "PB, PPTID"
))
pb_methy_without_subtype <- pb_meta %>%
filter(experimental_strategy == "Methylation" &
!(Kids_First_Biospecimen_ID %in% pb_methy_with_subtype$Kids_First_Biospecimen_ID))
!(Kids_First_Biospecimen_ID %in% pb_methy_with_subtype$Kids_First_Biospecimen_ID)) %>%
mutate(molecular_subtype_methyl = NA_character_)
pb_methyl_df <- pb_methy_with_subtype %>%
bind_rows(pb_methy_without_subtype) %>%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,13 +360,13 @@ <h4 class="date">2023-12-06</h4>
<div id="load-library" class="section level2">
<h2>load library</h2>
<pre class="r"><code>library(tidyverse)</code></pre>
<pre><code>## ── Attaching core tidyverse packages ─────────────────────────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.1 ✔ readr 2.1.4
## ✔ forcats 1.0.0 ✔ stringr 1.5.0
## ✔ ggplot2 3.4.2 ✔ tibble 3.2.1
## ✔ lubridate 1.9.2 ✔ tidyr 1.3.0
## ✔ purrr 1.0.1
## ── Conflicts ───────────────────────────────────────────────────────────── tidyverse_conflicts() ──
<pre><code>## ── Attaching core tidyverse packages ──────────────────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1
## ✔ lubridate 1.9.3 ✔ tidyr 1.3.1
## ✔ purrr 1.0.2
## ── Conflicts ────────────────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (&lt;http://conflicted.r-lib.org/&gt;) to force all conflicts to become errors</code></pre>
Expand All @@ -385,7 +385,7 @@ <h2>set directories</h2>
<h2>read files</h2>
<pre class="r"><code>histo &lt;- readr::read_tsv(file.path(data_dir, &quot;histologies-base.tsv&quot;))</code></pre>
<pre><code>## Rows: 47895 Columns: 64
## ── Column specification ───────────────────────────────────────────────────────────────────────────
## ── Column specification ────────────────────────────────────────────────────────────────────
## Delimiter: &quot;\t&quot;
## chr (41): Kids_First_Participant_ID, Kids_First_Biospecimen_ID, sample_id, a...
## dbl (21): cell_line_passage, OS_days, EFS_days, age_at_diagnosis_days, age_a...
Expand All @@ -409,7 +409,9 @@ <h2>select PB samples from histologies</h2>
dkfz_v12_methylation_subclass == &quot;PIN_RB&quot; ~ &quot;PB, RB1&quot;,
dkfz_v12_methylation_subclass == &quot;PB_GRP1A&quot; ~ &quot;PB, Group 1A&quot;,
dkfz_v12_methylation_subclass == &quot;PB_GRP1B&quot; ~ &quot;PB, Group 1B&quot;,
dkfz_v12_methylation_subclass == &quot;PB_GRP2&quot; ~ &quot;PB, Group 2&quot;)) </code></pre>
dkfz_v12_methylation_subclass == &quot;PB_GRP2&quot; ~ &quot;PB, Group 2&quot;,
dkfz_v12_methylation_subclass == &quot;PPTID_A&quot; ~ &quot;PB, PPTID&quot;
))</code></pre>
</div>
<div id="there-are-four-subtypes" class="section level2">
<h2>there are four subtypes:</h2>
Expand Down Expand Up @@ -442,17 +444,30 @@ <h2>PB_GRP2: pineoblastoma, miRNA processing-altered 2 (PB, Group
</div>
<div id="pin_rb-pineoblastoma-rb1-altered-pb-rb1" class="section level2">
<h2>PIN_RB: pineoblastoma, RB1-altered (PB, RB1)</h2>
</div>
<div id="additional-subtypes-added-on-07222024" class="section level2">
<h2>Additional subtypes added on 07/22/2024</h2>
</div>
<div id="edited-by-sangeeta-shukla" class="section level2">
<h2>Edited By: Sangeeta Shukla</h2>
</div>
<div id="pptid_a-pineal-parenchymal-tumor-of-intermediate-differentiation-type-a" class="section level2">
<h2>PPTID_A: Pineal Parenchymal Tumor of Intermediate Differentiation
Type A</h2>
<pre class="r"><code>pb_methy_with_subtype &lt;- pb_meta %&gt;%
filter(experimental_strategy == &quot;Methylation&quot; &amp; dkfz_v12_methylation_subclass_score &gt;= 0.8) %&gt;%
mutate(molecular_subtype = case_when(molecular_subtype_methyl == &quot;PB, MYC/FOXR2&quot; ~ &quot;PB, MYC/FOXR2&quot;,
molecular_subtype_methyl == &quot;PB, RB1&quot; ~ &quot;PB, RB1&quot;,
molecular_subtype_methyl %in% c(&quot;PB, Group 1A&quot;, &quot;PB, Group 1B&quot;) ~ &quot;PB, Group 1&quot;,
molecular_subtype_methyl == &quot;PB, Group 2&quot; ~ &quot;PB, Group 2&quot;))
molecular_subtype_methyl == &quot;PB, Group 2&quot; ~ &quot;PB, Group 2&quot;,
molecular_subtype_methyl == &quot;PPTID&quot; ~ &quot;PB, PPTID&quot;
))


pb_methy_without_subtype &lt;- pb_meta %&gt;%
filter(experimental_strategy == &quot;Methylation&quot; &amp;
!(Kids_First_Biospecimen_ID %in% pb_methy_with_subtype$Kids_First_Biospecimen_ID))
!(Kids_First_Biospecimen_ID %in% pb_methy_with_subtype$Kids_First_Biospecimen_ID)) %&gt;%
mutate(molecular_subtype_methyl = NA_character_)

pb_methyl_df &lt;- pb_methy_with_subtype %&gt;%
bind_rows(pb_methy_without_subtype) %&gt;%
Expand All @@ -478,13 +493,13 @@ <h2>assign the molecular subtypes to all samples based on the
<div id="session-info" class="section level2">
<h2>session info</h2>
<pre class="r"><code>sessionInfo()</code></pre>
<pre><code>## R version 4.2.3 (2023-03-15)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 22.04.2 LTS
<pre><code>## 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
## 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=en_US.UTF-8 LC_NUMERIC=C
Expand All @@ -494,26 +509,29 @@ <h2>session info</h2>
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## time zone: Etc/UTC
## tzcode source: system (glibc)
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] lubridate_1.9.2 forcats_1.0.0 stringr_1.5.0 dplyr_1.1.1
## [5] purrr_1.0.1 readr_2.1.4 tidyr_1.3.0 tibble_3.2.1
## [9] ggplot2_3.4.2 tidyverse_2.0.0
## [1] lubridate_1.9.3 forcats_1.0.0 stringr_1.5.1 dplyr_1.1.4
## [5] purrr_1.0.2 readr_2.1.5 tidyr_1.3.1 tibble_3.2.1
## [9] ggplot2_3.5.1 tidyverse_2.0.0
##
## loaded via a namespace (and not attached):
## [1] bslib_0.4.2 compiler_4.2.3 pillar_1.9.0 jquerylib_0.1.4
## [5] tools_4.2.3 bit_4.0.5 digest_0.6.31 timechange_0.2.0
## [9] jsonlite_1.8.4 evaluate_0.20 lifecycle_1.0.3 gtable_0.3.3
## [13] pkgconfig_2.0.3 rlang_1.1.0 cli_3.6.1 parallel_4.2.3
## [17] yaml_2.3.7 xfun_0.38 fastmap_1.1.1 withr_2.5.0
## [21] knitr_1.42 generics_0.1.3 vctrs_0.6.2 sass_0.4.5
## [25] hms_1.1.3 bit64_4.0.5 rprojroot_2.0.3 grid_4.2.3
## [29] tidyselect_1.2.0 glue_1.6.2 R6_2.5.1 fansi_1.0.4
## [33] vroom_1.6.1 rmarkdown_2.21 tzdb_0.3.0 magrittr_2.0.3
## [37] scales_1.2.1 htmltools_0.5.5 colorspace_2.1-0 utf8_1.2.3
## [41] stringi_1.7.12 munsell_0.5.0 cachem_1.0.7 crayon_1.5.2</code></pre>
## [1] bit_4.0.5 gtable_0.3.5 jsonlite_1.8.8 crayon_1.5.2
## [5] compiler_4.4.0 tidyselect_1.2.1 parallel_4.4.0 jquerylib_0.1.4
## [9] scales_1.3.0 yaml_2.3.8 fastmap_1.2.0 R6_2.5.1
## [13] generics_0.1.3 knitr_1.46 rprojroot_2.0.4 munsell_0.5.1
## [17] bslib_0.7.0 pillar_1.9.0 tzdb_0.4.0 rlang_1.1.3
## [21] utf8_1.2.4 stringi_1.8.4 cachem_1.1.0 xfun_0.44
## [25] sass_0.4.9 bit64_4.0.5 timechange_0.3.0 cli_3.6.2
## [29] withr_3.0.0 magrittr_2.0.3 digest_0.6.35 grid_4.4.0
## [33] vroom_1.6.5 hms_1.1.3 lifecycle_1.0.4 vctrs_0.6.5
## [37] evaluate_0.23 glue_1.7.0 fansi_1.0.6 colorspace_2.1-0
## [41] rmarkdown_2.27 tools_4.4.0 pkgconfig_2.0.3 htmltools_0.5.8.1</code></pre>
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Congenital Mesoblastic Nephroma Other tumor
Cranial fasciitis NA
Cyst Other tumor
Dermoid cyst NA
Diffuse intrinsic pontine glioma Diffuse midline glioma
Dysembryoplastic neuroepithelial tumor (DNET) Dysembryoplastic neuroepithelial tumor
Dysembryoplastic neuroepithelial tumor (DNET);Dysplasia/Gliosis;Ganglioglioma NA
Dysembryoplastic neuroepithelial tumor (DNET);Ganglioglioma Dysembryoplastic neuroepithelial tumor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ DGD Diffuse leptomeningeal glioneuronal tumor, To be classified Diffuse leptome
PBTA Diffuse midline glioma, H3 K28-altered Diffuse midline glioma Yes No
PBTA Diffuse midline glioma, H3 K28-mutant Diffuse midline glioma Yes No
PBTA Diffuse midline glioma, H3 K28-altered (EGFR mutant) Diffuse midline glioma Yes No
PBTA Diffuse intrinsic pontine glioma Diffuse midline glioma No Yes
PBTA Dysembryoplastic neuroepithelial tumor (DNET) Dysembryoplastic neuroepithelial tumor No Yes
PBTA Dysembryoplastic neuroepithelial tumor (DNET);Ganglioglioma Dysembryoplastic neuroepithelial tumor No Yes
DGD EBV-Positive Diffuse Large B-Cell Lymphoma, Not Otherwise Specified EBV-Positive Diffuse Large B-Cell Lymphoma Yes No
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Diffuse midline glioma Initial CNS Tumor 501
Diffuse midline glioma Progressive 55
Diffuse midline glioma Progressive Disease Post-Mortem 12
Diffuse midline glioma Recurrence 18
Diffuse midline glioma NA 1
Dysembryoplastic neuroepithelial tumor Initial CNS Tumor 128
Dysembryoplastic neuroepithelial tumor Primary Tumor 4
Dysembryoplastic neuroepithelial tumor Progressive 22
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ those to the clinical subtypes

Adding information from the original [issue](https://github.com/AlexsLemonade/OpenPBTA-analysis/issues/751) added by @jharenza

**UPDATE 2020-10-05**
**UPDATE 2020-10-05** Update 2024-08-15: PT_V1HNAC2Q and PT_FFHQ1B9R are the same patient and this needs to be updated upstream
Below is a double-reviewed (by Cassie Kline and myself) table of histone mutations found in the specified patient tumor per the TGEN genomic reports.

Kids_First_Participant_ID | H3 Status | tumor_descriptor
-- | -- | --
PT_M23Q0DC3 | H3F3A K28M | Initial CNS Tumor
PT_9GKVQ9QS | H3F3A K28M | Initial CNS Tumor
PT_KBFM551M | H3 WT | Initial CNS Tumor
PT_KBFM551M | no report | Progressive Disease Post-Mortem
PT_V1HNAC2Q | H3F3A K28M | Initial CNS Tumor
PT_FFHQ1B9R | H3F3A K28M | Initial CNS Tumor
PT_NK8A49X5 | H3F3A K28M | Initial CNS Tumor
PT_NK8A49X5 | H3F3A K28M | Progressive
PT_KZ56XHJT | H3F3A K28M | Initial CNS Tumor
Expand Down
Loading

0 comments on commit 6203f91

Please sign in to comment.