-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (28 loc) · 1.19 KB
/
Makefile
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
# Makefile
.PHONY: test update_db type process summarize
clean:
rm -rf test/SRR26510933/
# Combined test target to run all steps
# test: serotyping processing summarizing
test: serotyping md5serotypecheck processing md5processcheck
# Step 1: Run the typing process
serotyping:
@BIN_PATH=$$(dirname $$(which python)) && \
echo "Conda environment bin path: $$BIN_PATH" && \
python3 ecolityping.py -i SRR26510933 -R1 test/SRR26510933_1_subset.fastq.gz -R2 test/SRR26510933_2_subset.fastq.gz -db db -k "$$BIN_PATH" -o test --update no
# Step 2: Check MD5 checksum
md5serotypecheck:
cd test && \
gzip -d SRR26510933/sp_ecoli_fbi/*.gz && \
md5sum -c Serotypesums.md5
# Step 3: Run the post-processing
processing:
python3 postecolityping.py -i SRR26510933 -d test -stbit "STNA;NA:NA"
# Step 4: Check MD5 checksum - but remove variable date to accurately represent MD5sum
md5processcheck:
cd test && \
sed -i -E 's/(\"wgsdate\":\s?\")(.{14})(.*)/\1\3/' SRR26510933/SRR26510933.json && \
awk -v OFS="\t" '{$$(11)=""; print $0}' SRR26510933/SRR26510933.tsv > SRR26510933/SRR26510933v2.tsv && \
md5sum SRR26510933/SRR26510933.json && \
md5sum SRR26510933/SRR26510933v2.tsv && \
md5sum -c Processsums.md5