I-variate fixed effects interaction test for phenotype specific SNP effects

    Args:
        snps:   [N x S] SP.array of S SNPs for N individuals (test SNPs)
        pheno:  [N x 1] SP.array of 1 phenotype for N individuals
        Inter:  [N x I] SP.array of I interaction variables to be tested for N
                        individuals (optional). If not provided, only the SNP is
                        included in the null model.
        Inter0: [N x I0] SP.array of I0 interaction variables to be included in the
                         background model when testing for interaction with Inter
        covs:   [N x D] SP.array of D covariates for N individuals
        K:      [N x N] SP.array of LMM-covariance/kinship koefficients (optional)
                        If not provided, then linear regression analysis is performed
        test:    'lrt' for likelihood ratio test (default) or 'f' for F-test

    Returns:
        limix LMM object

def simple_interaction(snps,pheno,Inter,Inter0=None,covs = None,K=None,test='lrt'):
    """
    I-variate fixed effects interaction test for phenotype specific SNP effects

    Args:
        snps:   [N x S] SP.array of S SNPs for N individuals (test SNPs)
        pheno:  [N x 1] SP.array of 1 phenotype for N individuals
        Inter:  [N x I] SP.array of I interaction variables to be tested for N
                        individuals (optional). If not provided, only the SNP is
                        included in the null model.
        Inter0: [N x I0] SP.array of I0 interaction variables to be included in the
                         background model when testing for interaction with Inter
        covs:   [N x D] SP.array of D covariates for N individuals
        K:      [N x N] SP.array of LMM-covariance/kinship koefficients (optional)
                        If not provided, then linear regression analysis is performed
        test:    'lrt' for likelihood ratio test (default) or 'f' for F-test

    Returns:
        limix LMM object
    """
    N=snps.shape[0]
    if covs is None:
        covs = SP.ones((N,1))
    if K is None:
        K = SP.eye(N)
    if Inter0 is None:
        Inter0=SP.ones([N,1])
    assert (pheno.shape[0]==N and K.shape[0]==N and K.shape[1]==N and covs.shape[0]==N and Inter0.shape[0]==N and Inter.shape[0]==N), "shapes missmatch"
    lmi = limix.CInteractLMM()
    lmi.setK(K)
    lmi.setSNPs(snps)
    lmi.setPheno(pheno)
    lmi.setCovs(covs)
    lmi.setInter0(Inter0)
    lmi.setInter(Inter)
    if test=='lrt':
        lmi.setTestStatistics(0)
    elif test=='f':
        lmi.setTestStatistics(1)
    else:
        print(test)
        raise NotImplementedError("only f or lrt are implemented")
    lmi.process()
    return lmi