Skip to content

v5.6.3

v5.6.3 #110

# This is a subsampling unit test to get early results
on:
push:
branches: [master, dev, validate-taxonomy]
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: |
sudo apt-get install ncbi-entrez-direct
echo "installed edirect the apt way"
exit
cd $HOME
perl -MNet::FTP -e '$ftp = new Net::FTP("ftp.ncbi.nlm.nih.gov", Passive => 1); $ftp->login; $ftp->binary; $ftp->get("/entrez/entrezdirect/edirect.tar.gz");'
gunzip -cv edirect.tar.gz | tar xf -
rm -v edirect.tar.gz
echo $GITHUB_WORKSPACE/edirect >> $GITHUB_PATH
echo $GITHUB_WORKSPACE/Kalamari/bin >> $GITHUB_PATH
#export PATH=${PATH}:$HOME/edirect >& /dev/null || setenv PATH "${PATH}:$HOME/edirect"
yes Y | ./edirect/setup.sh
tree 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