diff --git a/CHANGELOG.md b/CHANGELOG.md index 456ddf3..a1716a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ [![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/taxonkit/v0.12.1/total.svg)](https://github.com/shenwei356/taxonkit/releases/tag/v0.12.1) - `taxonkit reformat`: add a new placeholder `{K}` for rank `kingdom`. [#64](https://github.com/shenwei356/taxonkit/issues/64) - `taxonkit create-taxdump`: - - fix merged.dmp and delnodes.dmp. [gtdb-taxdump/issues/2](https://github.com/shenwei356/gtdb-taxdump/issues/2) + - fix merged.dmp and delnodes.dmp. Thanks to @apcamargo ! [gtdb-taxdump/issues/2](https://github.com/shenwei356/gtdb-taxdump/issues/2). - fix bug of handling non-GTDB data when using `-A/--field-accession` and no rank names given. - `taxonkit reformat`: do not panic for invalid TaxIds, e.g., the column name, when using `-I--taxid-field`. - [TaxonKit v0.12.0](https://github.com/shenwei356/taxonkit/releases/tag/v0.12.0) diff --git a/taxonkit/cmd/create-taxdump.go b/taxonkit/cmd/create-taxdump.go index 6d8c583..f065a24 100644 --- a/taxonkit/cmd/create-taxdump.go +++ b/taxonkit/cmd/create-taxdump.go @@ -778,6 +778,13 @@ Attentions: // append old merged.dmp for from, to := range taxdb.MergeNodes { + // https://github.com/shenwei356/gtdb-taxdump/issues/2#issuecomment-1226186877 + // The history of GCF_001405015.1 showed Clostridium disporicum was renamed to + // Clostridium disporicum_A in R95, and changed back in R207. + if _, ok = merged[to]; ok && merged[to] == from { + // delnodes[to] = struct{}{} + continue + } if _, ok = delnodes[to]; ok { // could not append deleted nodes delnodes[from] = struct{}{} // if the new taxid has been deleted, mark the old taxid too continue