-
Notifications
You must be signed in to change notification settings - Fork 2
153 lines (137 loc) · 5.61 KB
/
test_pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
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
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
with:
python-version: '3.10'
auto-update-conda: true
activate-environment: 'qcd_env_test'
environment-file: 'qcd_environment.yaml'
use-channel-priority: true
- name: Install pip dependencies
run: |
source $CONDA/bin/activate
conda activate qcd_env_test
pip install --requirement .test/requirements.txt
pip install dropbox
pip install --upgrade tabulate
pip install --upgrade snakemake
# - 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 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 $CONDA/bin/activate
conda activate qcd_env_test
export DROPBOX_ACCESS_TOKEN=${DROPBOX_ACCESS_TOKEN}
python3 download_fastqs.py
# - name: SSh into Actions
# uses: actions/checkout@v4
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- 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 4
uses: snakemake/[email protected]
with:
directory: '.'
snakefile: 'QCD.smk'
# stagein: ./mconfig --without-suid && \
# make -C ./builddir && \
# make -C ./builddir install
task: 'containerize'
args: '--cores 4 --use-conda --use-singularity --conda-cleanup-pkgs cache -j 999 --conda-frontend conda --configfile .test/config/config.yaml --latency-wait 1000'
#run: echo "🍏 This job's status is ${{ job.status }}."