This is a backup of https://code.google.com/archive/p/d2-tools/ which appears to no longer be accessible to download. It's a good job I never delete anything.
The paper for this code is here;
https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0084348
"Comparison of Metatranscriptomic Samples Based on k-Tuple Frequencies" Ying Wang, Lin Liu, Lina Chen, Ting Chen, Fengzhu Sun