jeromekelleher / sc2ts

Infer a succinct tree sequence from SARS-COV-2 variation data
MIT License
4 stars 3 forks source link

Add extra MRCA information to export_recombinants #116

Closed hyanwong closed 1 year ago

hyanwong commented 1 year ago

This adds the MRCA time and num path nodes to the export_recombinants function. However, I want to also plot the times etc for non-HMM-consistent recombination nodes, and for nodes with > 2 parents (displayed in different point colours in the plot), so I have added the extra params restrict_to_hmm_consistent (default True) and max_num_parents (default 2) to the function call. When these are used, a slightly different set of columns are returned, as some do not make sense any more.

If this is too confusing, I could create a different export function instead, for the MRCA data. However, I think in the future we might well want to grab information for recombination nodes with multiple breakpoints, so the flexibility seems sensible to me.