-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
117 lines (110 loc) · 6.43 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
language: python
python:
- "3.6"
- "3.7"
- "3.8"
deploy:
provider: pypi
user: dizak
password: $pypi_passwd
distributions: sdist
on:
tags: true
branch: master
python: 3.6
before_install:
- pip install pylint
install:
- python setup.py sdist
- pip install dist/mothulity-*.tar.gz
before_script:
- mkdir $HOME/db/
- hash ktImportXML
- hash mothur
script:
# Linter
- pylint mothulity/*py
- pylint mothulity/messages/*py
# Doctests
- python -m doctest mothulity/utilities.py -v
# Unittests
- python -m unittest -v tests.tests
# Test-run files copying
- mothulity --get-test-run-data
# Debug ls
- ls test_run_database
- ls test_run_samples
# Database download test
- mothulity_dbaser $HOME/db --unite-ITS-02
# Set persistent databases paths
- mothulity --set-align-database-path test_data/database/t19.align --set-taxonomy-database-path test_data/database/t19.tax
# Run new analysis on multiple samples.
- mothulity test_data/new_run/mltp_smpl/fastq -r bash -n travis_job
## Check results files list
- ls --hide "mothur*logfile" test_data/new_run/mltp_smpl/fastq/ > test_files_list
- diff test_data/new_run/mltp_smpl/results/files_list test_files_list --ignore-blank-lines --ignore-trailing-space --ignore-matching-lines "mothur*logfile"
## Check shared file content
- diff <(awk '{print $1,$2}' test_data/new_run/mltp_smpl/fastq/*shared) <(awk '{print $1,$2}' test_data/analysis/mltp_smpl/shared_tax/*shared)
## Check tax.summary file content
- diff <(awk '{if ($1 <= 3) print $1,$2,$3}' test_data/new_run/mltp_smpl/fastq/*cons.tax.summary) <(awk '{if ($1 <= 3) print $1,$2,$3}' test_data/analysis/mltp_smpl/shared_tax/*cons.tax.summary)
## Check the HTML report presence
- ls test_data/new_run/mltp_smpl/fastq/analysis/OTU/analysis_travis_job.html
## Check the script content
- diff test_data/new_run/mltp_smpl/script/travis_job.sh travis_job.sh --ignore-blank-lines --ignore-trailing-space
# Run new analysis on a single sample.
- mothulity test_data/new_run/single_smpl/fastq -r bash -n travis_job
## Check results files list
- ls --hide "mothur*logfile" test_data/new_run/single_smpl/fastq/ > test_files_list
- diff test_data/new_run/single_smpl/results/files_list test_files_list --ignore-blank-lines --ignore-trailing-space --ignore-matching-lines "mothur*logfile"
## Check shared file content
- diff <(awk '{print $1,$2}' test_data/new_run/single_smpl/fastq/*shared) <(awk '{print $1,$2}' test_data/analysis/single_smpl/shared_tax/*shared)
## Check tax.summary file content
- diff <(awk '{if ($1 <= 3) print $1,$2,$3}' test_data/new_run/single_smpl/fastq/*cons.tax.summary) <(awk '{if ($1 <= 3) print $1,$2,$3}' test_data/analysis/single_smpl/shared_tax/*cons.tax.summary)
## Check the HTML report presence
- ls test_data/new_run/single_smpl/fastq/analysis/OTU/analysis_travis_job.html
## Check the script content
- diff test_data/new_run/single_smpl/script/travis_job.sh travis_job.sh --ignore-blank-lines --ignore-trailing-space
# Run analysis on multiple samples
- mothulity test_data/analysis/mltp_smpl/shared_tax -r bash -n analysis_travis_job --analysis-only
## Check results files list
- ls --hide "mothur*logfile" test_data/analysis/mltp_smpl/shared_tax/analysis/OTU/ > test_files_list
- diff test_data/analysis/mltp_smpl/results/files_list test_files_list --ignore-blank-lines --ignore-trailing-space --ignore-matching-lines "mothur*logfile"
## Check the script content
- diff test_data/analysis/mltp_smpl/script/analysis_travis_job.sh analysis_travis_job.sh --ignore-blank-lines --ignore-trailing-space
# Run analysis on a single sample
- mothulity test_data/analysis/single_smpl/shared_tax -r bash -n analysis_travis_job --analysis-only
## Check results files list
- ls --hide "mothur*logfile" test_data/analysis/single_smpl/shared_tax/analysis/OTU/ > test_files_list
- diff test_data/analysis/single_smpl/results/files_list test_files_list --ignore-blank-lines --ignore-trailing-space --ignore-matching-lines "mothur*logfile"
## Check the script content
- diff test_data/analysis/single_smpl/script/analysis_travis_job.sh analysis_travis_job.sh --ignore-blank-lines --ignore-trailing-space
# Remove run
- rm -r test_data/new_run/mltp_smpl/fastq/!(*fastq)
# Check slurm add/list/use
## Add slurm setting
- mothulity . --add-slurm-setting "name=travis partition=test nodes=1 processors=12 exclusive"
## List slurm setting
- diff <(mothulity . --list-slurm-settings | sort) <(sort test_data/logs/list_slurm_settings.log) --ignore-blank-lines --ignore-trailing-space
## Generate mothur script with slurm flags
- mothulity test_data/new_run/mltp_smpl/fastq --dry-run -r sbatch -n travis_job_slurm --use-slurm-setting travis
- cat travis_job_slurm.sh
- diff <(sort test_data/new_run/mltp_smpl/script/travis_job_slurm.sh) <(sort travis_job_slurm.sh) --ignore-blank-lines --ignore-trailing-space
# Check how mothulity refuses to work with dashed directories
- mothulity test_data/dashed-dir/fastq --dry-run -r bash > test_dashed_path.log || true
- diff test_data/logs/dashed_path.log test_dashed_path.log --ignore-blank-lines --ignore-trailing-space
# Check how mothulty saves setting to config file before running the analysis
- mothulity test_data/new_run/mltp_smpl/fastq --dry-run -r bash -n travis_job --set-main-config-path test_data/config/mothulity.config > test_config_success.log
- diff test_data/logs/config_success.log test_config_success.log --ignore-blank-lines --ignore-trailing-space
# Check how mothulity refuses to save settign to non-existing config file
- mothulity test_data/new_run/mltp_smpl/fastq --dry-run -r bash -n travis_job --set-main-config-path test_data/config/ > test_config_fail.log
- diff test_data/logs/config_fail.log test_config_fail.log --ignore-blank-lines --ignore-trailing-space
# Check how mothulity proceedes with customizing alignment database (for v3v4 region)
- mothulity test_data/new_run/mltp_smpl/fastq --dry-run -r bash -n travis_job --alignment-region v3v4 > test_cut_db_v3v4.log
- diff test_data/logs/cut_db_v3v4.log test_cut_db_v3v4.log --ignore-blank-lines --ignore-trailing-space
# Check how mothulity refuse performing alignment database custamization (wrong coordinates)
- mothulity test_data/new_run/mltp_smpl/fastq --dry-run -r bash -n travis_job --alignment-region 123-v4 > test_cut_db_fail.log || true
- diff test_data/logs/cut_db_fail.log test_cut_db_fail.log --ignore-blank-lines --ignore-trailing-space
notifications:
email:
on_success: never
on_failure: always