# arcasHLA on Bianca
https://github.com/RabadanLab/arcasHLA
The easiest way to build the container is to use the https://seqera.io/containers/ services but it fails since the installation of the tool requires strict channel order and in Seqera the order is different. Bellow, is a Singularity definition file that builds a container with the tools specified [environment.yml](https://github.com/RabadanLab/arcasHLA/blob/master/environment.yml)
```singularity
BootStrap: docker
From: mambaorg/micromamba:1.5.10-noble
%environment
export PYTHONNOUSERSITE=True
export PATH="$MAMBA_ROOT_PREFIX/bin:$PATH"
%post
export PYTHONNOUSERSITE=True
export DEBIAN_FRONTEND=noninteractive
export CONDA_PKGS_DIRS=/tmp/conda_pkgs && mkdir -p ${CONDA_PKGS_DIRS}
export PIP_CACHE_DIR=/tmp/pip-cache && mkdir -p ${PIP_CACHE_DIR}
mkdir -p /install
cat << EOF > /install/conda.yml
name: arcas-hla
channels:
- bioconda
- conda-forge
dependencies:
- bedtools==2.31.1
- biopython==1.83
- coreutils==9.4
- git==2.43.0
- git-lfs==3.4.1
- kallisto==0.44.0
- numpy==1.26.4
- pandas==2.2.0
- pigz==2.8
- pip==24.0
- pyarrow==15.0.0
- pytest==8.0.0
- python==3.10.0
- samtools==1.19.2
- scipy==1.12.0
EOF
micromamba install -y -n base -f /install/conda.yml
micromamba install -y -n base conda-forge::procps-ng
micromamba env export --name base --explicit > /install/environment.lock
#micromamba clean -a -y
```
You can build the container or obtain it from the author of the post upon request.
## Reproducing the test run of the tool
The tool expects the structure as it is in the github and installs all refence data and results in the same folder i.e. the container provides all dependencies for the tool to work and run the tool from the githib clone (*rather common setup*).
1. Login to transit.uppmax.uu.se via ssh
2. `mount_wharf naiss-XXXX-XXX`
3. `cd naiss-XXXX-XXX`
4. Copy/download the `arcas-hla.sif` in the folder
5. `git clone https://github.com/RabadanLab/arcasHLA.git`
6. `cd arcasHLA`
7. `apptainer exec ../arcas-hla.sif ./arcasHLA reference --version 3.24.0 -v`
8. ```bash
apptainer exec ../arcas-hla.sif ./arcasHLA extract test/test.bam -o test/output -t 8 -v
```
9. ```bash
apptainer exec ../arcas-hla.sif ./arcasHLA genotype test/output/test.extracted.1.fq.gz test/output/test.extracted.2.fq.gz -g A,B,C,DPB1,DQB1,DQA1,DRB1 -o test/output -t 8 -v
```
10. Check the results in `test/output/test.genotype.json`
Now, the whole setup is available on Bianca in the `wharf`. You can move it to a secure place if you do not need any further Internet operations and continue with the analysis.
## Contacts:
- [Pavlin Mitev](https://katalog.uu.se/profile/?id=N3-1425)
- [UPPMAX](https://www.uu.se/en/centre/uppmax)
- [AE@UPPMAX - related documentation](/8sqXISVRRquPDSw9o1DizQ)