-
Notifications
You must be signed in to change notification settings - Fork 3
101 lines (96 loc) · 3.55 KB
/
unit-testing.Listeria.Kraken1.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
# This is a subsampling unit test to get early results
on:
push:
branches: [master, dev, esearch-input]
name: Listeria-with-Kraken1
env:
TSV: "Kalamari/src/Listeria.tsv"
OUTDIR: "Listeria.out"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-20.04' ]
perl: [ '5.32' ]
name: Perl ${{ matrix.perl }} on ${{ matrix.os }}
steps:
- name: Set up perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
multi-thread: "true"
- name: checkout my repo
uses: actions/checkout@v4
with:
path: Kalamari
- name: env check
run: |
echo $PATH | tr ':' '\n' | sort
- name: apt-get install
run: sudo apt-get install ca-certificates tree
- name: install jellyfish
run: |
wget https://github.com/gmarcais/Jellyfish/releases/download/v1.1.12/jellyfish-linux -O jellyfish1
chmod -v +x jellyfish1
ln -sv jellyfish1 jellyfish
echo $(realpath .) >> $GITHUB_PATH
tree $(realpath .)
- name: install-edirect
run: |
sh -c "$(curl -fsSL https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/install-edirect.sh)"
echo $HOME/edirect >> $GITHUB_PATH
echo $GITHUB_WORKSPACE/Kalamari/bin >> $GITHUB_PATH
tree $HOME/edirect
- name: check-env
run: echo "$PATH"
- name: select for only Listeria
run: |
head -n 1 Kalamari/src/chromosomes.tsv > ${{ env.TSV }}
grep -m 2 Listeria Kalamari/src/chromosomes.tsv >> ${{ env.TSV }}
echo "These are the Listeria genomes for downstream tests"
column -ts $'\t' ${{ env.TSV }}
hexdump -c ${{ env.TSV }}
- name: download
run: |
perl Kalamari/bin/downloadKalamari.pl --outdir ${{ env.OUTDIR }} ${{ env.TSV }}
find ${{ env.OUTDIR }} -name '*.fasta.gz' | xargs gunzip -v
- name: check-results
run: tree ${{ env.OUTDIR }}
- name: install kraken
run: |
wget https://github.com/DerrickWood/kraken/archive/refs/tags/v1.1.1.tar.gz -O kraken-v1.1.1.tar.gz
tar zxvf kraken-v1.1.1.tar.gz
cd kraken-1.1.1 && bash install_kraken.sh kraken-src && cd -
chmod -v +x kraken-1.1.1/kraken-src/*
echo $(realpath kraken-1.1.1/kraken-src) >> $GITHUB_PATH
tree $(realpath) kraken-1.1.1
- name: build taxonomy
run: |
export PATH=$PATH:Kalamari/bin
buildTaxonomy.sh
ls -lh Kalamari/share
- name: Kraken1 database
run: |
echo $PATH
which kraken-build
mkdir -pv kraken
cp -rv Kalamari/share/kalamari-*/taxonomy kraken/taxonomy
find ${{ env.OUTDIR }} -name '*.fasta' -exec kraken-build --db kraken --add-to-library {} \;
tree kraken
# Some super debugging here with -x
#sed -i.bak 's/set -e/set -e; set -x/' $(which build_kraken_db.sh)
#grep -v '^#' -m 20 -C 2 $a_bin/build_kraken_db.sh
echo ".....Building the database....."
kraken-build --minimizer-len 9 --rebuild --db kraken --threads 2 --work-on-disk
- name: Kraken1 query
run: |
QUERY=$(find ${{ env.OUTDIR }} -name '*.fasta' | head -n 1)
echo "Query is $QUERY"
kraken --db kraken -output kraken.raw --fasta-input $QUERY
- name: Kraken1 view results
run: |
tree kraken
ls -lhSR kraken
echo
head kraken.raw