Explicitly request bash not sh (since pipefail is a bashism), fixes #185 #321
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: compile and e.coli | |
on: | |
push: | |
paths: | |
- '**.sm' | |
- '**.py' | |
- '**.sh' | |
- 'src/*' | |
- '.github/workflows/*.yml' | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build_linux: | |
name: Linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Compile | |
run: | | |
cd src | |
make -j 2 | |
- name: Setup Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Setup Conda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
mamba-version: "*" | |
channels: conda-forge,bioconda | |
python-version: 3.8 | |
- name: Install snakemake-minimal | |
run: | | |
mamba install -c conda-forge -c bioconda snakemake-minimal MBG GraphAligner mashmap winnowmap | |
- name: Fetch Data | |
run: | | |
curl -L https://obj.umiacs.umd.edu/sergek/shared/ecoli_hifi_subset24x.fastq.gz -o hifi.fastq.gz | |
curl -L https://obj.umiacs.umd.edu/sergek/shared/ecoli_ont_subset50x.fastq.gz -o ont.fastq.gz | |
curl -L https://obj.umiacs.umd.edu/sergek/shared/ecoli-test-cache.tar -o cache.tar | |
tar -xf cache.tar | |
- name: Assemble | |
run: | | |
reportLogs() { | |
for fn in `find . -name \*err -print` ; do | |
echo "" | |
echo "==BEGIN $fn" | |
cat $fn | |
echo "==END $fn" | |
done | |
exit 1 | |
} | |
export PATH=${PATH}:$CONDA/bin | |
rm -f mbg.sh | |
rm -f ga.sh | |
rm -f lib/verkko/bin/utgcns | |
echo > mbg.sh '#!/bin/sh' | |
echo >> mbg.sh 'xz -dc ../../cache/hifi-resolved.gfa.xz > hifi-resolved.gfa' | |
echo >> mbg.sh 'cp ../../cache/hifi_nodecov.csv hifi_nodecov.csv' | |
echo >> mbg.sh 'xz -dc ../../cache/paths.gaf.xz > paths.gaf' | |
echo > ga.sh '#!/bin/sh' | |
echo >> ga.sh 'if [ ! -e "graph" ] ; then' | |
echo >> ga.sh ' touch graph' | |
echo >> ga.sh ' touch empty.gaf' | |
echo >> ga.sh 'else' | |
echo >> ga.sh ' xz -dc ../../cache/aligned001.WORKING.gaf.xz > aligned001.WORKING.gaf' | |
echo >> ga.sh 'fi' | |
echo > lib/verkko/bin/utgcns '#!/bin/sh' | |
echo >> lib/verkko/bin/utgcns 'if [ ! -e part001.fasta ]; then' | |
echo >> lib/verkko/bin/utgcns 'cp ../../cache/part001.fasta packages/part001.fasta.WORKING' | |
echo >> lib/verkko/bin/utgcns 'fi' | |
echo >> lib/verkko/bin/utgcns '' | |
echo >> lib/verkko/bin/utgcns 'if [ ! -e part002.fasta ]; then' | |
echo >> lib/verkko/bin/utgcns 'cp ../../cache/part002.fasta packages/part002.fasta.WORKING' | |
echo >> lib/verkko/bin/utgcns 'fi' | |
chmod 755 mbg.sh | |
chmod 755 ga.sh | |
chmod 755 lib/verkko/bin/utgcns | |
./bin/verkko -d asm --no-correction --mbg $PWD/mbg.sh --graphaligner $PWD/ga.sh --hifi ./hifi.fastq.gz --nano ./ont.fastq.gz || reportLogs |