-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgenerate_advanced_usage.sh
74 lines (62 loc) · 1.67 KB
/
generate_advanced_usage.sh
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
#! /bin/bash
set -e
cargo build
rm book/src/advanced_usage.md
cp advanced_usage.template book/src/advanced_usage.md
doc_file=book/src/advanced_usage.md
echo "" >> ${doc_file}
echo "" >> ${doc_file}
echo "\`\`\`text" >> ${doc_file}
./target/debug/modkit --help >> ${doc_file}
echo "\`\`\`" >> ${doc_file}
subcommands=(
"pileup"
"adjust-mods"
"update-tags"
"sample-probs"
"summary"
"call-mods"
"repair"
"validate"
"pileup-hemi"
"entropy"
"localize"
"stats"
)
for cmd in "${subcommands[@]}"
do
echo "" >> ${doc_file}
echo "## ${cmd}" >> ${doc_file}
echo "\`\`\`text" >> ${doc_file}
./target/debug/modkit $cmd --help >> ${doc_file}
echo "\`\`\`" >> ${doc_file}
done
for subcommand in "full" "calls"; do
echo "" >> ${doc_file}
echo "## extract ${subcommand}" >> ${doc_file}
echo "\`\`\`text" >> ${doc_file}
./target/debug/modkit extract $subcommand --help >> ${doc_file}
echo "\`\`\`" >> ${doc_file}
done
for subcommand in "bed" "search" "evaluate" "refine"; do
echo "" >> ${doc_file}
echo "## motif ${subcommand}" >> ${doc_file}
echo "\`\`\`text" >> ${doc_file}
./target/debug/modkit motif $subcommand --help >> ${doc_file}
echo "\`\`\`" >> ${doc_file}
done
for subcommand in "pair" "multi"
do
echo "" >> ${doc_file}
echo "## dmr ${subcommand}" >> ${doc_file}
echo "\`\`\`text" >> ${doc_file}
./target/debug/modkit dmr $subcommand --help >> ${doc_file}
echo "\`\`\`" >> ${doc_file}
done
for subcommand in "merge"; do
echo "" >> ${doc_file}
echo "## bedmethyl ${subcommand}" >> ${doc_file}
echo "\`\`\`text" >> ${doc_file}
./target/debug/modkit bedmethyl $subcommand --help >> ${doc_file}
echo "\`\`\`" >> ${doc_file}
done