Beispiel #1
0
                        if args.outcome in x.phenotypes]

# Read SGS data
print 'Reading SGS data'
sgs = read_germline(args.sgs)

print 'Updating references'
sgs.update_segment_references(peds)


print 'Fitting polygenic model'
null_model = MixedModel(peds, outcome=args.outcome, fixed_effects=args.fixefs)
null_model.add_genetic_effect()
null_model.fit_model()
null_model.maximize(method=args.maxmethod, verbose=args.verbose)
null_model.summary()
llik_null = null_model.loglikelihood()
print 'Done'

analysis_individuals = null_model.observations()


def vc_linkage(locus):
    ibd_model = MixedModel(
        peds, outcome=args.outcome, fixed_effects=args.fixefs)
    add_relat_mat = null_model.covariance_matrices[0]
    additive = RandomEffect(analysis_individuals,
                            'additive',
                            incidence_matrix='eye',
                            covariance_matrix=add_relat_mat)
    ibdmat = sgs.ibd_matrix(analysis_individuals,