-
Notifications
You must be signed in to change notification settings - Fork 1
107 lines (94 loc) · 3.5 KB
/
action.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
name: CI
# specify trigger events for ci workflow
on:
push:
branches: [main]
pull_request:
types: [opened, edited, reopened, synchronize, review_requested]
jobs:
# apply formating and linting
Format:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Apply snakefmt
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LINTER_RULES_PATH: snekmer/rules/
VALIDATE_SNAKEMAKE_SNAKEFMT: true
# run all tests
Test:
runs-on: ubuntu-20.04
needs:
- Format
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: actions/checkout@v3
- name: Build test environment
uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
channels: anaconda,conda-forge,bioconda,numba
auto-activate-base: false
activate-environment: snekmer
environment-file: .test/test-env.yml
- shell: bash -l {0}
run: |
conda info
conda list
conda config --show
- shell: bash -l {0}
run: mamba install -y -c conda-forge snakemake==7.0 tabulate==0.8.10
- shell: bash -l {0}
run: pip install -e git+https://github.com/PNNL-CompBio/Snekmer@kmer-association#egg=snekmer
#test clustering step
- name: Snekmer Cluster
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
conda info --envs
source activate snekmer
conda config --get channel_priority --json
snekmer cluster --configfile .test/config.yaml -d .test
rm -rf .test/output
# --use-conda --conda-cleanup-pkgs cache --show-failed-logs --conda-frontend mamba
# run modeling step and move output files for search
- name: Snekmer Model
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate snekmer
snekmer model --configfile .test/config.yaml -d .test --cores 1
mkdir .test/output/example-model
mv .test/output/model/*.model .test/output/example-model/
mv .test/output/kmerize/*.kmers .test/output/example-model/
mv .test/output/scoring/*.scorer .test/output/example-model/
# search against previously generated model files
- name: Snekmer Search
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate snekmer
ls .test
pwd
snekmer search --configfile .test/config.yaml -d .test --cores 1
rm -rf .test/output
# run Snekmer Learn kmer counts and confidence creation
- name: Snekmer Learn
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate snekmer
snekmer learn --configfile .test/config_learnapp.yaml -d .test --cores 1
mkdir .test/counts .test/confidence
mv .test/output/learn/kmer-counts-total.csv .test/counts/kmer-counts-total.csv
mv .test/output/eval_conf/global-confidence-scores.csv .test/confidence/global-confidence-scores.csv
rm -rf .test/output
# run Snekmer Learn against previously generated counts files
- name: Snekmer Apply
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate snekmer
snekmer apply --configfile .test/config_learnapp.yaml -d .test --cores 1
rm -rf .test/output