KwanLab / Autometa

Autometa: Automated Extraction of Genomes from Shotgun Metagenomes
https://autometa.readthedocs.io
Other
40 stars 15 forks source link

Fix Biopython deprecation warning #326

Closed evanroyrees closed 1 month ago

evanroyrees commented 1 year ago

Fix Biopython deprecation warning:

/usr/share/miniconda/envs/autometa/lib/python3.8/site-packages/Bio/SeqUtils/__init__.py:144: BiopythonDeprecationWarning: GC is deprecated; please use gc_fraction instead.

Instead of SeqUtils.GC use SeqUtils.gc_fraction

Found in logs here: https://github.com/KwanLab/Autometa/actions/runs/4994350221/jobs/8944784711?pr=325

SeqUtils.gc_fraction implementation is here: https://github.com/biopython/biopython/blob/8293b7382081b8f6cc135638a956a7736633115e/Bio/SeqUtils/__init__.py#L48-L136

PR should also note biopython version difference b/w SeqUtils.GC and SeqUtils.gc_fraction.

Some lines that need changed are here:

https://github.com/KwanLab/Autometa/blob/afd1abe5aba7d9623f7f331e0ec62d1b9b775956/autometa/common/metagenome.py#L142

https://github.com/KwanLab/Autometa/blob/afd1abe5aba7d9623f7f331e0ec62d1b9b775956/autometa/common/metagenome.py#L315

Sidduppal commented 1 month ago

Should be fixed in the latest release 2.2.2