Negative Values in GTDB Converted MetaPhlAn4 Result File

Hello!

I recently used the newest version of the sgb_to_gtdb_profile.py script with the GTDB r226 updated mapping file, and as I was starting to analyze the results I realized that the conversion script added negative values into some of my relative abundances. It didn’t happen with all my samples, but with some of them there are very small (-7e-05) relative abundance values given. I double checked and made sure that there weren’t any negatives in the original metaphlan profiles, so it had to have happened during the conversion script.

I compared lines between the before and after conversion files and it wasn’t insignificant amounts of relative abundance that were written over for some of them either. Does anyone have any thoughts on how to start troubleshooting this? I would guess that it’s a bug in the conversion script, but I wouldn’t know where to start with trying to fix it.

Any help is much appreciated so I can hopefully fix the issue and use these results! Thanks!

Hi,
If you could send the metaphlan profile I can try to understand what is going wrong (also in private if you prefer). Meanwhile, you could try running the older version with the correct version of the sgb2gtdb conversion file, for which there are database specific versions in the utils folder

Hello!

Attached is one of the profiles that that had negative values both before and after the conversion.

And just to clarify, are you saying try using the old version of the conversion script with the new Jan26 and GTDB r226 conversion file? If so, what’s the best way to find the old script? I’m not sure I have it because I replaced it with the new one in my environment.

Thanks!

Abbi

gtdb_profile.txt (54.0 KB)

profiled_metagenome.txt (165.5 KB)

There seemed to be a correction error when rounding very small values, I have updated the code in MetaPhlAn/metaphlan/utils/sgb_to_gtdb_profile.py at master · biobakery/MetaPhlAn · GitHub Can you try downloading and using the updated script and see if you have any issues now?

Yes, I will do that, but it will have to be next week. My university’s computing cluster where all my data is housed is under maintenance this week, so I won’t be able to get to my data till they finish. I will do it as soon as I can though and let you know! Thank you for your help!

I just tried it and don’t have any more negatives! Thanks for your help!