Metadata-Version: 2.4
Name: eukcc
Version: 2.3.1
Summary: Check eukaryotic genomes or MAGs for completeness and contamination
Author-email: Paul Saary <eukcc@paulsaary.de>, MGnify team <metagenomics-help@ebi.ac.uk>
License: GPLv3
Project-URL: Homepage, https://github.com/EBI-Metagenomics/EukCC
Project-URL: Documentation, https://eukcc.readthedocs.io/
Keywords: bioinformatics,mags,eukaryotic,completeness,contamination
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: Unix
Requires-Python: <3.12,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.1
Requires-Dist: ete3>=3.1.3
Requires-Dist: numpy>=1.24.4
Requires-Dist: jsonpickle>=4.0.0
Requires-Dist: biopython==1.83
Requires-Dist: pysam==0.21.0
Requires-Dist: six
Provides-Extra: tests
Requires-Dist: pytest==7.4.0; extra == "tests"
Requires-Dist: pytest-md==0.2.0; extra == "tests"
Requires-Dist: pytest-workflow==2.0.1; extra == "tests"
Requires-Dist: click>=8.1; extra == "tests"
Requires-Dist: ete3>=3.1.3; extra == "tests"
Requires-Dist: numpy>=1.24.4; extra == "tests"
Requires-Dist: jsonpickle>=4.0.0; extra == "tests"
Requires-Dist: biopython==1.83; extra == "tests"
Requires-Dist: pysam==0.21.0; extra == "tests"
Requires-Dist: six; extra == "tests"
Provides-Extra: dev
Requires-Dist: pre-commit==3.8.0; extra == "dev"
Requires-Dist: black==24.8.0; extra == "dev"
Requires-Dist: flake8==7.1.1; extra == "dev"
Requires-Dist: pep8-naming==0.14.1; extra == "dev"
Dynamic: license-file

# EukCC 

![Coverage.py coverage](badges/coverage.svg)

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

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

## Run

### Download EukCC2 database from [FTP](http://ftp.ebi.ac.uk/pub/databases/metagenomics/eukcc/)

With EukCC installed, `eukcc download_db` downloads and extracts the current database
(use `--url` for another version from the FTP):
```
eukcc download_db --out eukccdb
export EUKCC2_DB=$(realpath eukccdb/eukcc2_db_ver_2026-11)
```

Or by hand:
```
# 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_2026-11.tar.gz
tar -xzvf eukcc2_db_ver_2026-11.tar.gz
export EUKCC2_DB=$(realpath eukcc2_db_ver_2026-11)
```

### Quickstart using container

Get EukCC quickly by fetching the BioContainers image:
https://quay.io/repository/biocontainers/eukcc

These images have no `latest` tag, so pick a version tag from the repository:

```
docker pull quay.io/biocontainers/eukcc:<tag>
singularity pull docker://quay.io/biocontainers/eukcc:<tag>
```

### Bioconda / pip

Alternatively you can install EukCC using conda or pip.

With pip, you also need to install these mandatory requirements:
- metaeuk=4.a0f584d
- pplacer
- epa-ng=0.3.8
- hmmer=3.3
- minimap2
- bwa
- samtools


## Outputs explanation

- `eukcc.log` - log of execution

### eukcc single

- `eukcc.tsv` - table with estimated completeness, contamination and taxonomy lineage (taxids and names)

### eukcc folder

- `eukcc.tsv` - table with estimated completeness, contamination and taxonomy lineage (taxids and names) for **good** quality bins. Bins that could not be estimated (zero predicted proteins or no marker gene set) are listed with `NA`
- `merged_bins.tsv` - table of merged refined bins
- `bad_quality.tsv` - table with estimated completeness, contamination and taxonomy lineage (taxids and names) for **bad** quality bins (chosen marker gene set is supported by less than half of the alignments)
- `missing_marker_genes.txt` - line separated list of bins that could not be estimated (zero predicted proteins or no marker gene set)
- `merged_bins` - folder with merged bins sequences 
- `refine_workdir` - working directory with intermediate steps results


## Don't use EukCC on already pubished data
Or at least not without thinking about it:

You should not use EukCC on already published genomes, if they were used during training of the marker
gene sets. If you want to make sure, the accessions used are listed in the `taxinfo` file of each
sub-database of the EukCC database (`files.taxinfo` in `db_<clade>/db_info.json`).

## Cite

If you use EukCC make sure to cite:

```
Saary, Paul, Alex L. Mitchell, and Robert D. Finn. 
"Estimating the quality of eukaryotic genomes recovered from metagenomic analysis with EukCC." 
Genome biology 21.1 (2020): 1-21.
```

EukCC also uses metaEUK, hmmer, pplacer, ete3 and epa-ng. 


## Changelog

See [CHANGELOG.md](CHANGELOG.md) for the changes in each version.

## 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. 

## Issues and bugs

Please report any bugs and issues here on GitHub. Make sure to
include the debug log (run eukcc using the `--debug` flag, e.g. `eukcc single --debug ...`).

### used exit codes
- 0: Success.
- 1: Error, the reason is reported in the log
