The FASTX-Toolkit is a collection of command line tools for Short-Reads FASTA/FASTQ files preprocessing. http://hannonlab.cshl.edu/fastx_toolkit/index.html
Install within image using micromamba
https://github.com/mamba-org/micromamba-docker
http://hannonlab.cshl.edu/fastx_toolkit/download.html
https://bioconda.github.io/recipes/fastx_toolkit/README.html
# Assumes current working directory is the top-level fastxtoolkit-docker-singularity directory
docker build -t fastxtoolkit:0.0.14 . # tag should match software version
- Can do this on Google shell
docker run --rm -it fastxtoolkit:0.0.14 fastx_uncollapser -h
docker run --rm -it fastxtoolkit:0.0.14 fastx_barcode_splitter.pl -h
(skip if this image is already on your system)
https://github.com/mattgalbraith/singularity-docker
docker images
docker save <Image_ID> -o fastxtoolkit0.0.14-docker.tar && gzip fastxtoolkit0.0.14-docker.tar # = IMAGE_ID of <tool> image
docker run -v "$PWD":/data --rm -it singularity:1.1.5 bash -c "singularity build /data/fastxtoolkit0.0.14.sif docker-archive:///data/fastxtoolkit0.0.14-docker.tar.gz"
NB: On Apple M1/M2 machines ensure Singularity image is built with x86_64 architecture or sif may get built with arm64
Next, transfer the fastxtoolkit0.0.14.sif file to the system on which you want to run FASTX Toolkit from the Singularity container
# set up path to the Singularity container
FASTXTOOLKIT_SIF=path/to/fastxtoolkit0.0.14.sif
# Test that FASTX Toolkit can run from Singularity container
singularity run $FASTXTOOLKIT_SIF fastx_uncollapser -h # depending on system/version, singularity may be called apptainer
singularity run $FASTXTOOLKIT_SIF fastx_barcode_splitter.pl -h