コード例 #1
0
def test_read_in_ids_tsv_keep_separated(ids_tsv):
    sample_dict = read_in_ids(ids_tsv, keep_separated=True)
    assert len(sample_dict) == 2
    assert 'Sample1' in sample_dict
    assert set(sample_dict['Sample1']) == {'K00001', 'K00002'}
    assert 'Sample2' in sample_dict
    assert set(sample_dict['Sample2']) == {'K00001', 'K00003'}
コード例 #2
0
def test_read_in_ids_tsv(ids_tsv, list_of_kos):
    ids = read_in_ids(ids_tsv, name='Sample1')
    assert len(ids) == 1
    assert set(ids['Sample1']) == set(list_of_kos)
コード例 #3
0
def test_read_in_ids_bad_ending():
    with pytest.raises(ValueError):
        ids = read_in_ids('fake.xkcd')
コード例 #4
0
def test_read_in_ids_txt(ids_txt, list_of_kos):
    ids = read_in_ids(ids_txt, name='Sample1')
    assert len(ids) == 1
    assert ids['Sample1'] == set(list_of_kos)
コード例 #5
0
def test_read_in_ids_biom(ids_biom, list_of_kos):
    ids = read_in_ids(ids_biom, keep_separated=False, name='Sample1')
    assert len(ids) == 1
    assert set(ids['Sample1']) == set(list_of_kos)