GitHub Actions CI toy example #5
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: GitHub Actions CI toy example | |
on: | |
#push: | |
# paths-ignore: | |
# - '**.md' | |
workflow_dispatch: | |
jobs: | |
toy-example: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, ubuntu-22.04] | |
name: Toy Test GH linux | |
runs-on: ${{ matrix.os }} | |
env: | |
EXE_AGC: ../agc | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: make CXX=g++-11 agc | |
run: make CXX=g++-11 agc | |
#CREATE | |
- name: toy example create | |
run: | | |
cd toy_ex | |
$EXE_AGC create -o toy.agc ref.fa a.fa b.fa c.fa | |
- name: toy example create (+gz) | |
run: | | |
cd toy_ex | |
gzip -k a.fa | |
gzip -k b.fa | |
gzip -k c.fa | |
gzip -k ref.fa | |
$EXE_AGC create -d -o t1.agc a.fa.gz a.fa | |
$EXE_AGC create -o t2.agc b.fa.gz b.fa | |
$EXE_AGC create -t 3 -d -o toygz.agc ref.fa.gz a.fa.gz b.fa.gz c.fa.gz | |
- name: toy example listref | |
run: | | |
cd toy_ex | |
echo -n "ref" > rr | |
$EXE_AGC listref toy_ex.agc > r | |
cmp r rr | |
- name: toy example listset | |
run: | | |
cd toy_ex | |
printf "a\nb\nc\nref\n" > list | |
$EXE_AGC listset toy.agc > list_dec | |
cmp list list_dec | |
- name: toy example listctg | |
run: | | |
cd toy_ex | |
printf "a\n chr1a\n chr3a\n" > list | |
$EXE_AGC listctg toy.agc a > list_dec | |
cmp list list_dec | |
- name: toy example getset | |
run: | | |
cd toy_ex | |
$EXE_AGC getset toy.agc a > a_dec.fa | |
$EXE_AGC getset toy.agc b > b_dec.fa | |
$EXE_AGC getset toy.agc c > c_dec.fa | |
$EXE_AGC getset toy.agc ref > ref_dec.fa | |
cmp a.fa a_dec.fa | |
cmp b.fa b_dec.fa | |
cmp c.fa c_dec.fa | |
cmp ref.fa ref_dec.fa | |
- name: toy example getset -g (+gz) | |
run: | | |
cd toy_ex | |
$EXE_AGC getset -g 9 toygz.agc a > a_dec.fa.gz | |
gzip -df a_dec.fa.gz | |
$EXE_AGC getset -g 6 toy.agc b > b_dec.fa.gz | |
gzip -df b_dec.fa.gz | |
$EXE_AGC getset toygz.agc c > c_dec.fa | |
$EXE_AGC getset -g 2 toy.agc ref > ref_dec.fa.gz | |
gzip -df ref_dec.fa.gz | |
cmp a.fa a_dec.fa | |
cmp b.fa b_dec.fa | |
cmp c.fa c_dec.fa | |
cmp ref.fa ref_dec.fa | |
- name: toy example getcol | |
run: | | |
cd toy_ex | |
mkdir getcol | |
$EXE_AGC getcol -o getcol toy.agc | |
cmp a.fa getcol/a.fa | |
cmp b.fa getcol/b.fa | |
cmp c.fa getcol/c.fa | |
cmp ref.fa getcol/ref.fa | |
- name: toy example getctg | |
run: | | |
cd toy_ex | |
head -n 2 a.fa > chr1a.fa | |
$EXE_AGC getctg toy.agc chr1a > chr1a_dec.fa | |
cmp chr1a.fa chr1a_dec.fa | |
tail -n 2 b.fa > t.fa | |
$EXE_AGC getctg toy.agc t > t_dec.fa | |
cmp t.fa t_dec.fa | |
head -n 2 ref.fa > ref-chr1.fa | |
$EXE_AGC getctg toy.agc chr1@ref > ref-chr1_dec.fa | |
cmp ref-chr1.fa ref-chr1_dec.fa | |
echo ">chr1:3-10" > ctg.fa | |
echo "TAGCTAGC" >> ctg.fa | |
$EXE_AGC getctg toy.agc chr1@ref:3-10 > ctg_dec.fa | |
cmp ctg.fa ctg_dec.fa | |
echo ">chr3a:1-3" > ctg.fa | |
echo "GTT" >> ctg.fa | |
$EXE_AGC getctg toy.agc chr3a:1-3 > ctg_dec.fa | |
cmp ctg.fa ctg_dec.fa | |
echo ">g h i 21:3-4" > ctg.fa | |
echo "AG" >> ctg.fa | |
$EXE_AGC getctg toy.agc g:3-4 > ctg_dec.fa | |
cmp ctg.fa ctg_dec.fa | |
#CREATE-C | |
- name: toy example create -c AND -a -c | |
run: | | |
cd toy_ex | |
$EXE_AGC create -c -o toy.agc ref2.fa c.fa | |
$EXE_AGC create -a -c ref2.fa b.fa > toy2.agc | |
- name: toy example listset -c | |
run: | | |
cd toy_ex | |
printf "1\n2\n3\nchr1\n" > list | |
$EXE_AGC listset toy.agc > list_dec | |
cmp list list_dec | |
printf "c\nchr1\ng\nt\n" > list | |
$EXE_AGC listset toy2.agc > list_dec | |
cmp list list_dec | |
- name: toy example getset -c | |
run: | | |
cd toy_ex | |
$EXE_AGC getset toy.agc chr1 > chr1_dec.fa | |
$EXE_AGC getset toy.agc 1 > 1_dec.fa | |
$EXE_AGC getset toy.agc 2 > 2_dec.fa | |
$EXE_AGC getset toy.agc 3 > 3_dec.fa | |
head -n 2 c.fa > 1.fa | |
head -n 4 c.fa | tail -n 2 > 2.fa | |
tail -n 2 c.fa > 3.fa | |
cmp 1.fa 1_dec.fa | |
cmp 2.fa 2_dec.fa | |
cmp 3.fa 3_dec.fa | |
cmp ref2.fa chr1_dec.fa | |
$EXE_AGC getset toy2.agc chr1 > chr1_dec.fa | |
cmp ref2.fa chr1_dec.fa | |
$EXE_AGC getset toy2.agc c > c_dec.fa | |
$EXE_AGC getset toy2.agc g > g_dec.fa | |
$EXE_AGC getset toy2.agc t > t_dec.fa | |
sed -n '3p;4p' < b.fa > g.fa | |
sed -n '5p;6p' < b.fa > c.fa | |
sed -n '7p;8p' < b.fa > t.fa | |
cmp g.fa g_dec.fa | |
cmp c.fa c_dec.fa | |
cmp t.fa t_dec.fa | |
- name: toy example getcol -c | |
run: | | |
cd toy_ex | |
rm -rf getcol | |
mkdir getcol | |
$EXE_AGC getcol -o getcol toy.agc | |
cmp 1.fa getcol/1.fa | |
cmp 2.fa getcol/2.fa | |
cmp 3.fa getcol/3.fa | |
cmp ref2.fa getcol/chr1.fa | |
rm -rf getcol | |
mkdir getcol | |
$EXE_AGC getcol -o getcol toy2.agc | |
cmp c.fa getcol/c.fa | |
cmp t.fa getcol/t.fa | |
cmp g.fa getcol/g.fa | |
cmp ref2.fa getcol/chr1.fa | |
- name: toy example getctg -c | |
run: | | |
cd toy_ex | |
$EXE_AGC getctg toy.agc chr1 > chr1_dec.fa | |
cmp ref2.fa chr1_dec.fa | |
echo ">chr1:3-7" > ctg.fa | |
echo "TAGCT" >> ctg.fa | |
$EXE_AGC getctg toy.agc chr1:3-7 > ctg_dec.fa | |
cmp ctg.fa ctg_dec.fa | |
echo ">3:3-10" > ctg.fa | |
echo "TCCCGGGA" >> ctg.fa | |
$EXE_AGC getctg toy.agc 3:3-10 > ctg_dec.fa | |
cmp ctg.fa ctg_dec.fa | |
echo ">g h i 21:3-4" > ctg.fa | |
echo "AG" >> ctg.fa | |
$EXE_AGC getctg toy2.agc g:3-4 > ctg_dec.fa | |
cmp ctg.fa ctg_dec.fa | |
#APPEND | |
- name: toy example create-append-getset | |
run: | | |
cd toy_ex | |
$EXE_AGC create -o tmp0.agc ref.fa | |
$EXE_AGC append tmp0.agc a.fa > tmp1.agc | |
$EXE_AGC append tmp1.agc b.fa > tmp2.agc | |
$EXE_AGC append tmp2.agc c.fa > toy_app.agc | |
$EXE_AGC getset toy_app.agc a > a_dec.fa | |
$EXE_AGC getset toy_app.agc b > b_dec.fa | |
$EXE_AGC getset toy_app.agc c > c_dec.fa | |
$EXE_AGC getset toy_app.agc ref > ref_dec.fa | |
cmp a.fa a_dec.fa | |
cmp b.fa b_dec.fa | |
cmp c.fa c_dec.fa | |
cmp ref.fa ref_dec.fa | |
- name: toy example append listset | |
run: | | |
cd toy_ex | |
printf "a\nb\nc\nref\n" > list | |
$EXE_AGC listset toy_app.agc > list_dec | |
cmp list list_dec | |
- name: toy example append listctg | |
run: | | |
cd toy_ex | |
printf "a\n chr1a\n chr3a\n" > list | |
$EXE_AGC listctg toy_app.agc a > list_dec | |
cmp list list_dec | |
- name: toy example append getcol | |
run: | | |
cd toy_ex | |
mkdir getcola | |
$EXE_AGC getcol -o getcola toy_app.agc | |
cmp a.fa getcola/a.fa | |
cmp b.fa getcola/b.fa | |
cmp c.fa getcola/c.fa | |
cmp ref.fa getcola/ref.fa | |
- name: toy example append getctg | |
run: | | |
cd toy_ex | |
head -n 2 a.fa > chr1a.fa | |
$EXE_AGC getctg toy_app.agc chr1a > chr1a_dec.fa | |
cmp chr1a.fa chr1a_dec.fa | |
tail -n 2 b.fa > t.fa | |
$EXE_AGC getctg toy_app.agc t > t_dec.fa | |
cmp t.fa t_dec.fa | |
head -n 2 ref.fa > ref-chr1.fa | |
$EXE_AGC getctg toy_app.agc chr1@ref > ref-chr1_dec.fa | |
cmp ref-chr1.fa ref-chr1_dec.fa | |
echo ">chr1:3-10" > ctg.fa | |
echo "TAGCTAGC" >> ctg.fa | |
$EXE_AGC getctg toy_app.agc chr1@ref:3-10 > ctg_dec.fa | |
cmp ctg.fa ctg_dec.fa | |
echo ">chr3a:1-3" > ctg.fa | |
echo "GTT" >> ctg.fa | |
$EXE_AGC getctg toy_app.agc chr3a:1-3 > ctg_dec.fa | |
cmp ctg.fa ctg_dec.fa | |
#ADAPTIVE APPEND | |
- name: toy example create-append adaptive-getset | |
run: | | |
cd toy_ex | |
$EXE_AGC create -a -o tmp0.agc ref.fa | |
$EXE_AGC append -a tmp0.agc a.fa > tmp1.agc | |
$EXE_AGC append -a tmp1.agc b.fa > tmp2.agc | |
$EXE_AGC append -a tmp2.agc c.fa > toy_app.agc | |
$EXE_AGC getset toy_app.agc a > a_dec.fa | |
$EXE_AGC getset toy_app.agc b > b_dec.fa | |
$EXE_AGC getset toy_app.agc c > c_dec.fa | |
$EXE_AGC getset toy_app.agc ref > ref_dec.fa | |
cmp a.fa a_dec.fa | |
cmp b.fa b_dec.fa | |
cmp c.fa c_dec.fa | |
cmp ref.fa ref_dec.fa | |
- name: toy example append adaptive listset | |
run: | | |
cd toy_ex | |
printf "a\nb\nc\nref\n" > list | |
$EXE_AGC listset toy_app.agc > list_dec | |
cmp list list_dec | |
- name: toy example append adaptive listctg | |
run: | | |
cd toy_ex | |
printf "a\n chr1a\n chr3a\n" > list | |
$EXE_AGC listctg toy_app.agc a > list_dec | |
cmp list list_dec | |
- name: toy example append adaptive getcol | |
run: | | |
cd toy_ex | |
mkdir getcolaa | |
$EXE_AGC getcol -o getcolaa toy_app.agc | |
cmp a.fa getcolaa/a.fa | |
cmp b.fa getcolaa/b.fa | |
cmp c.fa getcolaa/c.fa | |
cmp ref.fa getcolaa/ref.fa | |
- name: toy example append adaptive getctg | |
run: | | |
cd toy_ex | |
head -n 2 a.fa > chr1a.fa | |
$EXE_AGC getctg toy_app.agc chr1a > chr1a_dec.fa | |
cmp chr1a.fa chr1a_dec.fa | |
tail -n 2 b.fa > t.fa | |
$EXE_AGC getctg toy_app.agc t > t_dec.fa | |
cmp t.fa t_dec.fa | |
head -n 2 ref.fa > ref-chr1.fa | |
$EXE_AGC getctg toy_app.agc chr1@ref > ref-chr1_dec.fa | |
cmp ref-chr1.fa ref-chr1_dec.fa | |
echo ">chr1:3-10" > ctg.fa | |
echo "TAGCTAGC" >> ctg.fa | |
$EXE_AGC getctg toy_app.agc chr1@ref:3-10 > ctg_dec.fa | |
cmp ctg.fa ctg_dec.fa | |
echo ">chr3a:1-3" > ctg.fa | |
echo "GTT" >> ctg.fa | |
$EXE_AGC getctg toy_app.agc chr3a:1-3 > ctg_dec.fa | |
cmp ctg.fa ctg_dec.fa | |
toy-example-macos: | |
strategy: | |
matrix: | |
os: [macos-latest, macos-14, macos-13, macos-12] | |
name: Make Test GitHub macos | |
runs-on: ${{ matrix.os }} | |
env: | |
EXE_AGC: ../agc | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
# xcode-version: '14.1' | |
- name: make CXX=g++-11 agc | |
run: | | |
make clean | |
make CXX=g++-11 agc | |
- name: toy example | |
run: | | |
cd toy_ex | |
$EXE_AGC | |
$EXE_AGC create | |
$EXE_AGC create -o toy.agc ref.fa a.fa b.fa c.fa | |
$EXE_AGC getset toy.agc a > a_dec.fa | |
cmp a.fa a_dec.fa | |