forked from zktuong/dandelion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_query.py
47 lines (44 loc) · 1.56 KB
/
test_query.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env python
import dandelion as ddl
import pytest
@pytest.mark.usefixtures("airr_generic")
def test_query(airr_generic):
"""test query and update_metadata functions"""
vdj = ddl.Dandelion(airr_generic)
ddl.pp.check_contigs(vdj)
vdj.update_metadata(retrieve="umi_count", retrieve_mode="split and sum")
vdj.update_metadata(retrieve="umi_count", retrieve_mode="sum")
vdj.update_metadata(retrieve="umi_count", retrieve_mode="average")
vdj.update_metadata(retrieve="np2_length", retrieve_mode="split and sum")
vdj.update_metadata(retrieve="np2_length", retrieve_mode="average")
vdj.update_metadata(retrieve="np2_length", retrieve_mode="sum")
vdj.update_metadata(
retrieve="junction_aa",
retrieve_mode="split and unique only",
by_celltype=True,
)
vdj.update_metadata(
retrieve="junction_aa",
retrieve_mode="merge and unique only",
by_celltype=True,
)
vdj.update_metadata(
retrieve="junction_aa", retrieve_mode="merge", by_celltype=True
)
vdj.update_metadata(
retrieve="junction_aa", retrieve_mode="split", by_celltype=True
)
vdj.update_metadata(
retrieve="np2_length",
retrieve_mode="split and average",
by_celltype=True,
)
vdj.update_metadata(
retrieve="np2_length", retrieve_mode="sum", by_celltype=True
)
vdj.update_metadata(
retrieve="np2_length", retrieve_mode="average", by_celltype=True
)
vdj.update_metadata(
retrieve="np2_length", retrieve_mode="split", by_celltype=True
)