individuals. To register this dependency and how the dependency was established, each DataSample object is linked with an action to the the relevant Individual instance. Mainly for historical reasons, the action is thought as an arrow that starts from the 'newer' object, the GenotypeDataSample instance in this case, and has as a 'target' the object on which the process operated. It is, essentially, a representation of the 'inverse' of the creation process. .. todo:: uhmmm, not sure that the Action explanation above is crystal clear :-). """ mset.load_markers() kb.update_snp_positions(mset.markers, ref_genome) data_sample_by_id = {} family = [] for i, ind in enumerate(kb.get_individuals(study)): family.append(ind) action = kb.create_an_action(study, target=ind, doc='fake dataset') conf = {'label' : 'taq-%03d' % i, 'status' : kb.DataSampleStatus.USABLE, 'action' : action, 'snpMarkersSet' : mset} data_sample = kb.factory.create(kb.GenotypeDataSample, conf).save() probs, conf = make_fake_data(mset) do = kb.add_gdo_data_object(action, data_sample, probs, conf) data_sample_by_id[ind.id] = data_sample """ ..
individuals. To register this dependency and how the dependency was established, each DataSample object is linked with an action to the the relevant Individual instance. Mainly for historical reasons, the action is thought as an arrow that starts from the 'newer' object, the GenotypeDataSample instance in this case, and has as a 'target' the object on which the process operated. It is, essentially, a representation of the 'inverse' of the creation process. .. todo:: uhmmm, not sure that the Action explanation above is crystal clear :-). """ mset.load_markers() kb.update_snp_positions(mset.markers, ref_genome) data_sample_by_id = {} family = [] for i, ind in enumerate(kb.get_individuals(study)): family.append(ind) action = kb.create_an_action(study, target=ind, doc='fake dataset') conf = { 'label': 'taq-%03d' % i, 'status': kb.DataSampleStatus.USABLE, 'action': action, 'snpMarkersSet': mset } data_sample = kb.factory.create(kb.GenotypeDataSample, conf).save() probs, conf = make_fake_data(mset) do = kb.add_gdo_data_object(action, data_sample, probs, conf) data_sample_by_id[ind.id] = data_sample