Add alternative allele probability input#15
Add alternative allele probability input#15gregorgorjanc merged 3 commits intoAlphaGenes:feat_metafoundersfrom
Conversation
RosCraddock
left a comment
There was a problem hiding this comment.
Just a couple of questions/comments from me. But as always, very nicely written code!
Pedigree.py
Outdated
| self.individuals[idx] = self.constructor(idx, self.maxIdn) | ||
|
|
||
| # check if the individual is a metafounder | ||
| if idx is not None and idx[:3] != "MF_": |
There was a problem hiding this comment.
I may be reading this wrong, so do correct me if I am.
Here, we are reading in the pedigree with idx equal to an individual's id (taken from the first column of the inputted pedigree data). Thus, we should not have any idx that are equal to "MF_" since the metafounders will not have individual records. However, this if statement produces an error if the idx is not equal to "MF_". Instead, should it be is equal to, so: idx[:3] == "MF_"?
There was a problem hiding this comment.
(Edited) Sorry, I just recalled the meaning of this if condition. You are right, I should simply change the unequal sign to the equal sign.
Pedigree.py
Outdated
| default_aap = True | ||
|
|
||
| for value in data_list: | ||
| idx, data = value |
There was a problem hiding this comment.
This function reads in the user-inputted alternative allele probabilities for each metafounder. The first column is the defined metafounder (MF_x), and the remaining columns include the alternative allele probability at each locus. So, here idx is equal to MF_x. If so, would it be better to change idx to mfx to avoid confusion with the user-inputted pedigree id?
There was a problem hiding this comment.
Good idea, I will change it in the next commit.
Pedigree.py
Outdated
| self.individuals[idx] = self.constructor(idx, self.maxIdn) | ||
|
|
||
| # check if the individual is a metafounder | ||
| if idx is not None and idx[:3] != "MF_": |
There was a problem hiding this comment.
(Edited) Sorry, I just recalled the meaning of this if condition. You are right, I should simply change the unequal sign to the equal sign.
Pedigree.py
Outdated
| default_aap = True | ||
|
|
||
| for value in data_list: | ||
| idx, data = value |
There was a problem hiding this comment.
Good idea, I will change it in the next commit.
RosCraddock
left a comment
There was a problem hiding this comment.
Quick fix, thank you!
| self.MainMetaFounder = None | ||
| self.AAP = {} | ||
|
|
||
| # remove? |
There was a problem hiding this comment.
@XingerTang about this comment (remove?) are you thinking of removing self.maf? If so, where would we be storing maf?
There was a problem hiding this comment.
@gregorgorjanc In alphapeel the maf are stored in the peelingInfo, and this self.maf is not used. But I don't know about other software so I put a question mark.
@gregorgorjanc
Could you merge this in so that we can test the code update with
AlphaPeeltests