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

ecDNA simulator #240

Merged
merged 42 commits into from
May 8, 2024
Merged

ecDNA simulator #240

merged 42 commits into from
May 8, 2024

Conversation

mattjones315
Copy link
Collaborator

@mattjones315 mattjones315 commented Apr 13, 2024

This PR implements a special simulator described in Hung*, Jones*, Wong*, Curtis* et al.

It extends the basic BirthDeathFitnessSimulator implemented Cassiopeia to simulate copy-numbers of extrachromosomal DNA (ecDNA) on top of the phylogeny. An arbitrary number of particles can be simulated according to various selection and co-segregation parameters.

It also makes a few changes to the BirthDeathFitnessSimulator to support passing in an intermediate tree. This is especially relevant when users would like to simulate experiments with different phases - for example, drug-on and drug-off cases.

Another miscellaneous change is the support for passing specific lineage_profiles for tree plotting.

Matthew Gregory Jones and others added 30 commits July 18, 2022 13:40
adding binomial segregation to it.
experimenting with BDFS
deleted unnecessary file (was just playing around with a copy of BirthDeathFitnessSimulator here, decided to go with the strategy implemented with mattjones315 in ecDNABirthDeathSimulator.py instead)
 into ecdna-simulator

 think this merge is necessary b/c i deleted ecDNA..._v2.py
 into ecdna-simulator

Reason for merge: Matt's updates to populate_tree_from_simulation
supersede mine.

Conflicts:
	cassiopeia/simulator/BirthDeathFitnessSimulator.py
	cassiopeia/simulator/ecDNABirthDeathSimulator.py
Copy link

codecov bot commented Apr 14, 2024

Codecov Report

Attention: Patch coverage is 79.18782% with 41 lines in your changes are missing coverage. Please review.

Project coverage is 79.77%. Comparing base (41dbff8) to head (8bbcd10).

❗ Current head 8bbcd10 differs from pull request most recent head fca94b2. Consider uploading reports for the commit fca94b2 to get more accurate results

Files Patch % Lines
cassiopeia/simulator/ecDNABirthDeathSimulator.py 77.14% 32 Missing ⚠️
cassiopeia/simulator/BirthDeathFitnessSimulator.py 83.33% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #240      +/-   ##
==========================================
- Coverage   79.84%   79.77%   -0.08%     
==========================================
  Files          90       91       +1     
  Lines        8173     8347     +174     
==========================================
+ Hits         6526     6659     +133     
- Misses       1647     1688      +41     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mattjones315 mattjones315 requested a review from colganwi April 16, 2024 00:03
@mattjones315
Copy link
Collaborator Author

mattjones315 commented Apr 16, 2024

Hey @colganwi --

I know that this PR is very much outside of the normal scope of Cassiopeia, but there are a few items here that are relevant to the BirthDeathSimulator. Requesting your review here just in case you want to see if any of my suggested changes would be non-optimal with how you are using Cassiopeia.

Copy link
Collaborator

@colganwi colganwi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Just added a few comments.

cassiopeia/plotting/local.py Outdated Show resolved Hide resolved
cassiopeia/simulator/BirthDeathFitnessSimulator.py Outdated Show resolved Hide resolved
cassiopeia/simulator/BirthDeathFitnessSimulator.py Outdated Show resolved Hide resolved
cassiopeia/simulator/BirthDeathFitnessSimulator.py Outdated Show resolved Hide resolved
@mattjones315
Copy link
Collaborator Author

Thanks so much for the review, @colganwi -- I believe I've addressed your comments and it looks like this is ready to be merged in!

@mattjones315 mattjones315 merged commit 78442c4 into master May 8, 2024
3 checks passed
@mattjones315 mattjones315 deleted the ecdna-simulator branch May 8, 2024 18:21
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

Successfully merging this pull request may close these issues.

3 participants