pha4ge/hAMRonization

staramr issue

Closed this issue · 1 comments

I pip installed this tool and am trying to run the following:
hamronize staramr staramr_out/detailed_summary.tsv --reference_database_version db_v_1 --analysis_software_version tool_v_1 --format tsv --output hamr_out/staramr_out.tsv

I get the following error:

Traceback (most recent call last):
  File "/home/ewissel/miniconda3/bin/hamronize", line 8, in <module>
    sys.exit(main())
  File "/home/ewissel/miniconda3/lib/python3.7/site-packages/hAMRonization/hamronize.py", line 7, in main
    hAMRonization.Interfaces.generic_cli_interface()
  File "/home/ewissel/miniconda3/lib/python3.7/site-packages/hAMRonization/Interfaces.py", line 275, in generic_cli_interface
    output_format=args.format)
  File "/home/ewissel/miniconda3/lib/python3.7/site-packages/hAMRonization/Interfaces.py", line 115, in write
    first_result = next(self)
  File "/home/ewissel/miniconda3/lib/python3.7/site-packages/hAMRonization/Interfaces.py", line 75, in __next__
    return next(self.hAMRonized_results)
  File "/home/ewissel/miniconda3/lib/python3.7/site-packages/hAMRonization/StarAmrIO.py", line 40, in parse
    result['_gene_name'] = result['Gene']
KeyError: 'Gene'

I see that a new version was recently pushed. Should I use a different download method?

You need to use the starAMR output file containing the AMR predictions e.g., `resfinder.tsv'.

hamronize --help (and the README) list examples of the input files used for each parser, if you are still unsure you can look at the test files: https://github.com/pha4ge/hAMRonization/tree/master/test/dummy to look at the exact output file format expected for each tool's parser.