Skip to content

Commit

Permalink
pytoml
Browse files Browse the repository at this point in the history
  • Loading branch information
KateSakharova committed Jan 23, 2025
1 parent 2abdd43 commit 06e23c6
Show file tree
Hide file tree
Showing 8 changed files with 172 additions and 40 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Upload Python Package

on:
workflow_run:
workflows: ["Create Release with Images"]
types:
- completed

jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/kegg-pathways-completeness
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
28 changes: 28 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Tests

on:
push:
branches: [master, pypi-release]
pull_request:
branches: [master]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8', '3.11' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: pip install .[test]

- name: Run pytest
run: pytest
13 changes: 0 additions & 13 deletions Dockerfile_dev

This file was deleted.

43 changes: 21 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,24 @@
![Coverage.py coverage](badges/coverage.svg)

EukCC is a completeness and contamination estimator for metagenomic assembled
microbial eukaryotic genomes.

With version 2, EukCC should provide a better experience than
version 1. We aim at creating a stable package with long term support.

**Note**: Version 2 is not compatible with previous versions, most commandline arguments changed.
So version 2 is **not** a drop in replacement.
microbial eukaryotic genomes.

## Documentation
Head over to https://eukcc.readthedocs.io/ to check out the documentation.

## Run

## Quickstart

Here a super fast overview on how to get started using singularity. For more information
please see the documentation.

### Download EukCC2 database from [FTP](http://ftp.ebi.ac.uk/pub/databases/metagenomics/eukcc/)
```
# create a folder were to keep the database
mkdir eukccdb
cd eukccdb
wget http://ftp.ebi.ac.uk/pub/databases/metagenomics/eukcc/eukcc2_db_ver_1.2.tar.gz
tar -xzvf eukcc2_db_ver_1.2.tar.gz
export EUKCC2_DB=$(realpath eukcc2_db_ver_1.2)
# fetch and launch container
singularity pull docker://quay.io/microbiome-informatics/eukcc
singularity exec eukcc_latest.sif eukcc single -h
```

Alternatively you can install EukCC using pip, but we recommend using the container.

## Get the container
### Quickstart using container

Get EukCC quickly by fetching the container.

Expand All @@ -46,9 +30,19 @@ https://quay.io/repository/microbiome-informatics/eukcc
docker pull quay.io/microbiome-informatics/eukcc
singularity pull docker://quay.io/microbiome-informatics/eukcc
```
If you installed version 2: make sure to also fetch the database for version 2:

http://ftp.ebi.ac.uk/pub/databases/metagenomics/eukcc/
### Bioconda / pip

Alternatively you can install EukCC using conda or pip.

In addition, you need to install mandatory requirements:
- metaeuk=4.a0f584d
- pplacer
- epa-ng=0.3.8
- hmmer=3.3
- minimap2
- bwa
- samtools


## Outputs explanation
Expand Down Expand Up @@ -89,6 +83,11 @@ EukCC also uses metaEUK, hmmer, pplacer, ete3 and epa-ng.


## Changed compared to EukCC 1
**Note**:
With version 2, EukCC should provide a better experience than
version 1. Version 2 is not compatible with previous versions, most commandline arguments changed.
So version 2 is **not** a drop in replacement.

- Users can set the prevalence threshold for marker sets. In EukCC 1
this was fixed to 98% single copy prevalence. Now users could change that to be more strict.
We find that often 100% single copy prevalence can be found.
Expand Down
File renamed without changes.
62 changes: 62 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[project]
name = "eukcc"
version = "2.1.3"
readme = "README.md"
license = {text = "GPLv3"}
authors = [
{ name = "Paul Saary", email = "[email protected]" },
{ name = "MGnify team", email = "[email protected]" },
]
keywords = ["bioinformatics", "mags", "eukaryotic", "completeness", "contamination"]
description = "Check eukaryotic genomes or MAGs for completeness and contamination"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3.6",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: Unix",
]

dependencies = [
"ete3>=3.1.3",
"numpy>=1.24.4",
"jsonpickle>=4.0.0",
"biopython==1.83",
"pysam==0.21.0"
]

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = [
"eukcc",
"scripts",
]

[project.scripts]
# eukcc
eukcc = "eukcc.__main__:main"
shared_markers = "eukcc.find_markerset:main"
# scripts
binlinks = "scripts.binlinks:main"
filter_euk_bins = "scripts.filter_euk_bins:main"

[project.optional-dependencies]
tests = [
"pytest==7.4.0",
"pytest-md==0.2.0",
"pytest-workflow==2.0.1",
"ete3>=3.1.3",
"numpy>=1.24.4",
"jsonpickle>=4.0.0",
"biopython==1.83",
"pysam==0.21.0"
]

dev = [
"pre-commit==3.8.0",
"black==24.8.0",
"flake8==7.1.1",
"pep8-naming==0.14.1"
]
11 changes: 7 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
ete3
six
numpy
jsonpickle
metaeuk==4.a0f584d
pplacer
epa-ng==0.3.8
hmmer==3.3
minimap2
bwa
samtools==1.12
2 changes: 1 addition & 1 deletion tests/test_basic.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest
import os
from eukcc.base import union_sets, load_SCMGs, percentage_sets, load_tax_info
from .eukcc.base import union_sets, load_SCMGs, percentage_sets, load_tax_info

TESTDATA_SCMG = os.path.join(os.path.dirname(__file__), "testfiles", "SCMG_TEST.csv")
TESTDATA_SCMG_GZ = os.path.join(os.path.dirname(__file__), "testfiles", "SCMG_TEST.csv.gz")
Expand Down

0 comments on commit 06e23c6

Please sign in to comment.