bioinformatics/ucsc-userapps:505
Version sha256.17d1d7150c7068fc52c995486fb9eb91a8e5349b508b5f45f984e35b302aacb0
Image size: 331.9 MB
For more on pulling from the registry, see the ilifu documentation.
First, once: add the registry and make it your default
singularity remote add --no-login idia-registry https://sregistry.idia.ac.za
singularity remote use idia-registry
If you added it before, as the ilifu docs describe, remote add says it already exists: just run remote use.
Log in, for a private collection
singularity remote login idia-registry
Paste a token from your token page when asked. Public collections need no login.
Pull the container
singularity pull library://bioinformatics/ucsc-userapps:505
Shell into the container
singularity shell library://bioinformatics/ucsc-userapps:505
Run the container
singularity run library://bioinformatics/ucsc-userapps:505
First, once: add the registry and make it your default
apptainer remote add --no-login idia-registry https://sregistry.idia.ac.za
apptainer remote use idia-registry
If you added it before, as the ilifu docs describe, remote add says it already exists: just run remote use.
Log in, for a private collection
apptainer remote login idia-registry
Paste a token from your token page when asked. Public collections need no login.
Pull the container
apptainer pull library://bioinformatics/ucsc-userapps:505
Shell into the container
apptainer shell library://bioinformatics/ucsc-userapps:505
Run the container
apptainer run library://bioinformatics/ucsc-userapps:505
UCSC Genome Browser and Blat applications (userApps) 505 by the UCSC Genome Browser Group and Jim Kent (https://github.com/ucscGenomeBrowser/kent).
This image packages the unmodified upstream userApps.v505 source release, built from
source. IDIA builds and maintains the image only; we did not write these tools. Report
bugs in the tools to UCSC (genome-www@soe.ucsc.edu); report problems with the image
itself to support@ilifu.ac.za.
Licence:
- Most tools (bedToBigBed, wigToBigWig, faToTwoBit, twoBitToFa, ...) are under the
MIT licence, Copyright (C) 2001 UC Regents. So are the parasol cluster tools
(para, paraHub, paraNode, gensub2, ...; licenses/kent/src/parasol/LICENSE).
- blat, gfServer, gfClient, isPcr and gfPcr, and any other tool that links Jim
Kent's jkOwnLib (e.g. chainBridge), are copyright Jim Kent. They are licensed for
personal, academic and non-profit use only; commercial use needs an explicit
agreement with Jim Kent (https://kentinformatics.com/terms). See
licenses/kent/src/blat/LICENSE, licenses/kent/src/isPcr/LICENSE and
licenses/kent/src/jkOwnLib/LICENSE.
- liftOver is under a UC licence: free for academic, non-profit and personal use;
commercial use needs a licence from UCSC (https://genome.ucsc.edu/license/).
- A few other directories carry their own LICENSE files.
The licence texts are in /opt/ucsc-userapps/LICENSE (the default MIT licence) and
/opt/ucsc-userapps/licenses/, which has every LICENSE file from the source tree at its
source path, e.g. licenses/kent/src/blat/LICENSE and licenses/kent/src/hg/liftOver/LICENSE.
Citing: see https://genome.ucsc.edu/cite.html. For BLAT, cite Kent WJ. BLAT - the
BLAST-like alignment tool. Genome Res. 2002;12(4):656-664.
Usage:
singularity exec ucsc-userapps_505.sif faToTwoBit genome.fa genome.2bit
singularity run --app blat ucsc-userapps_505.sif genome.2bit query.fa out.psl
singularity run ucsc-userapps_505.sif liftOver in.bed hg19ToHg38.over.chain.gz out.bed unmapped.bed
The tools are in /opt/ucsc-userapps/bin, which is on PATH; "singularity run" runs the
command given as its first argument. Run a tool with no arguments for its usage.
/opt/ucsc-userapps/kentUtils.Documentation.txt collects every tool's usage message.
Reference data (genomes, .2bit files, liftOver chain files) is not in the image. Bind
it in, e.g. "singularity exec -B /path/to/refs:/refs ...". Tools that query UCSC's
MySQL server read ~/.hg.conf (see /opt/ucsc-userapps/README). bigHeat needs numpy,
pandas, scipy and matplotlib, and fetchChromSizes needs wget or a mysql client; none
of these are in the image.
This image has 7 apps. Pick one to see how to use it.
singularity run --app bedToBigBed library://bioinformatics/ucsc-userapps:505
This works once you've added the registry as a remote (see the CLI tab). Add the app's arguments after the command. With Apptainer, start it with apptainer instead.
Help
Converts a BED file to an indexed bigBed for a track hub or custom track. The BED needs
no track lines and must be sorted by chromosome then start (sort -k1,1 -k2,2n, or add
-sort). chrom.sizes lists each sequence's length: make it with "twoBitInfo genome.2bit
chrom.sizes", or give the .2bit itself with -sizesIs2Bit. -type=bedN[+P] and -as
describe the columns.
singularity run --app bedToBigBed ucsc-userapps_505.sif -type=bed6 peaks.sorted.bed chrom.sizes peaks.bb
Docs: https://genome.ucsc.edu/goldenPath/help/bigBed.html
Runs
exec bedToBigBed "$@"
singularity run --app blat library://bioinformatics/ucsc-userapps:505
This works once you've added the registry as a remote (see the CLI tab). Add the app's arguments after the command. With Apptainer, start it with apptainer instead.
Help
Standalone BLAT: aligns DNA, RNA or protein queries to a genome (.2bit, .fa or .nib) and
writes PSL. It quickly finds matches of 95% or greater identity over 40 bases or more;
-t and -q select translated searches (e.g. -t=dnax -q=prot), and an overused-tile file
made once with -makeOoc=11.ooc and then given as -ooc=11.ooc speeds up genome-wide runs.
Free for personal, academic and non-profit use only (see the image's help).
singularity run --app blat ucsc-userapps_505.sif -q=rna -fine genome.2bit mrna.fa mrna.psl
Docs: https://genome.ucsc.edu/goldenPath/help/blatSpec.html
Runs
exec blat "$@"
singularity run --app faToTwoBit library://bioinformatics/ucsc-userapps:505
This works once you've added the registry as a remote (see the CLI tab). Add the app's arguments after the command. With Apptainer, start it with apptainer instead.
Help
Packs FASTA sequences into a compact .2bit file, the genome format blat, gfServer, isPcr
and many other tools here read. Lower-case (soft-masked) bases stay masked unless you
add -noMask; use -long if the total sequence is over 4 Gb.
singularity run --app faToTwoBit ucsc-userapps_505.sif genome.fa.gz genome.2bit
Docs: https://genome.ucsc.edu/goldenPath/help/twoBit.html
Runs
exec faToTwoBit "$@"
singularity run --app gfClient library://bioinformatics/ucsc-userapps:505
This works once you've added the registry as a remote (see the CLI tab). Add the app's arguments after the command. With Apptainer, start it with apptainer instead.
Help
Sends queries to a running gfServer and writes PSL. seqDir is the directory, relative to
the current one, holding the .2bit file the server was started with; the client reads
sequence from it too. Translated searches (-t=dnax) need a server started with -trans.
Free for personal, academic and non-profit use only (see the image's help).
singularity run --app gfClient ucsc-userapps_505.sif localhost 17779 . query.fa out.psl
Docs: https://genome.ucsc.edu/goldenPath/help/blatSpec.html
Runs
exec gfClient "$@"
singularity run --app gfServer library://bioinformatics/ucsc-userapps:505
This works once you've added the registry as a remote (see the CLI tab). Add the app's arguments after the command. With Apptainer, start it with apptainer instead.
Help
Holds a BLAT index of a genome in memory and answers gfClient queries over TCP, so many
queries share one index. Start it in the background, wait for "Server ready for
queries!", and stop it with "gfServer stop host port" (only if started with -canStop) or
by killing it. The port is reachable by other users of the node. Free for personal,
academic and non-profit use only (see the image's help).
singularity run --app gfServer ucsc-userapps_505.sif start -canStop localhost 17779 genome.2bit &
Docs: https://genome.ucsc.edu/goldenPath/help/blatSpec.html
Runs
exec gfServer "$@"
singularity run --app isPcr library://bioinformatics/ucsc-userapps:505
This works once you've added the registry as a remote (see the CLI tab). Add the app's arguments after the command. With Apptainer, start it with apptainer instead.
Help
In-silico PCR: finds the products of primer pairs in a genome. The query file has one
pair per line: name, forward primer, reverse primer. Products are up to 4,000 bp by
default (-maxSize), written as FASTA unless -out=bed or -out=psl. It builds its own index,
which takes a lot of memory for a whole genome; "gfServer pcr" queries a running server
instead. Free for personal, academic and non-profit use only (see the image's help).
singularity run --app isPcr ucsc-userapps_505.sif -out=bed genome.2bit primers.txt products.bed
Docs: https://github.com/ucscGenomeBrowser/kent/blob/master/src/isPcr/README
Runs
exec isPcr "$@"
singularity run --app liftOver library://bioinformatics/ucsc-userapps:505
This works once you've added the registry as a remote (see the CLI tab). Add the app's arguments after the command. With Apptainer, start it with apptainer instead.
Help
Converts coordinates from one assembly to another of the same organism (BED by default;
-gff, -genePred and -bedPlus=N for other formats). You supply the chain file: it is not in
the image, so download the one for your assemblies from
https://hgdownload.soe.ucsc.edu/goldenPath/<db>/liftOver/. Regions that don't map go to the
unMapped file with the reason; -minMatch (default 0.95) sets how much must remap. Free
for academic, non-profit and personal use only (see the image's help).
singularity run --app liftOver ucsc-userapps_505.sif in.bed hg19ToHg38.over.chain.gz out.bed unmapped.bed
Docs: https://genome.ucsc.edu/FAQ/FAQdownloads.html#liftOver
Runs
exec liftOver "$@"
Bootstrap: docker
From: debian:13-slim
Stage: build
%post
set -eu
export DEBIAN_FRONTEND=noninteractive
USERAPPS_VERSION=505
USERAPPS_SHA256=57c75ad0a5b0d0f8df76a749a236e42f4ede90728a6464756fa88a29fa175295
apt-get update
apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
curl \
libbz2-dev \
libcurl4-openssl-dev \
liblzma-dev \
libmariadb-dev \
libpng-dev \
libssl-dev \
python3 \
rsync \
uuid-dev \
zlib1g-dev
mkdir -p /opt/build
cd /opt/build || exit 1
curl -fsSLo "userApps.v${USERAPPS_VERSION}.src.tgz" \
"https://hgdownload.soe.ucsc.edu/admin/exe/userApps.archive/userApps.v${USERAPPS_VERSION}.src.tgz"
echo "${USERAPPS_SHA256} userApps.v${USERAPPS_VERSION}.src.tgz" | sha256sum -c -
tar xzf "userApps.v${USERAPPS_VERSION}.src.tgz"
rm "userApps.v${USERAPPS_VERSION}.src.tgz"
# rsync: kent/src/parasol/makefile installs with it. python3: upstream's mkREADME.sh runs
# every bin/ file, Python scripts included, to collect kentUtils.Documentation.txt.
# Upstream's own build, unmodified: binaries land in userApps/bin. Upstream's flags
# only (-O3 -g, no -march); zlib-ng and htscodecs pick their SIMD code at run time.
cd /opt/build/userApps || exit 1
# Under -j, hg/cgilib archives into kent/src/lib/local before hg/lib (run in parallel)
# has created it ("ar: ../../lib/local/jkhgapcgi.a: No such file or directory").
mkdir -p kent/src/lib/local
make -j "$(nproc)"
PREFIX=/opt/ucsc-userapps
mkdir -p "${PREFIX}/bin" "${PREFIX}/licenses"
cp -p bin/* "${PREFIX}/bin/"
for binary in "${PREFIX}"/bin/*; do
if [ "$(head -c 4 "${binary}" | tail -c 3)" = "ELF" ]; then
strip "${binary}"
fi
done
cp README kentUtils.Documentation.txt "${PREFIX}/"
cp kent/src/lib/LICENSE "${PREFIX}/LICENSE"
cp licenseBlat.txt licenseUcscGenomeBrowser.txt GenomeBrowserLicense.pdf "${PREFIX}/licenses/"
# Every LICENSE file in the source tree, at its source path (blat, isPcr, hg/liftOver, ...).
find kent/src -name 'LICENSE*' -type f -exec cp --parents {} "${PREFIX}/licenses/" \;
# The Debian packages that hold the shared libraries the binaries link against, so the
# final stage installs exactly those.
for binary in "${PREFIX}"/bin/*; do
ldd "${binary}" 2>/dev/null || true
done | awk '$2 == "=>" && $3 ~ /^\// { print $3 }' | sort -u > /opt/build/libs.txt
while read -r library; do
dpkg -S "$(readlink -f "${library}")" 2>/dev/null || dpkg -S "${library}" 2>/dev/null || true
done < /opt/build/libs.txt | cut -d: -f1 | sort -u > /opt/runtime-packages.txt
cat /opt/runtime-packages.txt
Bootstrap: docker
From: debian:13-slim
Stage: final
%files from build
/opt/ucsc-userapps /opt
/opt/runtime-packages.txt /opt/runtime-packages.txt
%post
set -eu
export DEBIAN_FRONTEND=noninteractive
apt-get update
# python3 and python-is-python3 run the Python scripts that ship with userApps
# (expMatrixToBarchartBed, hubtools, ucscApiClient, ...); perl-base covers the Perl ones.
xargs -a /opt/runtime-packages.txt apt-get install -y --no-install-recommends \
ca-certificates \
python3 \
python-is-python3
apt-get clean
rm -rf /var/lib/apt/lists/* /opt/runtime-packages.txt
find / -xdev -name __pycache__ -type d -prune -exec rm -rf {} +
%environment
export PATH=/opt/ucsc-userapps/bin:${PATH}
%labels
Maintainer IDIA <support@ilifu.ac.za>
Version 505
Source https://github.com/ucscGenomeBrowser/kent
Download https://hgdownload.soe.ucsc.edu/admin/exe/userApps.archive/userApps.v505.src.tgz
License MIT for most tools (incl. parasol); blat, gfServer, gfClient, isPcr, gfPcr, chainBridge and any other tool linking jkOwnLib (Jim Kent) and liftOver (UC Regents) are free for personal, academic and non-profit use only, commercial use needs a licence
Authors UCSC Genome Browser Group, University of California Santa Cruz; BLAT, gfServer, gfClient, isPcr and gfPcr by Jim Kent (Kent Informatics)
%help
UCSC Genome Browser and Blat applications (userApps) 505 by the UCSC Genome Browser Group and Jim Kent (https://github.com/ucscGenomeBrowser/kent).
This image packages the unmodified upstream userApps.v505 source release, built from
source. IDIA builds and maintains the image only; we did not write these tools. Report
bugs in the tools to UCSC (genome-www@soe.ucsc.edu); report problems with the image
itself to support@ilifu.ac.za.
Licence:
- Most tools (bedToBigBed, wigToBigWig, faToTwoBit, twoBitToFa, ...) are under the
MIT licence, Copyright (C) 2001 UC Regents. So are the parasol cluster tools
(para, paraHub, paraNode, gensub2, ...; licenses/kent/src/parasol/LICENSE).
- blat, gfServer, gfClient, isPcr and gfPcr, and any other tool that links Jim
Kent's jkOwnLib (e.g. chainBridge), are copyright Jim Kent. They are licensed for
personal, academic and non-profit use only; commercial use needs an explicit
agreement with Jim Kent (https://kentinformatics.com/terms). See
licenses/kent/src/blat/LICENSE, licenses/kent/src/isPcr/LICENSE and
licenses/kent/src/jkOwnLib/LICENSE.
- liftOver is under a UC licence: free for academic, non-profit and personal use;
commercial use needs a licence from UCSC (https://genome.ucsc.edu/license/).
- A few other directories carry their own LICENSE files.
The licence texts are in /opt/ucsc-userapps/LICENSE (the default MIT licence) and
/opt/ucsc-userapps/licenses/, which has every LICENSE file from the source tree at its
source path, e.g. licenses/kent/src/blat/LICENSE and licenses/kent/src/hg/liftOver/LICENSE.
Citing: see https://genome.ucsc.edu/cite.html. For BLAT, cite Kent WJ. BLAT - the
BLAST-like alignment tool. Genome Res. 2002;12(4):656-664.
Usage:
singularity exec ucsc-userapps_505.sif faToTwoBit genome.fa genome.2bit
singularity run --app blat ucsc-userapps_505.sif genome.2bit query.fa out.psl
singularity run ucsc-userapps_505.sif liftOver in.bed hg19ToHg38.over.chain.gz out.bed unmapped.bed
The tools are in /opt/ucsc-userapps/bin, which is on PATH; "singularity run" runs the
command given as its first argument. Run a tool with no arguments for its usage.
/opt/ucsc-userapps/kentUtils.Documentation.txt collects every tool's usage message.
Reference data (genomes, .2bit files, liftOver chain files) is not in the image. Bind
it in, e.g. "singularity exec -B /path/to/refs:/refs ...". Tools that query UCSC's
MySQL server read ~/.hg.conf (see /opt/ucsc-userapps/README). bigHeat needs numpy,
pandas, scipy and matplotlib, and fetchChromSizes needs wget or a mysql client; none
of these are in the image.
%runscript
if [ "$#" -eq 0 ]; then
echo "Usage: singularity run <image> <command> [args...]" >&2
echo "Commands are in /opt/ucsc-userapps/bin; see 'singularity run-help <image>'." >&2
exit 1
fi
exec "$@"
%apprun blat
exec blat "$@"
%apphelp blat
Standalone BLAT: aligns DNA, RNA or protein queries to a genome (.2bit, .fa or .nib) and
writes PSL. It quickly finds matches of 95% or greater identity over 40 bases or more;
-t and -q select translated searches (e.g. -t=dnax -q=prot), and an overused-tile file
made once with -makeOoc=11.ooc and then given as -ooc=11.ooc speeds up genome-wide runs.
Free for personal, academic and non-profit use only (see the image's help).
singularity run --app blat ucsc-userapps_505.sif -q=rna -fine genome.2bit mrna.fa mrna.psl
Docs: https://genome.ucsc.edu/goldenPath/help/blatSpec.html
%apprun gfServer
exec gfServer "$@"
%apphelp gfServer
Holds a BLAT index of a genome in memory and answers gfClient queries over TCP, so many
queries share one index. Start it in the background, wait for "Server ready for
queries!", and stop it with "gfServer stop host port" (only if started with -canStop) or
by killing it. The port is reachable by other users of the node. Free for personal,
academic and non-profit use only (see the image's help).
singularity run --app gfServer ucsc-userapps_505.sif start -canStop localhost 17779 genome.2bit &
Docs: https://genome.ucsc.edu/goldenPath/help/blatSpec.html
%apprun gfClient
exec gfClient "$@"
%apphelp gfClient
Sends queries to a running gfServer and writes PSL. seqDir is the directory, relative to
the current one, holding the .2bit file the server was started with; the client reads
sequence from it too. Translated searches (-t=dnax) need a server started with -trans.
Free for personal, academic and non-profit use only (see the image's help).
singularity run --app gfClient ucsc-userapps_505.sif localhost 17779 . query.fa out.psl
Docs: https://genome.ucsc.edu/goldenPath/help/blatSpec.html
%apprun isPcr
exec isPcr "$@"
%apphelp isPcr
In-silico PCR: finds the products of primer pairs in a genome. The query file has one
pair per line: name, forward primer, reverse primer. Products are up to 4,000 bp by
default (-maxSize), written as FASTA unless -out=bed or -out=psl. It builds its own index,
which takes a lot of memory for a whole genome; "gfServer pcr" queries a running server
instead. Free for personal, academic and non-profit use only (see the image's help).
singularity run --app isPcr ucsc-userapps_505.sif -out=bed genome.2bit primers.txt products.bed
Docs: https://github.com/ucscGenomeBrowser/kent/blob/master/src/isPcr/README
%apprun liftOver
exec liftOver "$@"
%apphelp liftOver
Converts coordinates from one assembly to another of the same organism (BED by default;
-gff, -genePred and -bedPlus=N for other formats). You supply the chain file: it is not in
the image, so download the one for your assemblies from
https://hgdownload.soe.ucsc.edu/goldenPath/<db>/liftOver/. Regions that don't map go to the
unMapped file with the reason; -minMatch (default 0.95) sets how much must remap. Free
for academic, non-profit and personal use only (see the image's help).
singularity run --app liftOver ucsc-userapps_505.sif in.bed hg19ToHg38.over.chain.gz out.bed unmapped.bed
Docs: https://genome.ucsc.edu/FAQ/FAQdownloads.html#liftOver
%apprun bedToBigBed
exec bedToBigBed "$@"
%apphelp bedToBigBed
Converts a BED file to an indexed bigBed for a track hub or custom track. The BED needs
no track lines and must be sorted by chromosome then start (sort -k1,1 -k2,2n, or add
-sort). chrom.sizes lists each sequence's length: make it with "twoBitInfo genome.2bit
chrom.sizes", or give the .2bit itself with -sizesIs2Bit. -type=bedN[+P] and -as
describe the columns.
singularity run --app bedToBigBed ucsc-userapps_505.sif -type=bed6 peaks.sorted.bed chrom.sizes peaks.bb
Docs: https://genome.ucsc.edu/goldenPath/help/bigBed.html
%apprun faToTwoBit
exec faToTwoBit "$@"
%apphelp faToTwoBit
Packs FASTA sequences into a compact .2bit file, the genome format blat, gfServer, isPcr
and many other tools here read. Lower-case (soft-masked) bases stay masked unless you
add -noMask; use -long if the total sequence is over 4 Gb.
singularity run --app faToTwoBit ucsc-userapps_505.sif genome.fa.gz genome.2bit
Docs: https://genome.ucsc.edu/goldenPath/help/twoBit.html
%test
for binary in /opt/ucsc-userapps/bin/*; do
if ldd "${binary}" 2>/dev/null | grep -q 'not found'; then
echo "Missing shared library for ${binary}:" >&2
ldd "${binary}" >&2
exit 1
fi
done
for tool in blat gfServer gfClient isPcr liftOver bedToBigBed bedGraphToBigWig \
wigToBigWig bigWigToBedGraph bigBedToBed faToTwoBit twoBitToFa twoBitInfo pslToBed hgsql; do
[ -x "/opt/ucsc-userapps/bin/${tool}" ] || { echo "Missing ${tool}" >&2; exit 1; }
done
blat 2>&1 | grep -q 'Standalone BLAT v. 39x1' || exit 1
liftOver 2>&1 | grep -q '^liftOver - ' || exit 1
python3 /opt/ucsc-userapps/bin/barChartReorder --help > /dev/null || exit 1
workdir=$(mktemp -d)
cd "${workdir}" || exit 1
printf '>tgt\nCGGGGTGGATTAGTCAAGGCCATGATGGGCGCATTTGGACCGTAGGAGTATATGGTCCTA\nGTACGGAGATATTCATCAAGATGATCATATCTATCACCTGCCACTTCAATACTGGGTAAC\n' > target.fa
printf '>qry\nGCATTTGGACCGTAGGAGTATATGGTCCTAGTACGGAGATATTCATCAAGATGATCATAT\n' > query.fa
faToTwoBit target.fa target.2bit || exit 1
[ "$(twoBitInfo target.2bit stdout)" = "$(printf 'tgt\t120')" ] || exit 1
blat -noHead target.2bit query.fa out.psl || exit 1
awk -F '\t' '$1 == 60 && $10 == "qry" && $14 == "tgt" && $16 == 30 && $17 == 90 { found = 1 } END { exit !found }' out.psl || exit 1
cd / || exit 1
rm -rf "${workdir}"
Download bioinformatics-ucsc-userapps_505.def
#!/bin/sh
if [ "$#" -eq 0 ]; then
echo "Usage: singularity run <image> <command> [args...]" >&2
echo "Commands are in /opt/ucsc-userapps/bin; see 'singularity run-help <image>'." >&2
exit 1
fi
exec "$@"
#!/bin/sh
for binary in /opt/ucsc-userapps/bin/*; do
if ldd "${binary}" 2>/dev/null | grep -q 'not found'; then
echo "Missing shared library for ${binary}:" >&2
ldd "${binary}" >&2
exit 1
fi
done
for tool in blat gfServer gfClient isPcr liftOver bedToBigBed bedGraphToBigWig \
wigToBigWig bigWigToBedGraph bigBedToBed faToTwoBit twoBitToFa twoBitInfo pslToBed hgsql; do
[ -x "/opt/ucsc-userapps/bin/${tool}" ] || { echo "Missing ${tool}" >&2; exit 1; }
done
blat 2>&1 | grep -q 'Standalone BLAT v. 39x1' || exit 1
liftOver 2>&1 | grep -q '^liftOver - ' || exit 1
python3 /opt/ucsc-userapps/bin/barChartReorder --help > /dev/null || exit 1
workdir=$(mktemp -d)
cd "${workdir}" || exit 1
printf '>tgt\nCGGGGTGGATTAGTCAAGGCCATGATGGGCGCATTTGGACCGTAGGAGTATATGGTCCTA\nGTACGGAGATATTCATCAAGATGATCATATCTATCACCTGCCACTTCAATACTGGGTAAC\n' > target.fa
printf '>qry\nGCATTTGGACCGTAGGAGTATATGGTCCTAGTACGGAGATATTCATCAAGATGATCATAT\n' > query.fa
faToTwoBit target.fa target.2bit || exit 1
[ "$(twoBitInfo target.2bit stdout)" = "$(printf 'tgt\t120')" ] || exit 1
blat -noHead target.2bit query.fa out.psl || exit 1
awk -F '\t' '$1 == 60 && $10 == "qry" && $14 == "tgt" && $16 == 30 && $17 == 90 { found = 1 } END { exit !found }' out.psl || exit 1
cd / || exit 1
rm -rf "${workdir}"
# /.singularity.d/env/10-docker2singularity.sh
#!/bin/sh
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# /.singularity.d/env/90-environment.sh
#!/bin/sh
# Custom environment shell code should follow
export PATH=/opt/ucsc-userapps/bin:${PATH}