This repository was archived by the owner on Jun 17, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yml
More file actions
139 lines (119 loc) · 4.46 KB
/
Taskfile.yml
File metadata and controls
139 lines (119 loc) · 4.46 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
version: "3"
interval: 100ms
env:
PGO_DATA_DIR: tmp/pgo-data
BIN_EXTRAS: "--features build-binary --bin timsquery"
dotenv: [".env"]
tasks:
default:
watch: true
sources:
- "src/**/*.rs"
cmds:
- task: bin-build
- task: lib-build
- task: test
- task: fmt
- task: clippy
bin-build:
cmds:
- cargo build $BIN_EXTRAS
bin-build-release:
deps: [test, fmt]
sources:
- "src/**/*.rs"
cmds:
- cargo b --release --features build-binary --bin timsquery
lib-build:
cmds:
- cargo build --lib
license_check:
cmds:
- cargo deny check
test:
cmds:
- cargo test
fmt:
cmds:
- cargo +nightly fmt
clippy:
cmds:
- cargo clippy {{.CLI_ARGS}}
bench:
cmds:
- task: bench-build
- task: bench-small-data
- task: bench-large-data
bench-build:
sources:
- "src/**/*.rs"
cmds:
- cargo b --release --features bench --bin benchmark_indices
bench-small-data:
deps: [bench-build]
sources:
- "src/**/*.rs"
- "data/230510_PRTC_13_S1-B1_1_12817.d"
- "benches/plot_bench.py"
cmds:
- SKIP_SLOW=1 SKIP_BUILD=1 RUST_BACKTRACE=full TIMS_DATA_FILE=./data/230510_PRTC_13_S1-B1_1_12817.d ./target/release/benchmark_indices
- uv run benches/plot_bench.py data/benchmark_results_230510_PRTC_13_S1-B1_1_12817.json
bench-large-data:
deps: [bench-build]
sources:
- "src/**/*.rs"
- "data/LFQ_timsTOFPro_diaPASEF_Condition_A_Sample_Alpha_02.d"
- "benches/plot_bench.py"
cmds:
- SKIP_SLOW=1 SKIP_BUILD=1 SKIP_HIGHMEM=1 RUST_BACKTRACE=full TIMS_DATA_FILE=./data/LFQ_timsTOFPro_diaPASEF_Condition_A_Sample_Alpha_02.d ./target/release/benchmark_indices
- uv run benches/plot_bench.py data/benchmark_results_LFQ_timsTOFPro_diaPASEF_Condition_A_Sample_Alpha_02.json
plot:
deps: [bin-build-release]
sources:
- "data/sageresults/**/*.py"
- "src/**/*.rs"
cmds:
- for: ["expanded-raw-frame-index", "transposed-quad-index"]
cmd: ./target/release/timsquery query-index
--aggregator multi-cmg-stats --format pretty-json
--raw-file-path ./data/230510_PRTC_13_S1-B1_1_12817.d
--tolerance-settings-path "templates/tolerance_settings.json"
--elution-groups-path "./data/sageresults/ubb_elution_groups.json"
--output-path "./data/sageresults/{{ .ITEM }}_query_results"
--index {{ .ITEM }}
- for: ["expanded-raw-frame-index", "transposed-quad-index"]
cmd: cd data/sageresults &&
uv run plot.py
--query-results {{ .ITEM }}_query_results/results.json
--elution-groups ubb_elution_groups.json
--output ubb_peptide_plot{{ .ITEM }}.png
templates:
sources:
- "src/**/*.rs"
cmds:
- cargo run $BIN_EXTRAS -- write-template --output-path templates --num-elution-groups 10000
compiler-versions:
requires:
vars: [PROFDATA_EXE]
# PROFDATA_EXE=/Users/myuser/.rustup/toolchains/{toolchain}/lib/rustlib/{arch-triple}/bin/llvm-profdata
cmds:
- rustc --version --verbose
- cargo --version
pgo-build:
deps: [templates, compiler-versions]
requires:
vars: [RUST_LOG, TIMS_DATA_FILE, PROFDATA_EXE]
cmds:
- mkdir -p $PGO_DATA_DIR
- rm -rf $PGO_DATA_DIR/*
- rm -f ./target/release/timsquery
- RUSTFLAGS="-Cprofile-generate=$PGO_DATA_DIR" cargo build --release $BIN_EXTRAS
- ./target/release/timsquery query-index --raw-file-path $TIMS_DATA_FILE --tolerance-settings-path "templates/tolerance_settings.json" --elution-groups-path "templates/elution_groups.json" --output-path . --pretty --index transposed-quad-index --aggregator chromato-mobilogram-stat
# TODO add more data/run types.
# - ./target/release/timsquery mydata2.csv
# - ./target/release/timsquery mydata3.csv
- ls -lcth $PGO_DATA_DIR
- $PROFDATA_EXE merge -o $PGO_DATA_DIR/merged.profdata $PGO_DATA_DIR && ls -lcth $PGO_DATA_DIR
- RUSTFLAGS="-Cprofile-use=${PWD}/${PGO_DATA_DIR}/merged.profdata -Cllvm-args=-pgo-warn-missing-function" cargo build $BIN_EXTRAS --release
- ./target/release/timsquery query-index --raw-file-path $TIMS_DATA_FILE --tolerance-settings-path "templates/tolerance_settings.json" --elution-groups-path "templates/elution_groups.json" --output-path . --pretty --index transposed-quad-index --aggregator chromato-mobilogram-stat
# TODO make this multi-platform