Skip to content

Commit

Permalink
cc
Browse files Browse the repository at this point in the history
  • Loading branch information
pipaber committed Apr 30, 2024
1 parent 92b8265 commit 8b707a6
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _freeze/notebooks/TCGA/execute-results/html.json

Large diffs are not rendered by default.

Binary file modified _freeze/notebooks/TCGA/figure-html/fig-plot1-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions notebooks/TCGA.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,39 @@ ggsave(paste0(path,"samples_with_mut.jpeg"), device = "jpeg")
```

![Samples with specific mutation per gene](images/samples_with_mut.jpeg)
## Linking mutations and tumor stage

Now that we are familiarized with the mutation data, we can link mutations to the tumor stage from the patients with rectum adenocarcinoma.

We can filter the clinical data with the patients that have mutation data.

```{r}
index <- which( (var_class_df$patientID |> unique()) %in% clin$patientID)
clin_and_mutation = clin[index,]
head(clin_and_mutation)
```

We can count the number of genes with mutations per patient and then make a `left_join` to the clinical data to plot the mutated genes per tumor stage.

```{r}
#| label: fig-plot1
df = var_class_df |>
group_by(patientID) |>
summarise(n = n())
p <- clin_and_mutation |>
left_join(df, by = join_by(patientID)) |>
ggplot(aes(t_stage,log(n), fill=t_stage))+
geom_boxplot() +
geom_jitter(width = 0.05, colour="red2") +
paletteer::scale_fill_paletteer_d("awtools::a_palette")+
labs(x = "Tumor stage", y="Number of mutated genes in log scale")
p
```

0 comments on commit 8b707a6

Please sign in to comment.