Skip to content

Commit 4c94542

Browse files
committed
Updated test config files and automated unit tests.
1 parent ca5382f commit 4c94542

12 files changed

+69
-61
lines changed

.github/workflows/python-app.yml

+56-48
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,61 @@
1-
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
1+
# This workflow configures the environment and executes NEAT read-simulator tests using relative paths for a series of configuration files individually
2+
# For more information on using Python with GitHub Actions, refer to:
3+
# https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
34

4-
name: NEAT unit tests
5+
name: NEAT Unit Tests
56

67
on:
78
push:
8-
branches:
9+
branches: [develop, main]
910
pull_request:
10-
branches:
11-
12-
#jobs:
13-
# build:
14-
# runs-on: ubuntu-latest
15-
#
16-
# steps:
17-
# - uses: actions/checkout@v3
18-
# - uses: s-weigand/[email protected]
19-
# with:
20-
# conda-channels: bioconda, conda-forge
21-
# activate-conda: true
22-
# repository: NCSA/NEAT
23-
# - name: basic test
24-
# run: |
25-
# conda env create -f environment.yml -n test_neat
26-
# conda activate test_neat
27-
# poetry install
28-
# neat
29-
#
30-
# - name: run coverage tests
31-
# run: |
32-
# conda activate test_neat
33-
# python tests/coverage_tests.py
34-
35-
# - name: lint with flake8
36-
# run: |
37-
# conda activate neat
38-
# # stop the build if there are Python syntax errors or undefined names
39-
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
40-
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
41-
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
42-
# - name: Execute test_gen_reads
43-
# run: |
44-
# conda activate neat
45-
# cd ${{ github.workspace }}
46-
# poetry install
47-
# neat --log-level ERROR --no-log read-simulator -c data/test_config.yml -o test
48-
# - run: echo "This job's status is ${{ job.status }}."
49-
# - name: Execute seq_err_model_test
50-
# run: |
51-
# cd ${{ github.workspace }}
52-
# neat --log-level ERROR --no-log model-seq-err -i data/baby.fastq
53-
# - run: echo "This job's status is ${{ job.status }}."
11+
branches: [main]
12+
13+
jobs:
14+
detailed_test_execution:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: s-weigand/[email protected]
19+
with:
20+
conda-channels: [bioconda, conda-forge]
21+
activate-conda: true
22+
repository: NCSA/NEAT
23+
- name: Environment Setup
24+
run: |
25+
conda env create -f environment.yml -n test_neat
26+
conda activate test_neat
27+
poetry install
28+
cd config_template
29+
30+
- name: Run NEAT Simulation for config_test1
31+
run: python -m neat --log-level DEBUG read-simulator -c config_test1.yml -o ../outputs/test1_read-simulator
32+
33+
- name: Run NEAT Simulation for config_test2
34+
run: python -m neat --log-level DEBUG read-simulator -c config_test2.yml -o ../outputs/test2_read-simulator
35+
36+
- name: Run NEAT Simulation for config_test3
37+
run: python -m neat --log-level DEBUG read-simulator -c config_test3.yml -o ../outputs/test3_read-simulator
38+
39+
- name: Run NEAT Simulation for config_test4
40+
run: python -m neat --log-level DEBUG read-simulator -c config_test4.yml -o ../outputs/test4_read-simulator
41+
42+
- name: Run NEAT Simulation for config_test5
43+
run: python -m neat --log-level DEBUG read-simulator -c config_test5.yml -o ../outputs/test5_read-simulator
44+
45+
- name: Run NEAT Simulation for config_test6
46+
run: python -m neat --log-level DEBUG read-simulator -c config_test6.yml -o ../outputs/test6_read-simulator
47+
48+
- name: Run NEAT Simulation for config_test7
49+
run: python -m neat --log-level DEBUG read-simulator -c config_test7.yml -o ../outputs/test7_read-simulator
50+
51+
- name: Run NEAT Simulation for config_test8
52+
run: python -m neat --log-level DEBUG read-simulator -c config_test8.yml -o ../outputs/test8_read-simulator
53+
54+
- name: Run NEAT Simulation for config_test9
55+
run: python -m neat --log-level DEBUG read-simulator -c config_test9.yml -o ../outputs/test9_read-simulator
56+
57+
- name: Run NEAT Simulation for config_test10
58+
run: python -m neat --log-level DEBUG read-simulator -c config_test10.yml -o ../outputs/test10_read-simulator
59+
60+
- name: Run NEAT Simulation for config_test11
61+
run: python -m neat --log-level DEBUG read-simulator -c config_test11.yml -o ../outputs/test11_read-simulator

config_template/config_test1.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# Absolute path to input reference fasta file
1313
# type = string | required: yes
14-
reference: /user/path/NEAT/data/H1N1.fa
14+
reference: ../data/H1N1.fa
1515

1616
# How to partition the reference for analysis. By default, NEAT will
1717
# attempt to process one contig per thread. However, if you have very

config_template/config_test10.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# Absolute path to input reference fasta file
1313
# type = string | required: yes
14-
reference: /user/path/NEAT/data/H1N1.fa
14+
reference: ../data/H1N1.fa
1515

1616
# How to partition the reference for analysis. By default, NEAT will
1717
# attempt to process one contig per thread. However, if you have very

config_template/config_test11.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# Absolute path to input reference fasta file
1313
# type = string | required: yes
14-
reference: /user/path/NEAT/data/H1N1.fa
14+
reference: ../data/H1N1.fa
1515

1616
# How to partition the reference for analysis. By default, NEAT will
1717
# attempt to process one contig per thread. However, if you have very

config_template/config_test2.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# Absolute path to input reference fasta file
1313
# type = string | required: yes
14-
reference: /user/path/NEAT/data/H1N1.fa
14+
reference: ../data/H1N1.fa
1515

1616
# How to partition the reference for analysis. By default, NEAT will
1717
# attempt to process one contig per thread. However, if you have very

config_template/config_test3.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# Absolute path to input reference fasta file
1313
# type = string | required: yes
14-
reference: /user/path/NEAT/data/H1N1.fa
14+
reference: ../data/H1N1.fa
1515

1616
# How to partition the reference for analysis. By default, NEAT will
1717
# attempt to process one contig per thread. However, if you have very

config_template/config_test4.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# Absolute path to input reference fasta file
1313
# type = string | required: yes
14-
reference: /user/path/NEAT/data/H1N1.fa
14+
reference: ../data/H1N1.fa
1515

1616
# How to partition the reference for analysis. By default, NEAT will
1717
# attempt to process one contig per thread. However, if you have very
@@ -103,7 +103,7 @@ mutation_rate: 0.01
103103
# Rates must be in the fourth column and be of the form "mut_rate=x.xx"
104104
# Rates must be between 0.00 and 0.03
105105
# type: string | required = no
106-
mutation_bed: /user/path/NEAT/data/H1N1.bed
106+
mutation_bed: ../data/H1N1.bed
107107

108108
# Absolute path to GC content model generated by compute_gc.py
109109
# type: string | required = no | default: <NEAT_DIR>/neat/models/defaults/default_gc_bias_model.pickle.gz

config_template/config_test5.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# Absolute path to input reference fasta file
1313
# type = string | required: yes
14-
reference: /user/path/NEAT/data/H1N1.fa
14+
reference: ../data/H1N1.fa
1515

1616
# How to partition the reference for analysis. By default, NEAT will
1717
# attempt to process one contig per thread. However, if you have very
@@ -69,7 +69,7 @@ input_variants: .
6969
# Absolute path to bed file containing reference regions that the simulation
7070
# should target.
7171
# type = string | required = no
72-
target_bed: /user/path/NEAT/data/H1N1.bed
72+
target_bed: ../data/H1N1.bed
7373

7474
# Scalar value for coverage in regions outside the targeted bed. Example 0.5
7575
# would get you roughly half the coverage as the on target areas. Default is

config_template/config_test6.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# Absolute path to input reference fasta file
1313
# type = string | required: yes
14-
reference: /user/path/NEAT/data/H1N1.fa
14+
reference: ../data/H1N1.fa
1515

1616
# How to partition the reference for analysis. By default, NEAT will
1717
# attempt to process one contig per thread. However, if you have very

config_template/config_test7.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# Absolute path to input reference fasta file
1313
# type = string | required: yes
14-
reference: /user/path/NEAT/data/H1N1.fa
14+
reference: ../data/H1N1.fa
1515

1616
# How to partition the reference for analysis. By default, NEAT will
1717
# attempt to process one contig per thread. However, if you have very

config_template/config_test8.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# Absolute path to input reference fasta file
1313
# type = string | required: yes
14-
reference: /user/path/NEAT/data/H1N1.fa
14+
reference: ../data/H1N1.fa
1515

1616
# How to partition the reference for analysis. By default, NEAT will
1717
# attempt to process one contig per thread. However, if you have very

config_template/config_test9.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# Absolute path to input reference fasta file
1313
# type = string | required: yes
14-
reference: /user/path/NEAT/data/H1N1.fa
14+
reference: ../data/H1N1.fa
1515

1616
# How to partition the reference for analysis. By default, NEAT will
1717
# attempt to process one contig per thread. However, if you have very

0 commit comments

Comments
 (0)