Skip to content

Commit

Permalink
Updating ngsLD and adding new prune_graph script
Browse files Browse the repository at this point in the history
  • Loading branch information
James-S-Santangelo committed Dec 13, 2024
1 parent df66d62 commit d3683ec
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ngsLD/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
### Usage

```
singularity pull --name ngsld.sif library://james-s-santangelo/ngsld/:ngsld:1.1.1
singularity pull --name ngsld.sif library://james-s-santangelo/ngsld/:ngsld:1.2.0
singularity exec ngsld.sif ngsld [options]
singularity exec ngsld.sif perl /opt/bin/prune_graph.pl ## Accessory scripts
singularity exec prune_graph [options] ## Accessory scripts
```

See [ngsLD](https://github.com/fgvieira/ngsLD) for program documentation.
See [prune_graph](https://github.com/fgvieira/prune_graph) for program documentation.
114 changes: 114 additions & 0 deletions ngsLD/Singularity.ngsLD_v1.2.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
Bootstrap: docker
From: ubuntu:bionic

%labels

AUTHOR James Santangelo
EMAIL [email protected]
R_VERSION 4.0.3
PERL_VERSION 5.26.1
NGSLD_VERSION 1.2.0
RUST_VERSION 1.83.0

%environment

export PATH="/opt/bin:$PATH"

%post

apt-get update && \
apt-get -y --no-install-recommends install \
build-essential \
gnupg2 \
wget \
git \
curl \
locales

# Configure default locale
# Taken from https://github.com/nickjer/singularity-r/blob/master/Singularity.3.6.2
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen en_US.utf8
/usr/sbin/update-locale LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

# ===========================
# Install R and packages
# ===========================

# Install R and littler (for package installs)
# Inspiration from Dockerfile by Dirk Eddelbuettel
# https://github.com/rocker-org/rocker/blob/master/r-base/4.0.3/Dockerfile
R_VERSION=4.0.3
export DEBIAN_FRONTEND="noninteractive"
echo "deb http://cran.r-project.org/bin/linux/ubuntu bionic-cran40/" > /etc/apt/sources.list.d/r.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
apt-get update &&
apt-get install -y --no-install-recommends \
littler \
r-cran-littler \
r-base=${R_VERSION}* \
r-base-dev=${R_VERSION}* \
r-recommended=${R_VERSION}*
ln -s /usr/lib/R/site-library/littler/examples/install.r /usr/local/bin/install.r
ln -s /usr/lib/R/site-library/littler/examples/install2.r /usr/local/bin/install2.r
ln -s /usr/lib/R/site-library/littler/examples/installBioc.r /usr/local/bin/installBioc.r
ln -s /usr/lib/R/site-library/littler/examples/installDeps.r /usr/local/bin/installDeps.r
ln -s /usr/lib/R/site-library/littler/examples/installGithub.r /usr/local/bin/installGithub.r
ln -s /usr/lib/R/site-library/littler/examples/testInstalled.r /usr/local/bin/testInstalled.r
install.r docopt
rm -rf /tmp/downloaded_packages/ /tmp/*.rds
rm -rf /var/lib/apt/lists/*

# Install R packages
install.r optparse ggplot2 reshape2 plyr gtools BiocManager

# Use Bioconductor to install LDheatmap
R -e "BiocManager::install('LDheatmap')"
cd ~

# ===========================
# Install ngsLD
# ===========================

apt-get update &&
apt-get -y install \
libgsl-dev \
zlib1g-dev

cd /opt && mkdir bin
wget https://github.com/fgvieira/ngsLD/archive/refs/tags/v1.2.0.tar.gz
tar -xvzf v1.2.0.tar.gz
cd ngsLD-1.2.0
make
ln -s /opt/ngsLD-1.2.0/ngsLD /opt/bin/ngsLD
ln -s /opt/ngsLD-1.2.0/scripts/fit_LDdecay.R /opt/bin/fit_LDdecay.R
ln -s /opt/ngsLD-1.2.0/scripts/LD_blocks.sh /opt/bin/LD_blocks.sh
ln -s /opt/ngsLD-1.2.0/scripts/prune_graph.pl /opt/bin/prune_graph.pl

# ===========================
# Install Rust
# ===========================

cd /opt
rm -f /etc/ssl/certs/ca-bundle.crt
apt-get update &&
apt-get -y install ca-certificates
update-ca-certificates
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y &&
. "$HOME/.cargo/env"

# ===========================
# Install Prune_graph
# ===========================

git clone https://github.com/fgvieira/prune_graph.git &&
cd prune_graph
cargo build --release
ln -s /opt/prune_graph/target/release/prune_graph /opt/bin/prune_graph





0 comments on commit d3683ec

Please sign in to comment.