Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clones in pseudobulk vs. tumour phylogeny #28

Closed
WalterMuskovic opened this issue Apr 6, 2022 · 3 comments
Closed

Clones in pseudobulk vs. tumour phylogeny #28

WalterMuskovic opened this issue Apr 6, 2022 · 3 comments

Comments

@WalterMuskovic
Copy link

Hi Teng,

This is more of a question than an issue, sorry if I've missed something obvious about it in the docs. I'm trying to visually assess each clone's CNVs using

nb$bulk_clones %>% 
  plot_bulks(
    min_LLR = 50, # filtering CNVs by evidence
    legend = TRUE
    )

which produces the following plot:

bulk_clones

But I've noticed the number of clones (9) doesn't match the clones I visualise with

nb$mut_graph %>% plot_mut_history()

tree

which has 7. Do you have any info on why the clones in each plot are different? And is it possible to produce a plot like that above with plot_bulks() for the same 7 clones that are presented in the phylogeny? My goal is just to visually assess the CNVs for each clone to try and get a feel for whether I need to adjust any of the run parameters.

Thanks again for your help.

@teng-gao
Copy link
Collaborator

teng-gao commented Apr 6, 2022

Hi Walter,

This is definitely a valid question. The mutation history does not agree with the clone pseudobulks because the clones are defined based on the lineage estimated from the previous iteration. For example, if you read in mut_graph_1.rds and plot that using plot_mut_history(), you should see 9 clones instead of 7. Does this make sense?

I'm trying to decide whether it would make sense to add a final per-clone CNV retest procedure (https://github.com/kharchenkolab/numbat/blob/devel/R/main.R#L215-L246) after the final iteration, so that the final clone pseudobulk profiles will be consistent with the mutation history. Alternatively, one can run more iterations until the phylogeny stabilizes, so that the clones will be exactly the same between the current iteration and the previous one.

Thanks,
Teng

@WalterMuskovic
Copy link
Author

Thanks Teng that makes a lot of sense! While following your suggestion and plotting mut_graph_1.rds I realised I'd overlooked the default value of the second argument in Numbat$new(out_dir, i = 2) and have been visualising the results of iterations 1 an 2 (9 and 7 clones defined respectively):

# Plot tumour phylogenies for each iteration
library(tidyverse)
lapply(str_glue('~/Downloads/mut_graph_{1:5}.rds'), readRDS) %>%
  lapply(plot_mut_history) %>%
  wrap_plots(ncol=3) + 
  plot_annotation(title = 'Clones defined for each iteration',
                  tag_levels = c('1'))

iteration_clones

But for this sample the phylogeny seems to become more stable after a few additional iterations:

# Plot the relationship between clones across iterations with clustree
library(clustree)
lapply(1:5, function(i){
  read_tsv(str_glue("~/Downloads/clone_post_{i}.tsv")) %>%
  select(cell,clone_opt) %>%
  rename(!!str_glue('Iteration{i}') := clone_opt)
  }) %>%
  reduce(inner_join, by="cell") %>%
  clustree("Iteration") +
  ggtitle("Relationships between clones defined in each iteration")

clustree_numbat_clones

Numbat is producing some useful insights into the clonal structure of our brain cancer samples, so thanks again for a great piece of software!

@teng-gao
Copy link
Collaborator

teng-gao commented Apr 8, 2022

Thanks Walter, really cool plot by the way!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants