http://singularity.lbl.gov/install-mac
Assuming you are using a Mac;
brew cask install virtualbox
brew cask install vagrant
brew cask install vagrant-manager
Vagrant had issues installing, can also use this one:
https://releases.hashicorp.com/vagrant/2.0.1/vagrant_2.0.1_x86_64.dmg
Start the Vagrant VM and ssh
into it
mkdir singularity-vm
cd singularity-vm
vagrant init singularityware/singularity-2.4
vagrant up
vagrant ssh
Build the included samtools
recipe
git clone https://github.com/stevekm/singularity-samtools-demo.git
cd singularity-samtools-demo
sudo singularity build singularity-container-samtools Singularity
singularity exec singularity-container-samtools samtools --version
# samtools 1.6
# Using htslib 1.6
# Copyright (C) 2017 Genome Research Ltd.
singularity exec singularity-container-samtools samtools view input/HapMap-B17-1267.bam
Need to figure out how to deal with binding paths...
singularity exec singularity-container-bwa bwa mem -M -v 1 ./hg19_genome.fa NGS580-demo-data/fastq/HapMap-B17-1267_S8_L001_R1_001.fastq.gz NGS580-demo-data/fastq/HapMap-B17-1267_S8_L001_R2_001.fastq.gz
singularity shell -B /data:./ singularity-container-bwa
https://app.vagrantup.com/singularityware/boxes/singularity-2.4
http://singularity.lbl.gov/docs-build-container
http://singularity.lbl.gov/docs-recipes
https://github.com/qbicsoftware/qbic-singularity-samtools
some container collections here