Skip to content

Commit f76790c

Browse files
Merge pull request #21 from databio/dev
Release v0.1.0
2 parents ac4548d + 23df69d commit f76790c

Some content is hidden

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

50 files changed

+2478
-923
lines changed

.github/workflows/python-publish.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This workflows will upload a Python Package using Twine when a release is created
2-
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3-
41
name: Upload Python Package
52

63
on:
@@ -11,21 +8,22 @@ jobs:
118
deploy:
129

1310
runs-on: ubuntu-latest
11+
name: upload release to PyPI
12+
permissions:
13+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
1414

1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717
- name: Set up Python
18-
uses: actions/setup-python@v2
18+
uses: actions/setup-python@v5
1919
with:
2020
python-version: '3.x'
2121
- name: Install dependencies
2222
run: |
2323
python -m pip install --upgrade pip
2424
pip install setuptools wheel twine
2525
- name: Build and publish
26-
env:
27-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
28-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
2926
run: |
3027
python setup.py sdist bdist_wheel
31-
twine upload dist/*
28+
- name: Publish package distributions to PyPI
29+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/run-pytest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## we can't run test, but lets just install all dependencies and package
2-
name: Run instalation test
2+
name: Installation test
33

44
on:
55
push:
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15-
python-version: ["3.8", "3.10"]
15+
python-version: ["3.8", "3.11"]
1616
os: [ubuntu-latest]
1717

1818
steps:

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ __pycache__/
88

99
# Distribution / packaging
1010
.Python
11+
.ruff_cache/
1112
build/
1213
develop-eggs/
1314
dist/
@@ -134,3 +135,8 @@ bedqc/*
134135
test/bedqc/*
135136

136137
openSignalMatrix
138+
139+
out2023/*
140+
141+
# test data
142+
test/test_data/*

.pre-commit-config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
repos:
2+
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
3+
- repo: https://github.com/psf/black-pre-commit-mirror
4+
rev: 24.1.1
5+
hooks:
6+
- id: black
7+
# It is recommended to specify the latest version of Python
8+
# supported by your project here, or alternatively use
9+
# pre-commit's default_language_version, see
10+
# https://pre-commit.com/#top_level-default_language_version
11+
language_version: python3.10

MANIFEST.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ include bedboss/*
44
include bedboss/bedstat/*
55
include bedboss/bedstat/tools/*
66
include bedboss/bedmaker/*
7-
include bedboss/bedqc/*
7+
include bedboss/bedqc/*
8+
include bedboss/qdrant_index/*
9+
include bedboss/bedbuncher/*
10+
include bedboss/bedbuncher/tools/*
11+
include bedboss/bedclassifier/*

README.md

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,58 @@
11
# bedboss
22

3-
---
3+
[![PEP compatible](https://pepkit.github.io/img/PEP-compatible-green.svg)](https://pep.databio.org/)
44
![Run pytests](https://github.com/bedbase/bedboss/workflows/Run%20instalation%20test/badge.svg)
5-
[![docs-badge](https://readthedocs.org/projects/bedboss/badge/?version=latest)](https://bedboss.databio.org/en/latest/)
6-
[![pypi-badge](https://img.shields.io/pypi/v/bedboss)](https://pypi.org/project/bedboss)
5+
[![pypi-badge](https://img.shields.io/pypi/v/bedboss?color=%2334D058)](https://pypi.org/project/bedboss)
6+
[![pypi-version](https://img.shields.io/pypi/pyversions/bedboss.svg?color=%2334D058)](https://pypi.org/project/bedboss)
77
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
8+
[![Github badge](https://img.shields.io/badge/source-github-354a75?logo=github)](https://github.com/databio/bedboss)
9+
10+
---
11+
12+
**Documentation**: <a href="https://docs.bedbase.org/bedboss" target="_blank">https://docs.bedbase.org/bedboss</a>
13+
14+
**Source Code**: <a href="https://github.com/databio/bedboss" target="_blank">https://github.com/databio/bedboss</a>
15+
16+
---
17+
18+
bedboss is a command-line pipeline that filters, standardizes, and calculates statistics for genomic interval data,
19+
and enters the results into a BEDbase database.
20+
21+
## Installation
22+
To install `bedboss` use this command:
23+
```
24+
pip install bedboss
25+
```
26+
or install the latest version from the GitHub repository:
27+
```
28+
pip install git+https://github.com/databio/bedboss.git
29+
```
30+
31+
## Development
32+
For development, you should install all the dependencies, create a virtual environment, and work on the local database.
33+
The workflow is described in the [development documentation](https://docs.bedbase.org/bedboss/development).
834

9-
bedboss is a command-line pipeline that standardizes and calculates statistics for genomic interval data, and enters the results into a BEDbase database. It has 3 components: 1) bedmaker (`bedboss make`); 2) bedqc (`bedboss qc`); and 3) bedstat `bedboss stat`. You may run all 3 pipelines separately, together (`bedbase all`).
1035

11-
## 1) bedmaker
36+
## Testing
1237

13-
Converts supported file types into BED and bigBed format. Currently supported formats:
14-
- bedGraph
15-
- bigBed
16-
- bigWig
17-
- wig
38+
### Requirements test:
1839

19-
## 2) bedqc
40+
To test requirements, install bedboss and run:
2041

21-
Assess QC of BED files and flag potential problems for further evaluation so you can determine whether they should be included in downstream analysis.
22-
Currently, it flags BED files that are larger than 2 GB, have over 5 milliom regions, or have mean region width less than 10 bp.
23-
These thresholds can be changed with pipeline arguments.
42+
```
43+
bedboss requirements-check
44+
```
2445

25-
## bedstat
46+
### Smoke tests:
2647

27-
Calculates statistics about BED files.
48+
Use this docs:
49+
- [./test/README.md](./test/README.md)
2850

29-
# Documentation
3051

31-
Detailed information about each pipeline can be found in the [bedboss Readme](./docs/README.md).
52+
## How to generate usage documentation:
3253

33-
For the specific bedbase.org instance, see instructions in the bedbase.org repo.
54+
Run this command in the root of the repository:
55+
```
56+
cd scripts
57+
bash update_usage_docs.sh
58+
```

bedboss/__init__.py

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
""" Package-level data """
2+
23
import logmuse
34
import coloredlogs
5+
import logging
46

5-
from bedboss import *
67

78
# from bedboss.bedqc.bedqc import bedqc
89
# from bedboss.bedmaker.bedmaker import BedMaker
910
# from bedboss.bedstat.bedstat import bedstat
1011
from bedboss._version import __version__
11-
from bedboss.bedboss import run_all, run_all_by_pep, bedqc, BedMaker, bedstat
12+
from bedboss.bedboss import (
13+
run_all,
14+
insert_pep,
15+
bedqc,
16+
bedstat,
17+
run_bedbuncher,
18+
)
19+
from bedboss.bedmaker.bedmaker import BedMaker
1220

1321

1422
__package_name__ = "bedboss"
@@ -32,12 +40,41 @@
3240
"BedMaker",
3341
"bedstat",
3442
"run_all",
35-
"run_all_by_pep",
43+
"insert_pep",
44+
"run_bedbuncher",
3645
]
3746

3847
_LOGGER = logmuse.init_logger("bedboss")
3948
coloredlogs.install(
4049
logger=_LOGGER,
4150
datefmt="%H:%M:%S",
42-
fmt="[%(levelname)s] [%(asctime)s] %(message)s",
51+
fmt="[%(levelname)s] [%(asctime)s] [BEDBOSS] %(message)s",
52+
)
53+
54+
_LOGGER_PIPESTAT = logging.getLogger("pipestat")
55+
coloredlogs.install(
56+
logger=_LOGGER_PIPESTAT,
57+
datefmt="%H:%M:%S",
58+
fmt="[%(levelname)s] [%(asctime)s] [PIPESTAT] %(message)s",
59+
)
60+
61+
_LOGGER_GENIML = logging.getLogger("geniml")
62+
coloredlogs.install(
63+
logger=_LOGGER_GENIML,
64+
datefmt="%H:%M:%S",
65+
fmt="[%(levelname)s] [%(asctime)s] [GENIML] %(message)s",
66+
)
67+
68+
_LOGGER_BBCONF = logging.getLogger("bbconf")
69+
coloredlogs.install(
70+
logger=_LOGGER_BBCONF,
71+
datefmt="%H:%M:%S",
72+
fmt="[%(levelname)s] [%(asctime)s] [BBCONF] %(message)s",
73+
)
74+
75+
_LOGGER_BBCONF = logging.getLogger("pephubclient")
76+
coloredlogs.install(
77+
logger=_LOGGER_BBCONF,
78+
datefmt="%H:%M:%S",
79+
fmt="[%(levelname)s] [%(asctime)s] [PEPHUBCLIENT] %(message)s",
4380
)

bedboss/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.1.0a4"
1+
__version__ = "0.1.0"

0 commit comments

Comments
 (0)