Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Update integrated dx for 3 samples based on pathology review (#879)
Browse files Browse the repository at this point in the history
* add Notes, update int_dx for K28M update

* add Notes to pathology updates

* add Notes to pathology updates

* run with v17 histology file

Co-authored-by: jashapiro <josh.shapiro@ccdatalab.org>
  • Loading branch information
kgaonkar6 and jashapiro authored Jan 5, 2021
1 parent 32741a0 commit 57e947a
Show file tree
Hide file tree
Showing 7 changed files with 472 additions and 390 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ diff_subtype <- subtype %>% left_join(pnoc003_review,by=c("Kids_First_Participan
# checking for samples where clinically reviewed subtype is H3 K28M
# but molecular subtype is not DMG H3 K28
(grepl("K28M",.$`H3 Status`) & !grepl("DMG, H3 K28",molecular_subtype)) |
# checking for only RNA-Seq HGG samples where clinically reviewed subtype is H3 K28M
# but molecular subtype is HGG, To be classified
(grepl("K28M",.$`H3 Status`) & grepl("HGG, To be classified",molecular_subtype)) |
# checking for samples were clinical review was not found
grepl("no report",.$`H3 Status`) ) %>%
dplyr::select(Kids_First_Participant_ID,
Expand All @@ -141,9 +144,7 @@ diff_subtype %>%
```


Seems like 6 sample (WXS and matching RNA-Seq from PT_NK8A49X5, PT_QA9WJ679, PT_WGVEF96B) molecular subtype
need to be updated and Notes columns for these samples will be updated to capture this
information
Seems like for a subset of PNOC samples (WXS and matching RNA-Seq samples from PT_NK8A49X5, PT_QA9WJ679, PT_WGVEF96B) Notes,molecular_subtype and integrated_diagnosis will need to be updated to capture this information.

```{r}
subtype_clinical_review_df <- subtype %>%
Expand All @@ -165,20 +166,39 @@ subtype_clinical_review_df <- subtype %>%
# THEN the value in Notes will be updated to specify that the value is
# updated because of clinical review
~ paste(Notes,"Updated to DMG, H3 K28 from clinical review", sep=","),
# IF K28M in clinical review and molecular subtype is HGG, To be classified
(grepl("K28M",.$`H3 Status`) & grepl("HGG, To be classified",molecular_subtype))
# THEN the value in Notes which will be NA will need to be updated to
# specify that the it's DMG K28M from clinical review
~ paste("Updated to DMG, H3 K28 from clinical review", sep=","),
# IF clinical review and molecular subtype match OR
# no clinical review is provided then keep values from Notes
TRUE ~ Notes
),
integrated_diagnosis = case_when(
# IF we have K28M in clinical review and molecular subtype if not DMG K28M
(grepl("K28M",.$`H3 Status`) & !grepl("DMG, H3 K28",molecular_subtype))
# THEN the value in integrated_diagnosis will be updated to specify that the value is
# updated because of clinical review
~ "Diffuse midline glioma, H3 K28-mutant",
# IF clinical review and molecular subtype match OR
# no clinical review is provided then keep values from Notes
TRUE ~ integrated_diagnosis
),
molecular_subtype = case_when(
# Don't think we would need to ever change from K28 to H3 wildtype
# since there would be evidence for K28 from snv data for the sample
#(grepl("H3 WT",.$`H3 Status`) & !grepl("HGG",molecular_subtype)) ~
# gsub("DMG, H3 K28","HGG, H3 wildtype",molecular_subtype),
#
# IF we have K28M in clinical review and molecular subtype if not DMG K28M
(grepl("K28M",.$`H3 Status`) & !grepl("DMG, H3 K28",molecular_subtype)) ~
# IF we have K28M in clinical review and molecular subtype is "HGG, H3 wildtype"
(grepl("K28M",.$`H3 Status`) & grepl("HGG, H3 wildtype",molecular_subtype)) ~
# THEN the value in molecular subtype will be updated
gsub("HGG, H3 wildtype","DMG, H3 K28",molecular_subtype),
# IF we have K28M in clinical review and molecular subtype is "HGG, To be classified"
(grepl("K28M",.$`H3 Status`) & grepl("HGG, To be classified",molecular_subtype)) ~
# THEN the value in molecular subtype will be updated
gsub("HGG, To be classified","DMG, H3 K28",molecular_subtype),
# IF clinical review and molecular subtype match OR
# no clinical review is provided then keep values from molecular subtype
TRUE ~ molecular_subtype
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ compiled_df <- compiled_df %>%
molecular_subtype = case_when(
Kids_First_Participant_ID == "PT_7E3V3JFX" ~ "EPN, H3 K28",
TRUE ~ molecular_subtype
),
Notes = case_when(
Kids_First_Participant_ID == "PT_7E3V3JFX" ~ "Updated via OpenPBTA subtyping",
TRUE ~ Notes
)
)
```
Expand Down Expand Up @@ -279,7 +283,10 @@ compiled_df <- compiled_df %>%
short_histology= case_when(sample_id == "7316-272"~"ETMR",
TRUE ~ short_histology),
integrated_diagnosis = case_when(sample_id == "7316-272"~"Embryonal tumor with multilayer rosettes, C19MC-altered",
TRUE ~ integrated_diagnosis)
TRUE ~ integrated_diagnosis),
Notes = case_when(sample_id == "7316-272" ~ "Updated via OpenPBTA subtyping",
TRUE ~ Notes
)
) %>%
unique()
```
Expand Down Expand Up @@ -316,6 +323,10 @@ compiled_df <- compiled_df %>%
molecular_subtype = case_when(
sample_id == "7316-1102" ~ "DMG, H3 K28",
TRUE ~ molecular_subtype
),
Notes = case_when(
sample_id == "7316-1102" ~ "Updated via OpenPBTA subtyping",
TRUE ~ Notes
)
)
```
Expand Down Expand Up @@ -345,6 +356,10 @@ compiled_df <- compiled_df %>%
molecular_subtype = case_when(
sample_id == "7316-765" ~ "CNS HGNET-MN1",
TRUE ~ molecular_subtype
),
Notes = case_when(
sample_id == "7316-765" ~ "Updated via OpenPBTA subtyping",
TRUE ~ Notes
)
)
```
Expand Down Expand Up @@ -374,6 +389,10 @@ compiled_df <- compiled_df %>%
molecular_subtype = case_when(
sample_id == "7316-158" ~ "HGG, H3 G35",
TRUE ~ molecular_subtype
),
Notes = case_when(
sample_id == "7316-158" ~ "Updated via OpenPBTA subtyping",
TRUE ~ Notes
)
)
```
Expand Down Expand Up @@ -412,7 +431,8 @@ compiled_df <- compiled_df %>%
sample_id == "7316-229" ~ "EWS",
TRUE ~ molecular_subtype
),
Notes = case_when(sample_id == "7316-229" ~ "Updated via OpenPBTA subtyping",
Notes = case_when(
sample_id == "7316-229" ~ "Updated via OpenPBTA subtyping",
TRUE ~ Notes
)
)
Expand Down Expand Up @@ -451,6 +471,10 @@ compiled_df <- compiled_df %>%
molecular_subtype = case_when(
sample_id == "7316-238" ~ "ETMR, C19MC-altered",
TRUE ~ molecular_subtype
),
Notes = case_when(
sample_id == "7316-238" ~ "Updated via OpenPBTA subtyping",
TRUE ~ Notes
)
)
```
Expand Down Expand Up @@ -480,6 +504,9 @@ compiled_df <- compiled_df %>%
molecular_subtype = case_when(
sample_id == "7316-1105" ~ "HGG, H3 G35",
TRUE ~ molecular_subtype
),
Notes = case_when(sample_id == "7316-1105" ~ "Updated via OpenPBTA subtyping",
TRUE ~ Notes
)
)
```
Expand Down
Loading

0 comments on commit 57e947a

Please sign in to comment.