morrislab / pairtree

Pairtree is a method for reconstructing cancer evolutionary history in individual patients, and analyzing intratumor genetic heterogeneity. Pairtree focuses on scaling to many more cancer samples and cancer cell subpopulations than other algorithms, and on producing concise and informative interactive characterizations of posterior uncertainty.
MIT License
33 stars 10 forks source link

Contiguous variant IDs enforced? #34

Closed sabackman closed 1 year ago

sabackman commented 1 year ago

Firstly, I would like to thank you for providing the community with this wonderful tool.

I recently ran into an issue while performing som exploratory analyses on a dataset from our lab. After manually dropping a cluster I believe largely consists of poor quality variants I get the following error:

File "[.......]/pairtree/pairtree/bin/../lib/inputparser.py", line 55, in load_ssms assert vids == set(range(len(variants))) AssertionError

In the readme it is stated that "The first mutation should be assigned ID s0, with subsequent variants assigned s1, s2, .... Generally, these should be contiguous, but this is not enforced [...]"

To me it seems (if my reading of the code is correct) that the above line does indeed enforce contiguous mutation IDs. Obviously this is a minor issue and easily resolved by the end user.

Best regards Samuel

ethanumn commented 1 year ago

Hi Samuel,

I'm fairly certain this assertion was meant to be taken out. I am not aware of any repercussion of doing so, and I myself have commented it out when running Pairtree. I've made the change to take it out. Thanks for spotting this!

Ethan