geronimp / enrichM

Toolbox for comparative genomics of MAGs
80 stars 22 forks source link

enrichm enrichment error #100

Open Taojianchang opened 4 years ago

Taojianchang commented 4 years ago

Hello,

I was doing the enrichm enrichment and met some problems. I could not find what was wrong. Followed were the scripts and files: enrichm enrichment --output MGII_enrichment --annotate_output mgii_annotation/ko_frequency_table.tsv --metadata metadata.txt --threshold 32 --ko --force

the error: Traceback (most recent call last): File "/home/jianchang/software/miniconda3/envs/enrichm_0.5.0/bin/enrichm", line 357, in r.main(args, sys.argv) File "/home/jianchang/software/miniconda3/envs/enrichm_0.5.0/lib/python3.7/site-packages/enrichm/run.py", line 356, in main args.output) File "/home/jianchang/software/miniconda3/envs/enrichm_0.5.0/lib/python3.7/site-packages/enrichm/enrichment.py", line 389, in do = self._parse_annotation_matrix(annotation_matrix) File "/home/jianchang/software/miniconda3/envs/enrichm_0.5.0/lib/python3.7/site-packages/enrichm/enrichment.py", line 185, in _parse_annotation_matrix matrix_file_io = open(annotation_matrix) TypeError: expected str, bytes or os.PathLike object, not NoneType

bin_enrichm.o52650.txt bin_enrichm.e52650.txt metadata.txt metadata.txt

geronimp commented 4 years ago

hi there, Thanks for your interest in enrichM,

Looks like you need to replace the --annotate_output (which takes a directory as input) with --annotation_matrix. Like so:

enrichm enrichment --output MGII_enrichment --annotation_matrix mgii_annotation/ko_frequency_table.tsv --metadata metadata.txt --threshold 32 --ko --force

Please give this a go and let me know if this works for you!

Taojianchang commented 4 years ago

hi, thanks for your reply. i just did what you recommended, and there's error again: enrichm enrichment: error: the following arguments are required: --annotate_output i use "EnrichM 0.5.0", is it the latest version? bin_enrichm.e52670.txt

geronimp commented 4 years ago

I see, this is an issue with the way enrichM parses the inputs. if you try

enrichm enrichment --output MGII_enrichment --annotate_output mgii_annotation --metadata metadata.txt --threshold 32 --ko --force

It should hopefully work. I'll work on a fix that addresses this error. Thanks for flagging this.

try the above command and let me know here if it doesnt work

Taojianchang commented 4 years ago

Good news! it worked when you just give the folder. Thanks for your help! bin_enrichm.o5268.txt