biobakery / humann

HUMAnN is the next generation of HUMAnN 1.0 (HMP Unified Metabolic Analysis Network).
http://huttenhower.sph.harvard.edu/humann
Other
170 stars 58 forks source link

Error when trying to use taxonomic profile #33

Closed krcurtis closed 2 years ago

krcurtis commented 2 years ago

Hi,

I get errors like:

ERROR: The MetaPhlAn2 taxonomic profile provided was not generated with the expected database version. Please update your version of MetaPhlAn2 to v3.0.

with humann v3.0.1 when using a taxonomic profile formatted as indicated by https://github.com/biobakery/humann#custom-taxonomic-profile (using two columns separated by a tab character):

g__Methanosphaera|s__Methanosphaera_stadtmanae  0.42667
g__Actinomyces|s__Actinomyces_graevenitzii      8.1e-4
g__Actinomyces|s__Actinomyces_oris      1.99e-2
g__Actinomyces|s__Actinomyces_sp_HPA0247        1.722e-2
g__Bifidobacterium|s__Bifidobacterium_adolescentis      23.59667

The custom profile was derived from MetaPhlAn3 output files. I saw that this was discussed a bit on the forum but the mentioned workarounds weren't working for me.

What format is humann expecting for the --taxonomic-profile option?

Thanks

github-actions[bot] commented 2 years ago

Thank you for creating this issue. We currently field issues through our bioBakery Discourse Support Forum. If you would please post the issue to discourse we would be happy to sync up with you to get it resolved.

krcurtis commented 2 years ago

I think this was prematurely closed by the github-actions. I found the problem for my file. I needed to do two things, I needed to add the header:

mpa_v30_CHOCOPhlAn_201901

to the beginning of my custom taxonomic profile.

Secondly, the code in humann/search/prescreen.py fails if an input line looks like: "g__Methanobrevibacter|s__Methanobrevibacter_smithii\t100.0\n" because of the newline character at the end. I added this to the while loop in the create_custom_database() function to remove the newline character: line = line.rstrip("\n") Then I could see in the log file that Methanobrevibacter_smithii was added to the ChocoPhlAn database:

02/02/2022 04:04:43 PM - humann.search.prescreen - DEBUG: Adding file to database: gMethanobrevibacter.sMethanobrevibacter_smithii.centroids.v296_v201901b.ffn.gz

github-actions[bot] commented 2 years ago

Thank you for creating this issue. We currently field issues through our bioBakery Discourse Support Forum. If you would please post the issue to discourse we would be happy to sync up with you to get it resolved.

github-actions[bot] commented 2 years ago

Thank you for creating this issue. We currently field issues through our bioBakery Discourse Support Forum. If you would please post the issue to discourse we would be happy to sync up with you to get it resolved.