singularity-builds/varscan/varscan.def

94 lines
2.6 KiB
Modula-2
Raw Permalink Normal View History

2021-08-09 14:49:06 +00:00
Bootstrap: library
From: default/alpine:3.14.0
%post
2021-08-09 16:09:11 +00:00
# Part 1: Install Samtools
# ========================
# Get the actual dependencies
apk add --no-cache ncurses libbz2 xz zlib
# Get the build dependencies
apk add --no-cache --virtual .build-deps ncurses-dev musl-dev g++ make zlib-dev bzip2-dev xz-dev
# Make versioning easier
SAMTOOLS_VERSION='1.13'
# Download the source tarball and build
cd /tmp || exit 1
wget https://github.com/samtools/samtools/releases/download/$SAMTOOLS_VERSION/samtools-$SAMTOOLS_VERSION.tar.bz2
tar xjvf samtools-$SAMTOOLS_VERSION.tar.bz2
cd samtools-$SAMTOOLS_VERSION || exit 1
./configure
make && make install
cd .. || exit 1
rm -rf samtools-$SAMTOOLS_VERSION*
cd || exit 1
# Cleanup build packages
apk del --no-cache .build-deps
# Part 2: Install VarScan
# ========================
# Install java
apk add --no-cache openjdk8
2021-08-09 14:49:06 +00:00
# Make versioning easier
VARSCAN_VERSION='v2.4.4'
# Download varscan
wget https://github.com/dkoboldt/varscan/raw/master/VarScan.v2.4.4.jar -O /opt/varscan.jar
# Create a shim for varscan
echo "#!/bin/bash" > /usr/local/bin/varscan
echo "java -jar /opt/varscan.jar \"\$@\"" >> /usr/local/bin/varscan
chmod +x /usr/local/bin/varscan
2021-08-09 16:09:11 +00:00
# Part 3: Install Nextflow dependencies
# =====================================
apk add --no-cache bash
2021-08-09 14:49:06 +00:00
%test
cat << "EOF" > /tmp/singularity-test.sh
#!/bin/bash
2021-08-09 16:09:11 +00:00
CMDS=('bash' 'ps' 'java' 'varscan' 'samtools')
2021-08-09 14:49:06 +00:00
for CMD in "${CMDS[@]}"; do
if ! command -v "$CMD"; then
echo "command $CMD not found!"
FAILED_TESTS=1
fi
done
# Abort if a test failed
if [ -n "$FAILED_TESTS" ]; then
exit 1
fi
EOF
chmod +x /tmp/singularity-test.sh
bash /tmp/singularity-test.sh
%runscript
varscan "$@"
%labels
Author 25492070+MillironX@users.noreply.github.com
SoftwareVersion v2.4.4
2021-08-09 16:09:54 +00:00
SingularityDefinitionVersion 2
2021-08-09 14:49:06 +00:00
%help
VarScan
=======
VarScan is a platform-independent mutation caller for targeted, exome, and
whole-genome resequencing data generated on Illumina, SOLiD, Life/PGM,
Roche/454, and similar instruments. It can be used to detect different types
of variation:
- Germline variants (SNPs an dindels) in individual samples or pools of samples.
- Multi-sample variants (shared or private) in multi-sample datasets (with mpileup).
- Somatic mutations, LOH events, and germline variants in tumor-normal pairs.
- Somatic copy number alterations (CNAs) in tumor-normal exome data.
For more help, see
- <https://dkoboldt.github.io/varscan/>
- <https://github.com/MillironX/singularity-builds>