Skip to content

Commit ccc00a6

Browse files
committed
Migration graph determined more carefully
1 parent 91e5d24 commit ccc00a6

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/simulation/celltree.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -735,9 +735,18 @@ MigrationGraph CellTree::getObservedMigrationGraph() const
735735
mutations.insert(cell.getPassengerMutations().begin(),
736736
cell.getPassengerMutations().end());
737737

738+
IntSet mappedMutations;
739+
for (int j : mutations)
740+
{
741+
if (_cellTreeMutationToObservableMutation.count(i))
742+
{
743+
mappedMutations.insert(_cellTreeMutationToObservableMutation.find(j)->second);
744+
}
745+
}
746+
738747
IntSet X;
739-
std::set_intersection(mutations.begin(),
740-
mutations.end(),
748+
std::set_intersection(mappedMutations.begin(),
749+
mappedMutations.end(),
741750
_sampledMutationsByAnatomicalSite[t].begin(),
742751
_sampledMutationsByAnatomicalSite[t].end(),
743752
std::inserter(X, X.begin()));
@@ -755,7 +764,7 @@ MigrationGraph CellTree::getObservedMigrationGraph() const
755764
std::cout << " " << i;
756765
}
757766
std::cout << "; mutations in migrating cell: ";
758-
for (int i : mutations)
767+
for (int i : mappedMutations)
759768
{
760769
std::cout << " " << i;
761770
}

0 commit comments

Comments
 (0)