def test_references(self): """ List references: GET /references """ beacons = Beacon() res = beacons.references() print res self.assertTrue(len(res) > 0)
def test_chromosomes(self): """ List chromosomes: GET /chromosomes """ beacons = Beacon() res = beacons.chromosomes() print res self.assertTrue(len(res) > 0)
def test_alleles(self): """ List alleles: GET /alleles """ beacons = Beacon() res = beacons.alleles() print res self.assertTrue(len(res) > 0)
def test_beacon_get(self): """ Shows a beacon: GET /beacons/{beacon} """ beacons = Beacon() res = beacons.beacon("amplab") print beacons.beaconToString(res) self.assertTrue(len(res.name) > 0)
def test_org_get(self): """ Shows an organization: GET /organizations/{organization} """ beacons = Beacon() res = beacons.organization("agha") print beacons.orgToString(res) self.assertTrue(len(res.name) > 0)
def test_search(self): """ http://beacon-network.org/#/search?pos=32936732&chrom=13&allele=C&ref=G&rs=GRCh37 :return: """ beacon = Beacon() res = beacon.search(chrom=13, pos=32936732, allele='C', ref='G') print res self.assertTrue(len(res) > 0)
def test_org_list(self): """ Lists organizations: GET /organizations """ beacons = Beacon() res = beacons.organizationList() for org in res: print beacons.orgToString(org) self.assertTrue(len(res) > 0) self.assertTrue(len(res[0].name) > 0)
def test_beacons_list(self): """ List beacons: GET /beacons """ beacons = Beacon() res = beacons.beaconList() for b in res: print beacons.beaconToString(b) self.assertTrue(len(res) > 0) self.assertTrue(len(res[0].name) > 0)
def test_referencesBeacon(self): """ Queries beacons: GET /responses/{beacon} https://beacon-network.org/api/responses/brca-exchange?chrom=17&pos=41244981&allele=G&ref=GRCh37 """ beacons = Beacon() res = beacons.responsesBeacon(chrom=17, pos=41244981, allele='G', ref='GRCh37', beacon="brca-exchange") print res self.assertTrue(len(res) > 0)
def test_references(self): """ Queries beacons: GET /responses https://beacon-network.org/api/responses?chrom=17&pos=41244981&allele=G&ref=GRCh37&beacon=[amplab,brca-exchange] """ beacons = Beacon() res = beacons.responses(chrom=17, pos=41244981, allele='G', ref='GRCh37', beacon=["amplab", "brca-exchange"]) print res self.assertTrue(len(res) > 0)
env = Env(np.array([0, 0]), obstacle_corners=[]) data['environment'].append(env.toJson()) # %%Parameter initialization max_range = 3 _xi_max = 1 _d_perf = 0.1 _d_none = 2.5 _delta_expl_angle = 0 #np.pi/4 #np.pi/6 _K_o = 0.9 N_mins = 6 file_path = r'json_files\line_explore_test123.json' dt = 0.01 scs = SCS(Beacon.get_ID(), max_range, xi_max=_xi_max, d_perf=_d_perf, d_none=_d_none) """ Line exploration """ mins = [ Min(Beacon.get_ID(), max_range, DeploymentFSM(NoFollow(), LineExplore(kind=LineExploreKind.ONE_DIM_LOCAL, )), xi_max=_xi_max, d_perf=_d_perf, d_none=_d_none) for i in range(N_mins) ]
) data['environment'].append(env.toJson()) # %%Parameter initialization max_range = 3 _xi_max = 1 _d_perf = 0.1 _d_none = 2.5 _delta_expl_angle = 0 #np.pi/4 #np.pi/6 _K_o = 0.9 N_mins = 6 file_path = r'json_files\ds_test_123.json' dt = 0.01 scs = SCS(Beacon.get_ID(), max_range) """ Potential fields exploration """ mins = [ Min(Beacon.get_ID(), max_range, DeploymentFSM( NewAttractiveFollow(K_o=_K_o), NewPotentialFieldsExplore( K_o=_K_o, target_point_or_line=NewPotentialFieldsExplore.Target.LINE) ), xi_max=_xi_max, d_perf=_d_perf, d_none=_d_none, delta_expl_angle=_delta_expl_angle) for i in range(N_mins) ]