Skip to content

Commit 9fd801a

Browse files
authored
Merge pull request #23 from NBISweden/develop
Fix an issue where prebuilt kraken database could not be unpacked
2 parents 49dd582 + 75199f2 commit 9fd801a

2 files changed

Lines changed: 7 additions & 32 deletions

File tree

.github/workflows/main.yml

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: CI
22

33
on:
4+
workflow_dispatch:
5+
branches:
6+
- main
7+
- develop
48
push:
59
paths-ignore:
610
- 'README.md'
@@ -34,25 +38,11 @@ jobs:
3438
- name: Cutadapt
3539
run: |
3640
snakemake --use-conda -j 4 --configfile .test/config/cutadapt.yaml -p --notemp qc
37-
snakemake -j 1 --configfile .test/config/cutadapt.yaml --report report.html qc
38-
# Upload sample report
39-
- name: Upload cutadapt report
40-
uses: actions/upload-artifact@v1
41-
with:
42-
name: ${{ runner.os }}-cutadapt.html
43-
path: report.html
4441
# Test all other preprocessing software except cutadapt (10k reads/sample)
4542
- name: Preprocess
4643
run: |
4744
rm -rf results report.html
4845
snakemake --use-conda -j 4 --configfile .test/config/preprocess.yaml -p qc
49-
snakemake --use-conda -j 4 --configfile .test/config/preprocess.yaml -p --report report.html qc
50-
# Upload samples report
51-
- name: Upload samples report
52-
uses: actions/upload-artifact@v1
53-
with:
54-
name: ${{ runner.os }}-samples_report.html
55-
path: report.html
5646
# Run kraken for sample1 (paired-end) and sample4 (single-end) (10k reads/sample)
5747
- name: Kraken
5848
run: |
@@ -72,13 +62,6 @@ jobs:
7262
- name: Metabat
7363
run: |
7464
snakemake --use-conda -j 4 --configfile .test/config/metabat.yaml -p bin assemble
75-
snakemake --use-conda -j 4 --configfile .test/config/metabat.yaml -p --report report.html bin assemble
76-
# Upload report
77-
- name: Upload snakemake report
78-
uses: actions/upload-artifact@v1
79-
with:
80-
name: ${{ runner.os }}-test_report.html
81-
path: report.html
8265
8366
test_linux:
8467
runs-on: ubuntu-latest
@@ -106,13 +89,3 @@ jobs:
10689
- name: Binning
10790
run: |
10891
snakemake --use-conda -j 4 --configfile .test/config/binning.yaml -p assemble bin
109-
# Create report for assembly and binning
110-
- name: Snakemake report
111-
run: |
112-
snakemake --use-conda -j 4 --configfile .test/config/binning.yaml -p --report report.html assemble bin
113-
# Upload report
114-
- name: Upload snakemake report
115-
uses: actions/upload-artifact@v1
116-
with:
117-
name: ${{ runner.os }}-test_linux_report.html
118-
path: report.html

workflow/rules/classification.smk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ rule download_kraken_build:
3838
mkdir -p {params.tmpdir}
3939
curl -L -o {params.tar} {params.url} > {log} 2>&1
4040
tar -C {params.tmpdir} -xf {params.tar}
41-
mv {params.tmpdir}/*/* {params.dir}
41+
hashfile=$(find {params.tmpdir}/ -name "hash.k2d")
42+
hashdir=$(dirname $hashfile)
43+
mv $hashdir/* {params.dir}
4244
rm -r {params.tar} {params.tmpdir}
4345
"""
4446

0 commit comments

Comments
 (0)