forked from virtool/workflow-pathoscope
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fixtures.py
70 lines (46 loc) · 1.38 KB
/
fixtures.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
from pathlib import Path
from types import SimpleNamespace
from typing import List
from pyfixtures import fixture
from virtool_workflow.data_model.indexes import WFIndex
@fixture
def index(indexes: List[WFIndex]):
return indexes[0]
@fixture
def intermediate():
"""A namespace for storing intermediate values."""
return SimpleNamespace(
isolate_high_scores={},
to_otus=set(),
)
@fixture
def isolate_path(work_path: Path):
path = work_path / "isolates"
path.mkdir()
return path
@fixture
def isolate_fasta_path(isolate_path: Path):
return isolate_path / "isolate_index.fa"
@fixture
def isolate_fastq_path(isolate_path: Path):
return isolate_path / "isolate_mapped.fq"
@fixture
def isolate_index_path(isolate_path: Path):
return isolate_path / "isolates"
@fixture
def isolate_sam_path(isolate_path: Path):
return isolate_path / "to_isolates.sam"
@fixture
def p_score_cutoff():
return 0.01
@fixture
def read_file_names(sample) -> str:
return ",".join(str(path) for path in sample.read_paths)
@fixture
def reassigned_sam_path(work_path: Path):
"""The path to the SAM file after Pathoscope reassignment."""
return work_path / "reassigned.sam"
@fixture
def subtracted_sam_path(work_path: Path) -> Path:
"""The path to the SAM file after subtraction reads have been eliminated."""
return work_path / "subtracted.sam"