Skip to content

Commit

Permalink
Merge pull request #21 from databio/dev
Browse files Browse the repository at this point in the history
Release v0.1.0
  • Loading branch information
khoroshevskyi authored Feb 29, 2024
2 parents ac4548d + 23df69d commit f76790c
Show file tree
Hide file tree
Showing 50 changed files with 2,478 additions and 923 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
Expand All @@ -11,21 +8,22 @@ jobs:
deploy:

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

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
4 changes: 2 additions & 2 deletions .github/workflows/run-pytest.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## we can't run test, but lets just install all dependencies and package
name: Run instalation test
name: Installation test

on:
push:
Expand All @@ -12,7 +12,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.8", "3.10"]
python-version: ["3.8", "3.11"]
os: [ubuntu-latest]

steps:
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ __pycache__/

# Distribution / packaging
.Python
.ruff_cache/
build/
develop-eggs/
dist/
Expand Down Expand Up @@ -134,3 +135,8 @@ bedqc/*
test/bedqc/*

openSignalMatrix

out2023/*

# test data
test/test_data/*
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
repos:
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.1.1
hooks:
- id: black
# It is recommended to specify the latest version of Python
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
language_version: python3.10
6 changes: 5 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ include bedboss/*
include bedboss/bedstat/*
include bedboss/bedstat/tools/*
include bedboss/bedmaker/*
include bedboss/bedqc/*
include bedboss/bedqc/*
include bedboss/qdrant_index/*
include bedboss/bedbuncher/*
include bedboss/bedbuncher/tools/*
include bedboss/bedclassifier/*
63 changes: 44 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,58 @@
# bedboss

---
[![PEP compatible](https://pepkit.github.io/img/PEP-compatible-green.svg)](https://pep.databio.org/)
![Run pytests](https://github.com/bedbase/bedboss/workflows/Run%20instalation%20test/badge.svg)
[![docs-badge](https://readthedocs.org/projects/bedboss/badge/?version=latest)](https://bedboss.databio.org/en/latest/)
[![pypi-badge](https://img.shields.io/pypi/v/bedboss)](https://pypi.org/project/bedboss)
[![pypi-badge](https://img.shields.io/pypi/v/bedboss?color=%2334D058)](https://pypi.org/project/bedboss)
[![pypi-version](https://img.shields.io/pypi/pyversions/bedboss.svg?color=%2334D058)](https://pypi.org/project/bedboss)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Github badge](https://img.shields.io/badge/source-github-354a75?logo=github)](https://github.com/databio/bedboss)

---

**Documentation**: <a href="https://docs.bedbase.org/bedboss" target="_blank">https://docs.bedbase.org/bedboss</a>

**Source Code**: <a href="https://github.com/databio/bedboss" target="_blank">https://github.com/databio/bedboss</a>

---

bedboss is a command-line pipeline that filters, standardizes, and calculates statistics for genomic interval data,
and enters the results into a BEDbase database.

## Installation
To install `bedboss` use this command:
```
pip install bedboss
```
or install the latest version from the GitHub repository:
```
pip install git+https://github.com/databio/bedboss.git
```

## Development
For development, you should install all the dependencies, create a virtual environment, and work on the local database.
The workflow is described in the [development documentation](https://docs.bedbase.org/bedboss/development).

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`).

## 1) bedmaker
## Testing

Converts supported file types into BED and bigBed format. Currently supported formats:
- bedGraph
- bigBed
- bigWig
- wig
### Requirements test:

## 2) bedqc
To test requirements, install bedboss and run:

Assess QC of BED files and flag potential problems for further evaluation so you can determine whether they should be included in downstream analysis.
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.
These thresholds can be changed with pipeline arguments.
```
bedboss requirements-check
```

## bedstat
### Smoke tests:

Calculates statistics about BED files.
Use this docs:
- [./test/README.md](./test/README.md)

# Documentation

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

For the specific bedbase.org instance, see instructions in the bedbase.org repo.
Run this command in the root of the repository:
```
cd scripts
bash update_usage_docs.sh
```
45 changes: 41 additions & 4 deletions bedboss/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
""" Package-level data """

import logmuse
import coloredlogs
import logging

from bedboss import *

# from bedboss.bedqc.bedqc import bedqc
# from bedboss.bedmaker.bedmaker import BedMaker
# from bedboss.bedstat.bedstat import bedstat
from bedboss._version import __version__
from bedboss.bedboss import run_all, run_all_by_pep, bedqc, BedMaker, bedstat
from bedboss.bedboss import (
run_all,
insert_pep,
bedqc,
bedstat,
run_bedbuncher,
)
from bedboss.bedmaker.bedmaker import BedMaker


__package_name__ = "bedboss"
Expand All @@ -32,12 +40,41 @@
"BedMaker",
"bedstat",
"run_all",
"run_all_by_pep",
"insert_pep",
"run_bedbuncher",
]

_LOGGER = logmuse.init_logger("bedboss")
coloredlogs.install(
logger=_LOGGER,
datefmt="%H:%M:%S",
fmt="[%(levelname)s] [%(asctime)s] %(message)s",
fmt="[%(levelname)s] [%(asctime)s] [BEDBOSS] %(message)s",
)

_LOGGER_PIPESTAT = logging.getLogger("pipestat")
coloredlogs.install(
logger=_LOGGER_PIPESTAT,
datefmt="%H:%M:%S",
fmt="[%(levelname)s] [%(asctime)s] [PIPESTAT] %(message)s",
)

_LOGGER_GENIML = logging.getLogger("geniml")
coloredlogs.install(
logger=_LOGGER_GENIML,
datefmt="%H:%M:%S",
fmt="[%(levelname)s] [%(asctime)s] [GENIML] %(message)s",
)

_LOGGER_BBCONF = logging.getLogger("bbconf")
coloredlogs.install(
logger=_LOGGER_BBCONF,
datefmt="%H:%M:%S",
fmt="[%(levelname)s] [%(asctime)s] [BBCONF] %(message)s",
)

_LOGGER_BBCONF = logging.getLogger("pephubclient")
coloredlogs.install(
logger=_LOGGER_BBCONF,
datefmt="%H:%M:%S",
fmt="[%(levelname)s] [%(asctime)s] [PEPHUBCLIENT] %(message)s",
)
2 changes: 1 addition & 1 deletion bedboss/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.0a4"
__version__ = "0.1.0"
Loading

0 comments on commit f76790c

Please sign in to comment.