enrichM icon indicating copy to clipboard operation
enrichM copied to clipboard

enrichm enrichment error

Open Taojianchang opened this issue 4 years ago • 4 comments

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

Taojianchang avatar Mar 29 '20 12:03 Taojianchang

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!

geronimp avatar Mar 31 '20 04:03 geronimp

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

Taojianchang avatar Mar 31 '20 05:03 Taojianchang

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

geronimp avatar Mar 31 '20 06:03 geronimp

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

Taojianchang avatar Mar 31 '20 07:03 Taojianchang