Skip to content

Revise probabilities in generateErrorMat‎() #9

@gregorgorjanc

Description

@gregorgorjanc

Looking at generateErrorMat‎() we have

https://github.com/AlphaGenes/tinyhouse./blob/65456ea92e58fc40886fa1d1654b3a66443f28b4/ProbMath.py#L216C30-L216C30

def generateErrorMat(error) :
    errorMat = np.array([[1-error, error/2, error/2, error/2], 
                            [error/2, 1-error, 1-error, error/2],
                            [error/2, error/2, error/2, 1-error]], dtype = np.float32)
    errorMat = errorMat/np.sum(errorMat, 1)[:,None]
    return errorMat

I am wondering if the probabilities should actually be [1-error, error/4, error/4, error/2] so that we spread the error equally across the 3 genotypes or give user an option to declare these genotype penetrance matrices. The current probabilities are for sure odd - we take error amount from one genotype and then redistribute error/2 to the other three genotypes - aha are we doing this effectively so that we give error/2 to hets and error/2 to the other homozygote? Technically it's correct due to normalisation (in errorMat/np.sum(errorMat, 1)[:,None]).

Screenshot 2023-07-19 at 18 04 45

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions