Picard is a set of command line tools for manipulating high-throughput sequencing (HTS) data and formats such as SAM/BAM/CRAM and VCF.
Java 17
R
https://broadinstitute.github.io/picard/
# Assumes current working directory is the top-level picard-docker-singularity directory
docker build -t picard:3.0.0 . # tag should match software version
- Can do this on Google shell
docker run --rm -it picard:3.0.0 java -jar picard.jar -h
docker run --rm -it picard:3.0.0 java -jar picard.jar MarkDuplicates --version
(skip if this image is already on your system)
https://github.com/mattgalbraith/singularity-docker
docker images
docker save <Image_ID> -o picard3.0.0-docker.tar && gzip picard3.0.0-docker.tar # = IMAGE_ID of Picard image
docker run -v "$PWD":/data --rm -it singularity:1.1.5 bash -c "singularity build /data/picard3.0.0.sif docker-archive:///data/picard3.0.0-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 picard3.0.0.sif file to the system on which you want to run Picard from the Singularity container
# set up path to the Singularity container
PICARD_SIF=path/to/picard3.0.0.sif
# Test that Picard can run from Singularity container
singularity run $PICARD_SIF java -jar /picard.jar -h # depending on system/version, singularity may be called apptainer