Commit 21954612 authored by Manuel Günther's avatar Manuel Günther
Browse files

Implemented better behavior when protocol is present; added possibility to only have 'dev' group

parent f7cb7c9f
Pipeline #6728 passed with stages
in 5 minutes and 44 seconds
This diff is collapsed.
data/model3_session1_sample1 3 3
data/model3_session1_sample2 3 3
data/model3_session1_sample3 3 3
data/model3_session2_sample1 3 3
data/model4_session1_sample1 4 4
data/model4_session1_sample2 4 4
data/model4_session1_sample3 4 4
data/model4_session2_sample1 4 4
data/model5_session1_sample1 5 5
data/model5_session1_sample2 5 5
data/model5_session1_sample3 5 5
data/model5_session2_sample1 5 5
data/model3_session3_sample1 3 3 3
data/model3_session3_sample2 3 3 3
data/model3_session3_sample3 3 3 3
data/model3_session4_sample1 3 3 3
data/model4_session3_sample1 3 3 4
data/model4_session3_sample2 3 3 4
data/model4_session3_sample1 4 4 4
data/model4_session3_sample2 4 4 4
data/model4_session3_sample3 4 4 4
data/model4_session4_sample1 4 4 4
data/model3_session3_sample1 4 4 3
data/model3_session3_sample2 4 4 3
data/model5_session3_sample1 5 3 5
data/model5_session3_sample1 5 5 5
......@@ -125,11 +125,19 @@ def test_query_protocol():
assert db.client_id_from_model_id('6', group=None) == '6'
assert db.client_id_from_t_model_id('7', group=None) == '7'
nose.tools.assert_raises(ValueError, db.objects, protocol='non-existent')
# check other protocols
assert len(db.objects(protocol='non-existent')) == 0
prot = 'example_filelist2'
assert len(db.model_ids_with_protocol(protocol=prot)) == 3 # 3 model ids for dev only
nose.tools.assert_raises(ValueError, db.model_ids_with_protocol, protocol=prot, groups='eval') # eval does not exist for this protocol
assert len(db.objects(protocol=prot, groups='dev', purposes='enroll')) == 12
assert len(db.objects(protocol=prot, groups='dev', purposes='probe')) == 9
def test_query_dense():
db = FileListBioDatabase(example_dir, 'test', probes_filename='for_probes.lst')
db = FileListBioDatabase(example_dir, 'test', use_dense_probe_file_list=True)
assert len(db.objects(groups='world')) == 8 # 8 samples in the world set
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment