#!/usr/bin/env sos-runner #fileformat=SOS1.0 # conda and SoS [sos_setup] bash: install_dir='$HOME/miniconda3' curl -fsSL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o /tmp/miniconda.sh && bash /tmp/miniconda.sh -bfp $install_dir echo "export PATH=$install_dir/bin:\$PATH" >> ~/.bashrc && source ~/.bashrc chown -R $USER.users $install_dir && mkdir -p ~/.conda && chown -R $USER.users ~/.conda pip install sos # apt-get commands [ubuntu_focal_1] packages = "git wget less unzip gzip bzip2 apt-transport-https ca-certificates dirmngr gpg-agent software-properties-common \ cmake build-essential gfortran libgfortran-9-dev libgomp1 libgsl-dev libatlas3-base liblapack-dev \ zlib1g-dev libbz2-dev liblzma-dev libsqlite3-dev libxml2-dev libc6-dev default-jdk \ libcurl4-openssl-dev libssl-dev libssh2-1-dev openssh-server openssh-client rsync vim vim-gtk3 nano trash-cli \ texlive-full python-pygments fonts-wqy-microhei fonts-wqy-zenhei \ pandoc ghostscript graphviz libmagickwand-dev \ smartmontools lm-sensors htop dos2unix tree sshpass acl fcitx fcitx-config-gtk terminator filezilla \ xournal openconnect pdftk docker.io" output: f'/tmp/{step_name}.done' bash: expand = True sudo apt-get update && \ sudo apt install -y {packages} r-base r-base-dev libatlas3-base && \ sudo apt-get clean # A hack for ImageMagick policy issue # to allow view PDF files in SoS Notebook sudo sed -i 's///g' /etc/ImageMagick-6/policy.xml touch {_output} [ubuntu_bionic_1] packages = "git wget less unzip gzip bzip2 apt-transport-https ca-certificates dirmngr gpg-agent software-properties-common \ cmake build-essential gfortran libgfortran-6-dev libgomp-dev libgsl-dev libatlas3-base liblapack-dev \ zlib1g-dev libbz2-dev liblzma-dev libsqlite3-dev libxml2-dev libc6-dev default-jdk \ libcurl4-openssl-dev libssl-dev libssh2-1-dev openssh-server openssh-client rsync vim vim-gtk3 nano trash-cli \ texlive-full python-pygments fonts-wqy-microhei ttf-wqy-microhei fonts-wqy-zenhei ttf-wqy-zenhei \ pandoc ghostscript graphviz libmagickwand-dev \ smartmontools lm-sensors htop dos2unix tree sshpass acl fcitx fcitx-config-gtk terminator \ xournal openconnect" output: f'/tmp/{step_name}.done' bash: expand = True sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 && \ sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/' && \ sudo apt-get update && \ sudo apt install -y {packages} r-base r-base-dev libatlas3-base && \ sudo apt-get clean # A hack for ImageMagick policy issue # to allow view PDF files in SoS Notebook sudo sed -i 's///g' /etc/ImageMagick-6/policy.xml touch {_output} [debian_bulleye_1] packages = "git wget less unzip gzip bzip2 apt-transport-https ca-certificates dirmngr gpg-agent software-properties-common \ cmake build-essential gfortran libgfortran-10-dev libgomp1 libgsl-dev libatlas3-base liblapack-dev \ zlib1g-dev libbz2-dev liblzma-dev libsqlite3-dev libxml2-dev libc6-dev default-jdk \ libcurl4-openssl-dev libssl-dev libssh2-1-dev openssh-server openssh-client rsync vim vim-gtk3 nano trash-cli \ texlive-full python3-pygments fonts-wqy-microhei ttf-wqy-microhei fonts-wqy-zenhei ttf-wqy-zenhei ttf-ubuntu-font-family ttf-mscorefonts-installer \ pandoc ghostscript graphviz libmagickwand-dev libharfbuzz-dev libfribidi-dev apparmor \ smartmontools lm-sensors htop dos2unix tree sshpass acl fcitx fcitx-config-gtk evince uuid terminator \ xournal openconnect" output: f'/tmp/{step_name}.done' bash: expand = True sudo apt-get update && \ sudo apt install -y {packages} r-base r-base-dev libatlas3-base && \ sudo apt-get clean # A hack for ImageMagick policy issue # to allow view PDF files in SoS Notebook # sudo sed -i 's///g' /etc/ImageMagick-6/policy.xml touch {_output} [pop_os_1] packages = "git wget less unzip gzip bzip2 apt-transport-https ca-certificates dirmngr gpg-agent software-properties-common \ cmake build-essential gfortran libgfortran-9-dev libgomp-dev libgsl-dev libatlas3-base liblapack-dev \ zlib1g-dev libbz2-dev liblzma-dev libsqlite3-dev libxml2-dev libc6-dev default-jdk \ libcurl4-openssl-dev libssl-dev libssh2-1-dev openssh-server openssh-client rsync vim vim-gtk3 nano trash-cli \ texlive-full python-pygments r-base r-base-dev libatlas3-base \ pandoc ghostscript graphviz libmagickwand-dev \ smartmontools lm-sensors htop dos2unix tree sshpass acl fcitx fcitx-config-gtk terminator" output: f'/tmp/{step_name}.done' bash: expand = True sudo apt install -y {packages} && \ sudo apt-get clean sudo usermod -aG docker $USER # docker [ubuntu_bionic_2, pop_os_2, debian_bulleye_2] output: f'/tmp/{step_name}.done' bash: expand = True curl -fsSL get.docker.com -o /tmp/get-docker.sh && sudo sh /tmp/get-docker.sh && \ sudo usermod -aG docker $USER touch {_output} # Python and conda based tools [ubuntu_bionic_3, pop_os_3, ubuntu_focal_3, debian_bulleye_3] output: f'/tmp/{step_name}.done' bioconda_pkgs = "cyvcf2 bedtools plink vcftools perl-vcftools-vcf bcftools bedops tabix htslib" pip_pkgs = "notebook jupyterlab jupyter_contrib_nbextensions bash_kernel markdown-kernel nbdime \ docker markdown wand graphviz imageio pillow nbformat feather-format \ sos-notebook sos-r sos-python sos-bash" bash: expand = True conda install -y -c bioconda {bioconda_pkgs} conda install -y -c conda-forge nodejs pip install {pip_pkgs} --no-cache-dir python -m bash_kernel.install python -m markdown_kernel.install jupyter bundlerextension enable --py jupyter_docx_bundler --sys-prefix nbdime config-git --enable --global python -m sos_notebook.install pip install jupyterlab-sos -U --no-cache-dir touch {_output} # R packages [ubuntu_bionic_4, pop_os_4, ubuntu_focal_4, debian_bulleye_4] pkg = ['magrittr', 'dplyr', 'stringr', 'readr', 'ggplot2', 'cowplot', 'feather', 'devtools', 'IRkernel', 'pkgdown'] input: for_each = 'pkg', group_by = 1, concurrent = False output: f'/tmp/{_pkg}.done' R: expand = True dest = Sys.getenv("R_LIBS_USER") system(paste('mkdir -p', dest)) if (!("{_pkg}" %in% rownames(installed.packages()))) install.packages("{_pkg}", lib=dest, repos = 'http://cran.rstudio.com') if ("{_pkg}" == "IRkernel") IRkernel::installspec() bash: expand = True touch {_output} # Configure bashrc [ubuntu_bionic_5, pop_os_5, ubuntu_focal_5] output: f'/tmp/{step_name}.done' bash: expand="${ }" echo ''' function nb() { jupyter-lab $@ &> /dev/null & } function cd-tmp() { dest=$HOME/tmp/$(date '+%d-%b-%Y') mkdir -p $dest && cd $dest } ''' >> ~/.bashrc touch ${_output} # Other third party deb packages [ubuntu_bionic_6, pop_os_6, ubuntu_focal_6] parameter: dpkg = ["google-chrome-stable_current_amd64.deb", "slack-desktop-4.19.2-amd64.deb", "code_1.60.0-1630494279_amd64.deb", "insync_3.5.2.50118-focal_amd64.deb", "virtualbox-6.1_6.1.26-145957~Ubuntu~eoan_amd64.deb"] input: dpkg, group_by = 1, concurrent = False output: f'/tmp/{_input}.done' bash: expand = True # Try to install first, and fix it if the initial installation failed due to uninstalled dependencies. sudo dpkg -i {_input} || sudo apt-get install -f -y touch {_output} # Stephenslab R packages [stephenslab] pkg = ['mixsqp', 'flashr', 'mashr', 'susieR', 'mvsusieR'] input: for_each = 'pkg', group_by = 1, concurrent = False output: f'/tmp/{_pkg}.done' R: expand = True remotes::install_github('stephenslab/{_pkg}') bash: expand = True touch {_output} # CSG packages [csg] igv_version = '2.8' output: f'/tmp/{step_name}.done' bash: expand = True, workdir = '/tmp' wget https://data.broadinstitute.org/igv/projects/downloads/{igv_version}/IGV_Linux_{igv_version}.0.zip \ && unzip IGV_Linux_{igv_version}.0.zip sudo mv IGV_Linux_2.8.0 /opt/IGV \ && sudo ln -s /opt/IGV/igv.sh /usr/local/bin/igv touch {_output}