def gwas_run_kinship(meth, filtered_variation=None, out=None, comment=None): """Computes the n by n kinship matrix for a set of n related subjects. The kinship matrix defines pairwise genetic relatedness among individuals and is estimated by using all genotyped markers. This requires the filtered SNPs as input. :param filtered_variation: Population variation, filtered :type filtered_variation: kbtypes.KBaseGwasData.GwasPopulationVariation :param out: Computed Kinship matrix :type out: kbtypes.KBaseGwasData.GwasPopulationKinship :param comment: Comment :type comment: kbtypes.Unicode :return: New workspace object :rtype: kbtypes.Unicode :output_widget: ValueListWidget """ meth.stages = 3 meth.advance("init GWAS service") gc = GWAS(URLS.gwas, token=meth.token) argsx = {"ws_id" : meth.workspace_id, "inobj_id" : filtered_variation, "outobj_id" : out, "comment" : "comment"} meth.advance("submit job to select_random_snps") try: jid = gc.calculate_kinship_matrix(argsx) except Exception as err: raise GWASException("submit job failed: {}".format(err)) if not jid: raise GWASException(2, "submit job failed, no job id") AweJob.URL = URLS.awe AweJob(meth, started="Calculate Kinship matrix", running="Kinship matrix").run(jid[0]) return _workspace_output(out)
def gwas_run_kinship(meth, filtered_variation=None, out=None, comment=None): """Computes the n by n kinship matrix for a set of n related subjects. The kinship matrix defines pairwise genetic relatedness among individuals and is estimated by using all genotyped markers. This requires the filtered SNPs as input. :param filtered_variation: Population variation, filtered :type filtered_variation: kbtypes.KBaseGwasData.GwasPopulationVariation :param out: Computed Kinship matrix :type out: kbtypes.KBaseGwasData.GwasPopulationKinship :param comment: Comment :type comment: kbtypes.Unicode :return: New workspace object :rtype: kbtypes.Unicode :output_widget: ValueListWidget """ meth.stages = 3 meth.advance("init GWAS service") gc = GWAS(URLS.gwas, token=meth.token) argsx = { "ws_id": meth.workspace_id, "inobj_id": filtered_variation, "outobj_id": out, "comment": "comment" } meth.advance("submit job to select_random_snps") try: jid = gc.calculate_kinship_matrix(argsx) except Exception as err: raise GWASException("submit job failed: {}".format(err)) if not jid: raise GWASException(2, "submit job failed, no job id") AweJob.URL = URLS.awe AweJob(meth, started="Calculate Kinship matrix", running="Kinship matrix").run(jid[0]) return _workspace_output(out)