-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from maxibor/dev
Version 1.0.0-beta
- Loading branch information
Showing
63 changed files
with
2,529 additions
and
879 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
name: publish-pypi | ||
|
||
on: | ||
on: | ||
release: | ||
types: [published, edited] | ||
|
||
jobs: | ||
build-and-publish: | ||
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Setup Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
- name: Build sam2lca | ||
run: | | ||
pip install wheel | ||
python setup.py sdist bdist_wheel | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
|
||
build-and-publish: | ||
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.9" | ||
- name: Build sam2lca | ||
run: | | ||
pip install wheel | ||
python setup.py sdist bdist_wheel | ||
- name: Publish a Python distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Changelog | ||
|
||
All notable changes to [sam2lca](https://github.com/maxibor/sam2lca) will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## 1.0.0beta | ||
|
||
### Added | ||
|
||
- Added sam2lca tutorial | ||
- Add Custom acc2tax with json | ||
- Total number of reads is computed early on to provide progress bar | ||
- unit and integration testing with PyTest | ||
- Total Descendant read counts for each taxon | ||
- GTDB taxonomy and acc2tax added | ||
- 18s acc2tax added | ||
- XN and XR flag in bam output for, respectively, Taxon name and rank | ||
- Add edit distance threshold filtering | ||
|
||
### Changed | ||
|
||
- Code refactoring for speedup, making use of multithreading on shared dictionaries | ||
- Improve logging and replace prints statements with logging.info | ||
- ete3 has been replaced by taxopy | ||
- Unclassified TAXID is now `12908` by default | ||
- RocksDB params changed | ||
- TAXID of LCA is only attributed to alignment segments passing threshold | ||
- Identity threshold is now a range selection in CLI. | ||
|
||
## Dependencies | ||
|
||
- ete3 removed | ||
- ordered-set removed | ||
- pytest-console-scripts 1.3.1 | ||
- scipy | ||
- Jinja2 pinned version ot 3.1 (see [RTD issue](https://github.com/readthedocs/readthedocs.org/issues/9038) ) | ||
|
||
### Removed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
![sam2lca-CI](https://github.com/maxibor/sam2lca/workflows/sam2lca-CI/badge.svg) [![Documentation Status](https://readthedocs.org/projects/sam2lca/badge/?version=latest)](https://sam2lca.readthedocs.io/en/latest/?badge=latest) | ||
![](docs/img/sam2lca_logo_text.png) | ||
|
||
<p align="center"> | ||
<a href="https://github.com/maxibor/sam2lca/actions"><img src="https://github.com/maxibor/sam2lca/workflows/sam2lca-CI/badge.svg"/></a> | ||
<a href="https://sam2lca.readthedocs.io"><img src="https://readthedocs.org/projects/sam2lca/badge/?version=latest"/></a> | ||
<a href="https://pypi.org/project/sam2lca"><img src="https://img.shields.io/badge/install%20with-pip-blue"/></a> | ||
</p> | ||
|
||
# sam2lca | ||
|
||
[Lowest Common Ancestor](https://en.wikipedia.org/wiki/Lowest_common_ancestor) from a SAM/BAM/CRAM sequence alignment file | ||
[Lowest Common Ancestor](https://en.wikipedia.org/wiki/Lowest_common_ancestor) from a [SAM/BAM/CRAM](<https://en.wikipedia.org/wiki/SAM_(file_format>) sequence alignment file. | ||
|
||
## Quick start | ||
## TLDR | ||
|
||
Quick analyis of sequencing reads aligned to a DNA database | ||
Analysis of sequencing reads aligned to a DNA database with NCBI accession numbers, using the NCBI taxonomy | ||
|
||
```bash | ||
sam2lca analyze myfile.bam | ||
|
@@ -16,31 +23,42 @@ See all options | |
```bash | ||
sam2lca --help | ||
sam2lca update-db --help | ||
sam2lca list-db --help | ||
sam2lca analyze --help | ||
``` | ||
|
||
> For further infos, check out the [sam2lca documentation](https://sam2lca.readthedocs.io) and [tutorial](https://sam2lca.readthedocs.io/en/latest/tutorial.html) | ||
## Installation | ||
|
||
### From source | ||
### With [Conda](https://docs.conda.io/en/latest/) (recommended) | ||
|
||
```bash | ||
git clone [email protected]:maxibor/sam2lca.git | ||
conda env create -f environment.yml | ||
conda activate sam2lca | ||
pip install git+ssh://[email protected]/maxibor/sam2lca.git | ||
conda install -c conda-forge -c bioconda -c maxibor sam2lca | ||
``` | ||
|
||
### From Conda | ||
### With [pip](https://pypi.org/project/pip/) | ||
|
||
```bash | ||
conda install -c conda-forge -c bioconda -c maxibor sam2lca | ||
pip install sam2lca | ||
``` | ||
### From Pypi | ||
|
||
### For development purposes, from the dev branch | ||
|
||
```bash | ||
pip install sam2lca | ||
git clone [email protected]:maxibor/sam2lca.git | ||
git checkout dev | ||
conda env create -f environment.yml | ||
conda activate sam2lca | ||
pip install -e . | ||
``` | ||
|
||
or | ||
|
||
```bash | ||
pip install git+ssh://[email protected]/maxibor/sam2lca.git@dev | ||
``` | ||
|
||
## Documentation | ||
|
||
The documentation of sam2lca, including tutorials, is available here: [sam2lca.readthedocs.io](https://sam2lca.readthedocs.io) | ||
The documentation of sam2lca, including tutorials, is available here: [sam2lca.readthedocs.io](https://sam2lca.readthedocs.io) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Contributing | ||
|
||
We welcome any contributions ! | ||
|
||
To further develop sam2lca, or add documentation, please read further: | ||
|
||
## Clone the sam2lca repository, and checkout the dev branch | ||
|
||
```bash | ||
git clone [email protected]:maxibor/sam2lca.git | ||
git checkout dev | ||
``` | ||
|
||
## Install and activate the development environment | ||
|
||
```bash | ||
conda env create -f environment.yml | ||
conda activate sam2lca | ||
``` | ||
|
||
## Install sam2lca with pip in editable mode | ||
|
||
```bash | ||
pip install -e . | ||
``` | ||
|
||
## Run the unit and integration tests | ||
|
||
```bash | ||
pytest -s -vv --script-launch-mode=subprocess | ||
``` | ||
|
||
## Build the documentation | ||
|
||
```bash | ||
cd docs | ||
make html | ||
``` | ||
|
||
The docs are built in the `docs/build/html` directory | ||
|
||
### Claim your sticker | ||
|
||
Thanks for contributing to sam2lca ! | ||
If you want to spread the word about sam2lca, please get in touch with me to claim your sticker (maxime_borry[at]eva.mpg.de) ! |
Oops, something went wrong.