Porting conversion code from QIIME