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

Commit

Permalink
Tp53 loss status update: bug fix (#942)
Browse files Browse the repository at this point in the history
* ficing bug

* removing incorrect commited files

* summarize to max within 1 and 0

* Update README.md

* resize plots
  • Loading branch information
kgaonkar6 authored Feb 17, 2021
1 parent ce57f8c commit 532c29a
Show file tree
Hide file tree
Showing 4 changed files with 369 additions and 358 deletions.
24 changes: 12 additions & 12 deletions analyses/tp53_nf1_score/04-tp53-altered-annotation.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,7 @@ tp53_alterations_dna <- histology %>%
# join filtered cnv losses
left_join(cnv_domain_overlap,by=c("Kids_First_Biospecimen_ID"="biospecimen_id",
"sample_id")) %>%
rename(Kids_First_Biospecimen_ID_DNA = Kids_First_Biospecimen_ID) %>%
replace_na(list(hotspot = 0, activating = 0))
rename(Kids_First_Biospecimen_ID_DNA = Kids_First_Biospecimen_ID)
tp53_alterations_score <- tp53_alterations_dna %>%
# add classifier score
Expand All @@ -197,7 +196,8 @@ tp53_alterations_score <- tp53_alterations_dna %>%
select(sample_id,Kids_First_Biospecimen_ID_RNA,Kids_First_Biospecimen_ID_DNA,
tp53_score,cancer_predispositions,HGVSp_Short,copy_number,hotspot,activating) %>%
arrange(sample_id) %>%
unique()
unique() %>%
replace_na(list(hotspot = 0, activating = 0))
tp53_alterations_score
Expand All @@ -224,8 +224,8 @@ tp53_alterations_score_wide <- tp53_alterations_score %>%
HGVSp_Short = toString(unique(HGVSp_Short)),
CNV_loss_evidence = toString(unique(copy_number)),
# summarize unique hotspot values per sample_id
hotspot = toString(unique(hotspot[!is.na(hotspot) ])),
activating = toString(unique(activating[!is.na(activating)])))
hotspot = max(unique(hotspot[!is.na(hotspot) ])),
activating = max(unique(activating[!is.na(activating)])))
tp53_alterations_score_wide
Expand All @@ -242,16 +242,16 @@ tp53_alterations_score_wide <- tp53_alterations_score_wide %>%
# add tp53_altered annotation column
tp53_altered =
case_when(
# when activating == ""
activating == "" &
# when activating == 0
activating == 0 &
# check if mutated variant AA position overlaps hotspot database
( hotspot == 1 |
# check if sample_id has SNV+CNV mutation
# suggesting both alleles are mutated
(SNV_indel_counts >= 1 & CNV_loss_counts >=1) |
# check if more than 1 SNV is present
# suggesting both alleles are mutated
SNV_indel_counts >= 1 |
SNV_indel_counts > 1 |
# check if SNV mutant and has
# Li-Fraumeni syndrome suggesting
# germline TP53 mutant as cancer predisposition
Expand Down Expand Up @@ -283,7 +283,7 @@ tp53_alterations_score_wide <- tp53_alterations_score_wide %>%

## Explore distribution of tp53_altered status vs tp53 inactivation scores

```{r}
```{r, out.width="50%"}
ggplot(tp53_alterations_score_wide, aes(x = factor(tp53_altered), y = tp53_score)) +
geom_violin()+
geom_jitter(alpha = 0.5, width = 0.2) +
Expand Down Expand Up @@ -318,7 +318,7 @@ stranded_tp53 <- as.data.frame(subset_stranded) %>%

Plot distribution of TP53 gene expression (stranded)

```{r}
```{r, out.width="50%"}
ggplot(stranded_tp53, aes(x = factor(tp53_altered), y = TP53)) +
geom_violin()+
Expand Down Expand Up @@ -350,7 +350,7 @@ polya_tp53<- as.data.frame(subset_polya) %>%

Plot distribution of TP53 gene expression (poly-a)

```{r}
```{r, out.width="50%" }
ggplot(polya_tp53, aes(x = factor(tp53_altered), y = TP53)) +
geom_violin()+
Expand All @@ -365,7 +365,7 @@ ggplot(polya_tp53, aes(x = factor(tp53_altered), y = TP53)) +

### Check if other cancer predisposition have high TP53 inactivation scores

```{r}
```{r ,out.width="50%"}
ggplot(tp53_alterations_score_wide, aes(x = factor(tp53_altered), y = tp53_score)) +
geom_violin()+
Expand Down
130 changes: 70 additions & 60 deletions analyses/tp53_nf1_score/04-tp53-altered-annotation.nb.html

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion analyses/tp53_nf1_score/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ SNV_indel_counts | Number of deleterious SNVs found in DNA sample
CNV_loss_counts | Number of CNV losses found in DNA sample
HGVSp_Short | Short format of protein level change used as SNV evidence
CNV_loss_evidence | copy_number of CNV overlapping functional domains of TP53 used as evidence
hotspot activating | Hotspot status from MSKCC cancer hotspot [database](https://www.cancerhotspots.org/#/home)
hotspot | Any 1 SNV shown in HGVSp_Short overlaps MSKCC cancer hotspot [database](https://www.cancerhotspots.org/#/home)
activating | Any 1 SNV shown in HGVSp_Short overlaps TP53_ activating mutations R273C and R248W. [Reference](https://pubmed.ncbi.nlm.nih.gov/17417627/) and [reference](https://pubmed.ncbi.nlm.nih.gov/24677579/).
tp53_altered | Combined evidence, cancer predisposition and score based tp53 status


Expand Down
Loading

0 comments on commit 532c29a

Please sign in to comment.