dhatribadri is testing snakemake workflow 🚀 #87
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test QCD Pipeline | |
run-name: ${{ github.actor }} is testing snakemake workflow 🚀 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
Test-QCD-Pipeline: | |
#runs-on: ubuntu-latest | |
runs-on: self-hosted | |
steps: | |
# - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | |
# - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
# - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | |
- run: echo "🖥️ The workflow is now ready to test your code on the runner." | |
- name: List files in the repository | |
run: | | |
ls | |
- name: Get working directory | |
run: | | |
pwd | |
- name: Set up Miniconda | |
uses: conda-incubator/setup-miniconda@v2 | |
env: | |
CONDA: "/Users/Dhatrib/miniconda3" | |
with: | |
# export CONDA="/Users/Dhatrib/miniconda3" | |
# export PATH="$CONDA/bin:$PATH" | |
#CONDA: "/Users/Dhatrib/miniconda3" | |
#miniconda-version: "latest" | |
python-version: '3.10' | |
auto-update-conda: true | |
activate-environment: 'qcd_env_test' | |
environment-file: 'qcd_environment_shr.yaml' | |
#use-channel-priority: true | |
# - name: SSh into Actions | |
# uses: actions/checkout@v4 | |
# - name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v3 | |
- name: Install pip dependencies | |
run: | | |
source /Users/Dhatrib/miniconda3/etc/profile.d/conda.sh | |
conda init | |
conda activate qcd_env_test | |
pip install --requirement .test/requirements.txt | |
pip install dropbox | |
pip install --upgrade tabulate | |
pip install --upgrade snakemake | |
#source $CONDA/bin/activate | |
#source ~/.bash_profile | |
# - name: Install singularity | |
# run: | | |
# sudo apt-get install -y \ | |
# autoconf \ | |
# automake \ | |
# cryptsetup \ | |
# fuse \ | |
# fuse2fs \ | |
# git \ | |
# libfuse-dev \ | |
# libglib2.0-dev \ | |
# libseccomp-dev \ | |
# libtool \ | |
# pkg-config \ | |
# runc \ | |
# squashfs-tools \ | |
# squashfs-tools-ng \ | |
# uidmap \ | |
# wget \ | |
# zlib1g-dev | |
# - name: SSh into Actions | |
# uses: actions/checkout@v4 | |
# - name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v3 | |
# ./mconfig --without-suid && \ | |
# make -C ./builddir && \ | |
# make -C ./builddir install | |
- name: Install Go | |
run: | | |
brew install go | |
go version | |
- name: Install dependencies using Homebrew | |
run: | | |
brew install wget | |
brew install go | |
brew install squashfs | |
- name: Download Singularity | |
run: | | |
wget https://github.com/sylabs/singularity/archive/refs/tags/v3.8.3.tar.gz | |
tar -xzf singularity-3.8.3.tar.gz | |
- name: Install Singularity | |
run: | | |
cd singularity | |
./mconfig | |
make -C builddir | |
sudo make -C builddir install | |
- name: Verify Singularity installation | |
run: singularity --version | |
#https://github.com/sylabs/singularity/archive/refs/tags/v3.8.3.tar.gz | |
# - name: Install singularity | |
# uses: eWaterCycle/setup-singularity@v7 | |
# with: | |
# singularity-version: 3.8.3 | |
# - name: Export Singularity Path | |
# run: | | |
# export PATH=/home/runner/go/src/github.com/hpcng/singularity-3.8.3/prefix/bin:$PATH | |
# echo "Singularity binary: $(which singularity)" | |
# singularity --version | |
# # Diagnostic steps for Singularity capabilities | |
# - name: Install dependencies for Singularity | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install squashfuse fuse2fs gocryptfs | |
# - name: Set up sysctl for unprivileged user namespaces | |
# run: | | |
# sudo sh -c 'echo kernel.unprivileged_userns_clone=1 > /etc/sysctl.d/90-unprivileged_userns.conf' | |
# sudo sysctl -p /etc/sysctl.d/90-unprivileged_userns.conf | |
# sudo sysctl --system | |
# uname -r | |
# sudo sh -c 'cat /proc/sys/kernel/unprivileged_userns_clone' | |
# sudo sh -c 'ls /etc/sysctl.d/90-unprivileged_userns.conf' | |
# - name: Verify Singularity capabilities | |
# run: | | |
# singularity build --sandbox ubuntu_sandbox docker://ubuntu:20.04 | |
# singularity exec --userns ubuntu_sandbox uname -a | |
# singularity exec --userns ubuntu_sandbox cat /proc/sys/kernel/unprivileged_userns_clone | |
# # Debugging step: Print environment variables | |
# - name: Print environment variables | |
# run: printenv | |
# Download FASTQ files from Dropbox | |
- name: Download FASTQ files from Dropbox and copy it to local path | |
env: | |
DROPBOX_ACCESS_TOKEN: ${{ secrets.DROPBOX_ACCESS_TOKEN }} | |
run: | | |
source /Users/Dhatrib/miniconda3/etc/profile.d/conda.sh | |
conda activate qcd_env_test | |
export DROPBOX_ACCESS_TOKEN=${DROPBOX_ACCESS_TOKEN} | |
python3 download_fastqs.py | |
- name: Create necessary directories | |
run: | | |
mkdir -p results/2024-12-04_Project_Test_QCD_Pipeline/quality_raw | |
mkdir -p results/2024-12-04_Project_Test_QCD_Pipeline/trimmomatic | |
mkdir -p results/2024-12-04_Project_Test_QCD_Pipeline/raw_coverage | |
mkdir -p results/2024-12-04_Project_Test_QCD_Pipeline/spades | |
# - name: SSh into Actions | |
# uses: actions/checkout@v4 | |
# - name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v3 | |
- name: Snakemake workflow | |
run: | | |
source $CONDA/bin/activate | |
conda activate qcd_env_test | |
snakemake -s QCD.smk -p --use-conda --use-singularity --conda-frontend conda --configfile .test/config/config.yaml --latency-wait 1000 --cores 2 | |
# uses: snakemake/[email protected] | |
# with: | |
# directory: '.' | |
# snakefile: 'QCD.smk' | |
# # stagein: ./mconfig --without-suid && \ | |
# # make -C ./builddir && \ | |
# # make -C ./builddir install | |
# args: '--cores 4 --use-conda --use-docker --use-envmodules --conda-cleanup-pkgs cache -j 999 --conda-frontend conda --configfile .test/config/config.yaml --latency-wait 1000 --singularity-args "--fakeroot"' | |
#run: echo "🍏 This job's status is ${{ job.status }}." |