-
Notifications
You must be signed in to change notification settings - Fork 3
121 lines (110 loc) · 3.74 KB
/
ci.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
118
119
120
121
# https://github.com/actions/starter-workflows/blob/main/ci/python-package-conda.yml
name: ci
on:
push:
branches:
- master
- tests
paths-ignore:
- "README.md"
- "docs/**"
pull_request:
branches:
- master
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "3 14 15 * *"
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
max-parallel: 5
steps:
- uses: actions/checkout@v3
with:
ref: "master"
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Add Conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
conda install flake8 pytest pytest-cov
- name: Lint with flake8
run: |
# 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=30 \
--max-line-length=127 --statistics
- name: Test with pytest
run: |
python -m pytest
- name: Generate coverage report
run: |
python -m pytest --cov=fba --cov-report=xml
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v1
with:
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: true
verbose: true
- name: Install fba
run: |
pip install -e .
- name: Inspect files
run: |
ls -l ${GITHUB_WORKSPACE}
ls -l ${GITHUB_WORKSPACE}/fba
ls -l ${GITHUB_WORKSPACE}/tests/
- name: Test qc, extract, count, demultiplex
run: |
fba
ls -l ${GITHUB_WORKSPACE}/tests/qc-extract-count-demultiplex
cd ${GITHUB_WORKSPACE}/tests/qc-extract-count-demultiplex
fba qc -1 read_R1.fq.gz -2 read_R2.fq.gz \
-w cell_barcodes.tsv.gz -f feature_barcodes.tsv.bz2 \
-t 2 -n 2000 --chunk_size 400 --output_directory test_qc
fba extract -1 read_R1.fq.gz -2 read_R2.fq.gz \
-w cell_barcodes.tsv.gz \
-f feature_barcodes.tsv.bz2 \
-o test_feature_barcoding_output.tsv.gz \
--read1_coordinate 0,16 \
--read2_coordinate 31,51 \
-cb_m 2 -fb_m 1
fba count -i test_feature_barcoding_output.tsv.gz \
-o test_matrix_featurecount.csv.gz
fba demultiplex -i matrix_featurecount.csv.gz \
-q 0.75 -cm kmedoids -v -vm umap \
--output_directory test_demultiplexed
- name: Test map
run: |
ls -l ${GITHUB_WORKSPACE}/tests/map
cd ${GITHUB_WORKSPACE}/tests/map
# bwa
fba map -1 read_R1.fq.gz -2 read_R2.fq.gz \
-w cell_barcodes.tsv.gz \
-f features.tsv.bz2 \
-o test_matrix_featurecount.csv.gz \
--read1_coordinate 0,16 \
--output_directory test_barcode_mapping \
--num_n_ref 0
# bowtie2
fba map -1 read_R1.fq.gz -2 read_R2.fq.gz \
-w cell_barcodes.tsv.gz \
-f features.tsv.bz2 \
-o test_matrix_featurecount.csv.gz \
--read1_coordinate 0,16 \
-al bowtie2 \
--mapq 10 \
--output_directory test_barcode_mapping \
--num_n_ref 0