Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ts add test action #546

Merged
merged 22 commits into from
Aug 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/nosetests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Python package

on: [push]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9"]
os: [ubuntu-latest, macOS-latest]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 nose pep8 pyyaml
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- 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=10 --max-line-length=127 --statistics
- name: Install
run: |
python setup.py install
- name: Test with nosetests
run: |
export PYTHONHASHSEED=0
nosetests -v tests/test_umi_tools.py
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ regex
scipy
matplotlib
pybktree
python>=3.5
20 changes: 0 additions & 20 deletions test_umi_tools.sh

This file was deleted.

8 changes: 1 addition & 7 deletions tests/test_umi_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
PYTHON_VERSION = platform.python_version()
IS_PY3 = sys.version_info.major >= 3

TRAVIS = os.environ.get("TRAVIS", False) == "true"
JENKINS = os.environ.get("USER", "") == "jenkins"

SUBDIRS = ("gpipe", "optic")

Expand Down Expand Up @@ -237,7 +235,7 @@ def test_tool():
fn = 'tests/tests.yaml'
assert os.path.exists(fn), "tests.yaml does not exist!"

tool_tests = yaml.load(open(fn))
tool_tests = yaml.safe_load(open(fn))

for test, values in sorted(list(tool_tests.items())):
check_script.description = os.path.join(tool_name, test)
Expand All @@ -248,10 +246,6 @@ def test_tool():
if PYTHON_VERSION.startswith(x)]
if len(versions) > 0:
continue
if "skip_travis" in values and TRAVIS:
continue
if "skip_jenkins" in values and JENKINS:
continue

yield(check_script,
test,
Expand Down
12 changes: 6 additions & 6 deletions tests/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ extract_indrop_output_filtered:
stdin: indrop.fastq.1.gz
outputs: [stdout, indrop_fuzzy_filtered.1.fastq.gz, indrop_fuzzy_filtered.2.fastq.gz]
references: [indrop_extract_fuzzy_filtered_out.fastq, indrop_fuzzy_filtered.1.fastq.gz, indrop_fuzzy_filtered.2.fastq.gz]
options: umi_tools extract --extract-method=regex --read2-in=<DIR>/indrop.fastq.2.gz --bc-pattern="(?P<cell_1>.{8,12})(?P<discard_2>GAGTGATTGCTTGTGACGCCTT{s<=2})(?P<cell_3>.{8})(?P<umi_1>.{6})T{3}.*" --read2-stdout --error-correct-cell --whitelist=<DIR>/indrop_fuzzy_whitelist.tsv --filtered-out=indrop_fuzzy_filtered.1.fastq.gz --filtered-out2=indrop_fuzzy_filtered.2.fastq.gz
options: extract --extract-method=regex --read2-in=<DIR>/indrop.fastq.2.gz --bc-pattern="(?P<cell_1>.{8,12})(?P<discard_2>GAGTGATTGCTTGTGACGCCTT{s<=2})(?P<cell_3>.{8})(?P<umi_1>.{6})T{3}.*" --read2-stdout --error-correct-cell --whitelist=<DIR>/indrop_fuzzy_whitelist.tsv --filtered-out=indrop_fuzzy_filtered.1.fastq.gz --filtered-out2=indrop_fuzzy_filtered.2.fastq.gz

extract_scrb_seq_prefiltered:
stdin: scrb_filtered_fastq.1.gz
Expand All @@ -85,7 +85,7 @@ whitelist_indrop:
stdin: indrop.fastq.1.gz
outputs: [stdout]
references: [indrop_whitelist.tsv]
options: whitelist --extract-method=regex --bc-pattern="(?P<cell_1>.{8,12})(?P<discard_2>GAGTGATTGCTTGTGACGCCTT)(?P<cell_3>.{8})(?P<umi_1>.{6})T{3}.*" -L test.log
options: whitelist --extract-method=regex --bc-pattern="(?P<cell_1>.{8,12})(?P<discard_2>GAGTGATTGCTTGTGACGCCTT)(?P<cell_3>.{8})(?P<umi_1>.{6})T{3}.*" -L test.log

whitelist_indrop_filtered_out:
stdin: indrop.fastq.1.gz
Expand Down Expand Up @@ -225,7 +225,7 @@ dedup_single_sep:
stdin: chr19_sep.bam
outputs: [stdout]
references: [single_sep_py3.sam]
options: "dedup -L test.log --out-sam --random-seed=123456789 --method=directional --umi-separator=:"
options: "dedup -L test.log --out-sam --random-seed=123456789 --method=directional --umi-separator=:"

dedup_single_tag:
stdin: chr19_tag.bam
Expand All @@ -247,10 +247,10 @@ dedup_single_gene_tag:

dedup_paired_umi_whitelist:
sort: True
stdin: whitelist_umi_input.bam
stdin: whitelist_umi_input.bam
outputs: [stdout]
references: [whitelist_umi_output.sam]
options: dedup --paired --log=test.log --filter-umi --umi-whitelist=<DIR>/umi_whitelist.tsv --umi-whitelist-paired=<DIR>/umi_whitelist.tsv --out-sam --random-seed=123456789
options: dedup --paired --log=test.log --filter-umi --umi-whitelist=<DIR>/umi_whitelist.tsv --umi-whitelist-paired=<DIR>/umi_whitelist.tsv --out-sam --random-seed=123456789

dedup_paired_ignore_tlen_tag:
stdin: paired.bam
Expand Down Expand Up @@ -280,7 +280,7 @@ group_adjacency:
stdin: chr19.bam
outputs: [stdout, group_adj_py3.tsv]
references: [group_adj_py3.sam, group_adj_py3.tsv]
options: group -L test.log --out-sam --random-seed=123456789 --method=adjacency --output-bam --out-sam --group-out=group_adj_py3.tsv
options: group -L test.log --out-sam --random-seed=123456789 --method=adjacency --output-bam --out-sam --group-out=group_adj_py3.tsv

group_directional:
stdin: chr19.bam
Expand Down
Loading