Skip to content

Commit a7e1dab

Browse files
authored
fix-ci (#107)
* merging mg-scripts * -e * add branch run-ci * run-ci -> merge_mg-scripts * rm extra brench * mv tests files outside src * global changes to mv to tests/ * some missing sequence_processing_pipeline/tests/ * update package_root * ./ -> ../ * comment out cover-package * ../ -> ./ * fixing some tests * fixing some more tests * my_state.json * data/configuration.json -> configuration.json * making sure 211021_A00000_0000_SAMPLE files are not rm * minor change * fix errors * trying to fix some tests * fix some tests * knigt_lab_processing -> knight_lab_processing * cover-package * rm extra comments
1 parent d7aec03 commit a7e1dab

File tree

175 files changed

+33645
-180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+33645
-180
lines changed

.coveragerc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[run]
2+
branch = True
3+
relative_files = True

.github/workflows/qiita-plugin-ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
on:
44
push:
5-
branches: [dev]
5+
branches: [master]
66
pull_request:
77

88
jobs:
@@ -90,11 +90,10 @@ jobs:
9090
pip --quiet install https://github.com/qiita-spots/qtp-job-output-folder/archive/refs/heads/main.zip
9191
9292
# pip --quiet install .
93-
pip install .
93+
export QP_KLP_CONFIG_FP=`pwd`/tests/configuration.json
94+
pip install -e .
9495
pip --quiet install coveralls
9596
96-
export QP_KLP_CONFIG_FP=`pwd`/configuration.json
97-
9897
configure_qtp_job_output_folder --env-script "source /home/runner/.profile; conda activate klp" --ca-cert $QIITA_ROOTCA_CERT
9998
configure_klp --env-script "source /home/runner/.profile; export QP_KLP_CONFIG_FP=$QP_KLP_CONFIG_FP; conda activate klp" --ca-cert $QIITA_ROOTCA_CERT
10099
@@ -131,17 +130,18 @@ jobs:
131130
sleep 10
132131
cat /tmp/supervisord.log
133132
134-
- name: Main tests
133+
- name: qp-knight-lab-processing & mg-scripts tests
135134
shell: bash -l {0}
136135
env:
137136
COVER_PACKAGE: ${{ matrix.cover_package }}
138137
run: |
139138
conda activate klp
140139
export QIITA_ROOTCA_CERT=`pwd`/qiita-dev/qiita_core/support_files/ci_rootca.crt
141140
export QIITA_CONFIG_FP=`pwd`/qiita-dev/qiita_core/support_files/config_test_local.cfg
142-
export QP_KLP_CONFIG_FP=`pwd`/configuration.json
141+
export QP_KLP_CONFIG_FP=`pwd`/tests/configuration.json
143142
export PYTHONWARNINGS="ignore:Certificate for localhost has no \`subjectAltName\`"
144-
nosetests --with-doctest --with-coverage -v --cover-package=qp_klp
143+
nosetests --with-doctest --with-coverage -v --cover-package qp_klp,sequence_processing_pipeline
144+
145145
- uses: codecov/codecov-action@v3
146146
with:
147147
token: ${{ secrets.CODECOV_TOKEN }}
@@ -160,4 +160,4 @@ jobs:
160160
- name: lint
161161
run: |
162162
pip install -q flake8
163-
flake8 qp_klp
163+
flake8 .

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,7 @@ dmypy.json
129129
.pyre/
130130

131131
# ignore local changes
132-
qp_klp/tests/data/sample-sheets/*/*/*.csv
132+
tests/data/sample-sheets/*/*/*.csv
133+
134+
# test output
135+
tests/data/output_dir/

LICENSE

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2014--, Qiita Spots
3+
Copyright (c) 2014, Qiita Spots
4+
Copyright (c) 2020, biocore
5+
Copyright (c) 2021, jdereus
6+
47
All rights reserved.
58

69
Redistribution and use in source and binary forms, with or without

README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Sequence Processing Pipeline
2+
3+
A Jupyter notebook to assist wet lab shotgun pipeline.
4+
A packaged Python-based implementation of Knight Lab's sequencing process pipeline.
5+
6+
## Installation
7+
8+
To install this package, first clone this repository from GitHub:
9+
10+
```bash
11+
git clone https://github.com/biocore/mg-scripts.git
12+
```
13+
14+
Create a Python3 Conda environment in which to run the notebook:
15+
16+
```bash
17+
conda create --yes -n spp python='python=3.9' scikit-learn pandas numpy nose pep8 flake8 matplotlib jupyter notebook 'seaborn>=0.7.1' pip openpyxl 'seqtk>=1.4' click scipy fastq-pair
18+
```
19+
20+
Activate the Conda environment:
21+
22+
```bash
23+
source activate sp_pipeline
24+
```
25+
26+
Change directory to the cloned repository folder and install:
27+
28+
```bash
29+
cd mg-scripts
30+
pip install -e .
31+
```
32+
33+
This will automatically install https://github.com/biocore/metagenomics_pooling_notebook.git, a dependency of mg-scripts and the sequence_processing_pipeline.
34+
35+
## Running Unittests
36+
37+
Change directory to the downloaded repository folder:
38+
39+
```bash
40+
cd mg-scripts
41+
nosetests --with-coverage --cover-inclusive --cover-package sequence_processing_pipeline
42+
```
43+
44+
## Getting Started
45+
46+
Review Pipeline.py and main.py to learn how to import and access package functionality:
47+
48+
```bash
49+
cd mg-scripts/sequence_processing_pipeline
50+
more Pipeline.py
51+
more main.py
52+
```
53+
54+
Adjust configuration settings as needed:
55+
56+
```bash
57+
vi tests/data/configuration.json
58+
```
59+
60+
Please note that the setting 'minimap2_databases' is expected to be a list of paths to individual .mmi files for QCJob.
61+
For NuQCJob, minimap2_databases is expected to be the path to a directory containing two subdirectories: 'metagenomic'
62+
and 'metatranscriptomic'. Each directory should contain or symlink to the appropriate .mmi files needed for that Assay
63+
type.
64+
65+
Additional TellSeq-related notes:
66+
'spades-cloudspades-0.1', 'tellread-release-novaseqX' or similar directories must be placed in a location available to SPP.
67+
Their paths should be made known to SPP in the configuration files. (See examples for details).
68+
Additional scripts found in sequence_processing_pipeline/contrib were contributed by Daniel and Omar and can be similarly located and configured.

pyproject.toml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,28 @@
22
requires = ["setuptools", "setuptools-scm"]
33
build-backend = "setuptools.build_meta"
44

5+
[tool.hatch.build.targets.wheel]
6+
packages = ["qp_klp", "sequence_processing_pipeline"]
7+
8+
[tool.poetry]
9+
packages = [
10+
{ include = "src/qp_klp", from = "./", to = "qp_klp" },
11+
{ include = "src/sequence_processing_pipeline", from = "./", to = "sequence_processing_pipeline" },
12+
]
13+
514
[project]
6-
name = "qp_klp"
15+
name = "knight_lab_processing"
716
# version strings must comply with PEP 440:
817
# https://peps.python.org/pep-0440/
9-
version = "2022.4"
10-
authors = [
11-
{name = "Qiita Development Team", email = "[email protected]"},
12-
]
18+
version = "2025.4"
19+
authors = [{ name = "Qiita Development Team", email = "[email protected]" }]
1320
description = "Qiita Plugin: Knight Lab Processing"
1421
readme = "README.rst"
1522
# ">=" required as most available versions of 3.9 will be "3.9.17" or
1623
# similar.
1724
requires-python = ">=3.9"
1825
keywords = ["bioinformatics", "qiita", "sequence_processing_pipeline"]
19-
license = {text = "BSD"}
26+
license = { text = "BSD" }
2027
classifiers = [
2128
"Development Status :: 5 - Production/Stable",
2229
"License :: OSI Approved :: BSD License",
@@ -27,17 +34,26 @@ classifiers = [
2734
"Programming Language :: Python :: 3.9",
2835
"Programming Language :: Python :: Implementation :: CPython",
2936
"Operating System :: POSIX :: Linux",
30-
"Operating System :: MacOS :: MacOS X"
31-
]
37+
"Operating System :: MacOS :: MacOS X",
38+
]
3239
dependencies = [
3340
"nose>=0.10.1",
3441
"click>=3.3",
3542
"future",
3643
"pandas",
44+
'requests',
45+
'flake8',
46+
'nose',
47+
'coverage',
48+
'pgzip',
49+
'jinja2',
50+
'numpy',
51+
'cython',
3752
"qiita-files@https://github.com/qiita-spots/qiita-files/archive/master.zip",
3853
"qiita_client@https://github.com/qiita-spots/qiita_client/archive/master.zip",
39-
"sequence-processing-pipeline@https://github.com/biocore/mg-scripts/archive/master.zip"
54+
'metapool@https://github.com/biocore/metagenomics_pooling_notebook/archive/master.zip',
4055
]
4156
[project.scripts]
4257
configure_klp = "qp_klp.scripts.configure_klp:config"
4358
start_klp = "qp_klp.scripts.start_klp:execute"
59+
demux = "sequence_processing_pipeline.scripts.cli:demux"

qp_klp/tests/data/configuration.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

qp_klp/tests/data/multiqc-bclconvert-config.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)