Skip to content

Commit

Permalink
Updated test config files and automated unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Keshav committed May 14, 2024
1 parent ca5382f commit 4c94542
Show file tree
Hide file tree
Showing 12 changed files with 69 additions and 61 deletions.
104 changes: 56 additions & 48 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,61 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# This workflow configures the environment and executes NEAT read-simulator tests using relative paths for a series of configuration files individually
# For more information on using Python with GitHub Actions, refer to:
# https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: NEAT unit tests
name: NEAT Unit Tests

on:
push:
branches:
branches: [develop, main]
pull_request:
branches:

#jobs:
# build:
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v3
# - uses: s-weigand/[email protected]
# with:
# conda-channels: bioconda, conda-forge
# activate-conda: true
# repository: NCSA/NEAT
# - name: basic test
# run: |
# conda env create -f environment.yml -n test_neat
# conda activate test_neat
# poetry install
# neat
#
# - name: run coverage tests
# run: |
# conda activate test_neat
# python tests/coverage_tests.py

# - name: lint with flake8
# run: |
# conda activate neat
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# - name: Execute test_gen_reads
# run: |
# conda activate neat
# cd ${{ github.workspace }}
# poetry install
# neat --log-level ERROR --no-log read-simulator -c data/test_config.yml -o test
# - run: echo "This job's status is ${{ job.status }}."
# - name: Execute seq_err_model_test
# run: |
# cd ${{ github.workspace }}
# neat --log-level ERROR --no-log model-seq-err -i data/baby.fastq
# - run: echo "This job's status is ${{ job.status }}."
branches: [main]

jobs:
detailed_test_execution:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: s-weigand/[email protected]
with:
conda-channels: [bioconda, conda-forge]
activate-conda: true
repository: NCSA/NEAT
- name: Environment Setup
run: |
conda env create -f environment.yml -n test_neat
conda activate test_neat
poetry install
cd config_template
- name: Run NEAT Simulation for config_test1
run: python -m neat --log-level DEBUG read-simulator -c config_test1.yml -o ../outputs/test1_read-simulator

- name: Run NEAT Simulation for config_test2
run: python -m neat --log-level DEBUG read-simulator -c config_test2.yml -o ../outputs/test2_read-simulator

- name: Run NEAT Simulation for config_test3
run: python -m neat --log-level DEBUG read-simulator -c config_test3.yml -o ../outputs/test3_read-simulator

- name: Run NEAT Simulation for config_test4
run: python -m neat --log-level DEBUG read-simulator -c config_test4.yml -o ../outputs/test4_read-simulator

- name: Run NEAT Simulation for config_test5
run: python -m neat --log-level DEBUG read-simulator -c config_test5.yml -o ../outputs/test5_read-simulator

- name: Run NEAT Simulation for config_test6
run: python -m neat --log-level DEBUG read-simulator -c config_test6.yml -o ../outputs/test6_read-simulator

- name: Run NEAT Simulation for config_test7
run: python -m neat --log-level DEBUG read-simulator -c config_test7.yml -o ../outputs/test7_read-simulator

- name: Run NEAT Simulation for config_test8
run: python -m neat --log-level DEBUG read-simulator -c config_test8.yml -o ../outputs/test8_read-simulator

- name: Run NEAT Simulation for config_test9
run: python -m neat --log-level DEBUG read-simulator -c config_test9.yml -o ../outputs/test9_read-simulator

- name: Run NEAT Simulation for config_test10
run: python -m neat --log-level DEBUG read-simulator -c config_test10.yml -o ../outputs/test10_read-simulator

- name: Run NEAT Simulation for config_test11
run: python -m neat --log-level DEBUG read-simulator -c config_test11.yml -o ../outputs/test11_read-simulator
2 changes: 1 addition & 1 deletion config_template/config_test1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Absolute path to input reference fasta file
# type = string | required: yes
reference: /user/path/NEAT/data/H1N1.fa
reference: ../data/H1N1.fa

# How to partition the reference for analysis. By default, NEAT will
# attempt to process one contig per thread. However, if you have very
Expand Down
2 changes: 1 addition & 1 deletion config_template/config_test10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Absolute path to input reference fasta file
# type = string | required: yes
reference: /user/path/NEAT/data/H1N1.fa
reference: ../data/H1N1.fa

# How to partition the reference for analysis. By default, NEAT will
# attempt to process one contig per thread. However, if you have very
Expand Down
2 changes: 1 addition & 1 deletion config_template/config_test11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Absolute path to input reference fasta file
# type = string | required: yes
reference: /user/path/NEAT/data/H1N1.fa
reference: ../data/H1N1.fa

# How to partition the reference for analysis. By default, NEAT will
# attempt to process one contig per thread. However, if you have very
Expand Down
2 changes: 1 addition & 1 deletion config_template/config_test2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Absolute path to input reference fasta file
# type = string | required: yes
reference: /user/path/NEAT/data/H1N1.fa
reference: ../data/H1N1.fa

# How to partition the reference for analysis. By default, NEAT will
# attempt to process one contig per thread. However, if you have very
Expand Down
2 changes: 1 addition & 1 deletion config_template/config_test3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Absolute path to input reference fasta file
# type = string | required: yes
reference: /user/path/NEAT/data/H1N1.fa
reference: ../data/H1N1.fa

# How to partition the reference for analysis. By default, NEAT will
# attempt to process one contig per thread. However, if you have very
Expand Down
4 changes: 2 additions & 2 deletions config_template/config_test4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Absolute path to input reference fasta file
# type = string | required: yes
reference: /user/path/NEAT/data/H1N1.fa
reference: ../data/H1N1.fa

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

# Absolute path to GC content model generated by compute_gc.py
# type: string | required = no | default: <NEAT_DIR>/neat/models/defaults/default_gc_bias_model.pickle.gz
Expand Down
4 changes: 2 additions & 2 deletions config_template/config_test5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Absolute path to input reference fasta file
# type = string | required: yes
reference: /user/path/NEAT/data/H1N1.fa
reference: ../data/H1N1.fa

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

# Scalar value for coverage in regions outside the targeted bed. Example 0.5
# would get you roughly half the coverage as the on target areas. Default is
Expand Down
2 changes: 1 addition & 1 deletion config_template/config_test6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Absolute path to input reference fasta file
# type = string | required: yes
reference: /user/path/NEAT/data/H1N1.fa
reference: ../data/H1N1.fa

# How to partition the reference for analysis. By default, NEAT will
# attempt to process one contig per thread. However, if you have very
Expand Down
2 changes: 1 addition & 1 deletion config_template/config_test7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Absolute path to input reference fasta file
# type = string | required: yes
reference: /user/path/NEAT/data/H1N1.fa
reference: ../data/H1N1.fa

# How to partition the reference for analysis. By default, NEAT will
# attempt to process one contig per thread. However, if you have very
Expand Down
2 changes: 1 addition & 1 deletion config_template/config_test8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Absolute path to input reference fasta file
# type = string | required: yes
reference: /user/path/NEAT/data/H1N1.fa
reference: ../data/H1N1.fa

# How to partition the reference for analysis. By default, NEAT will
# attempt to process one contig per thread. However, if you have very
Expand Down
2 changes: 1 addition & 1 deletion config_template/config_test9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Absolute path to input reference fasta file
# type = string | required: yes
reference: /user/path/NEAT/data/H1N1.fa
reference: ../data/H1N1.fa

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

0 comments on commit 4c94542

Please sign in to comment.