Skip to content

Commit 7367657

Browse files
fix(scripts): Wire entrypoint to central dispatch
scripts/arcasHLA.py already centralizes arg parsing and dependency checks, but the top-level `arcasHLA` wrapper still hand-rolled its own per-command dispatch and ad-hoc dependency warnings. Forward all invocations to the central dispatch script instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 29db731 commit 7367657

1 file changed

Lines changed: 5 additions & 85 deletions

File tree

‎arcasHLA‎

Lines changed: 5 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -13,94 +13,14 @@
1313
# arcasHLA types high resolution HLA alleles from BAM.
1414
#
1515
#-----------------------------------------------------------------------------
16-
# Requirements
16+
# Dispatch
1717
#-----------------------------------------------------------------------------
18-
19-
if [ ! -x "$(command -v kallisto pseudo)" ]; then
20-
echo "Warning: missing dependency - Kallisto v0.44.0"
21-
fi
22-
23-
if [ ! -x "$(command -v samtools)" ]; then
24-
echo "Warning: missing dependency - Samtools"
25-
fi
26-
27-
if [ ! -x "$(command -v bedtools)" ]; then
28-
echo "Warning: missing dependency - bedtools"
29-
fi
30-
31-
if [ ! -x "$(command -v pigz)" ]; then
32-
echo "Warning: missing dependency - pigz"
33-
fi
34-
35-
if [ ! -x "$(command -v python3 -c "import numpy")" ]; then
36-
echo "Warning: missing dependency - python3 module NumPy"
37-
fi
38-
39-
if [ ! -x "$(command -v python3 -c "import pandas")" ]; then
40-
echo "Warning: missing dependency - python3 module pandas"
41-
fi
42-
43-
if [ ! -x "$(command -v python3 -c "import Bio")" ]; then
44-
echo "Warning: missing dependency - python3 module Biopython"
45-
fi
46-
47-
#-----------------------------------------------------------------------------
48-
# Tools
18+
#
19+
# Argument parsing, tool dependency checks and subcommand dispatch are all
20+
# handled by scripts/arcasHLA.py, so this wrapper just forwards to it.
4921
#-----------------------------------------------------------------------------
5022

5123
ARCASHLA_ROOT_DIR=$(realpath $(dirname $0))
5224

53-
if [ "$1" == "extract" ]; then
54-
55-
python3 ${ARCASHLA_ROOT_DIR}/scripts/extract.py ${@:2}
56-
57-
elif [ "$1" == "genotype" ]; then
58-
59-
python3 ${ARCASHLA_ROOT_DIR}/scripts/genotype.py ${@:2}
60-
61-
elif [ "$1" == "merge" ]; then
62-
63-
python3 ${ARCASHLA_ROOT_DIR}/scripts/merge.py ${@:2}
64-
65-
elif [ "$1" == "reference" ]; then
66-
67-
python3 ${ARCASHLA_ROOT_DIR}/scripts/reference.py ${@:2}
68-
69-
elif [ "$1" == "partial" ]; then
70-
71-
python3 ${ARCASHLA_ROOT_DIR}/scripts/partial.py ${@:2}
72-
73-
elif [ "$1" == "customize" ]; then
74-
75-
python3 ${ARCASHLA_ROOT_DIR}/scripts/customize.py ${@:2}
76-
77-
elif [ "$1" == "quant" ]; then
78-
79-
python3 ${ARCASHLA_ROOT_DIR}/scripts/quant.py ${@:2}
80-
81-
elif [ "$1" == "convert" ]; then
82-
83-
python3 ${ARCASHLA_ROOT_DIR}/scripts/convert.py ${@:2}
84-
85-
#-----------------------------------------------------------------------------
86-
# Usage
87-
#-----------------------------------------------------------------------------
88-
89-
else
90-
echo "Usage: arcasHLA <command> [options]"
91-
echo
92-
echo " extract extracts chromosome 6 reads from bam"
93-
echo " genotype types HLA genes from extracted reads"
94-
echo " partial types partial HLA genes from extracted reads"
95-
echo
96-
echo " customize create custom HLA reference"
97-
echo " quant allele specific HLA quantification"
98-
echo
99-
echo " merge processes results into a tab-separated table"
100-
echo " convert converts HLA nomenclature/resolution"
101-
echo " reference check or update HLA reference"
102-
echo
103-
echo "Note: run any command with --help to view required fields, options"
104-
echo
105-
fi
25+
python3 ${ARCASHLA_ROOT_DIR}/scripts/arcasHLA.py "$@"
10626
#-------------------------------------------------------------------------------

0 commit comments

Comments
 (0)