DanielSeidman / MutationScripts

0 stars 0 forks source link

No use of the IBD segment inputs? #2

Open gtsambos opened 4 weeks ago

gtsambos commented 4 weeks ago

The SegSiteStructure objects (defined here) look like they're intended to hold the lists of ordered IBD segments in a dictionary object called seg_map. It looks like the updateSegs method (defined here) can be used to populate this segment map. At the moment, I don't think it's being used anywhere. (Searching for 'updateSegs didn't yield any hits in the script)). Because of this, the seg_map object appears to be empty at all parts of the algorithm. ( I've made a branch called seg-map with some print statements that show this behaviour.)

This impacts the log-likelihood calculation via the is_ibd method of the SegSiteStructure objects defined here. It looks like this method is used to check whether the focal sample, original_id, shares any IBD segments with other samples in the 'inner pedigree', and if true, the ibd_probability is calculated differently. The print statements that I've put in the new branch show that, at the moment, this function is only ever returning True when you pass the an identical sample and haplotype into the method. It appears to be missing all of the genuine IBD segments relating different samples to each other.

Two related but possibly smaller points:

gtsambos commented 4 weeks ago

oops, forgot to link to the branch with the print statements! Here it is

https://github.com/gtsambos/jay-ped-edits/tree/seg-map