bcgsc / NanoSim

Nanopore sequence read simulator
Other
243 stars 57 forks source link

`aligner` option missing from `metagenome` characterization mode #226

Closed ezherman closed 1 month ago

ezherman commented 1 month ago

Running the following characterization command:

read_analysis.py metagenome -i input/sample.fastq.gz -gl results/config/sample/metagenome_list_for_training.tsv -o results/models/sample/training -c -q -t 8 --fastq

I received the error:

Traceback (most recent call last):
  File "/home/esox/github/metagenomic-simulation/.snakemake/conda/10f683cb1581764c18df4732fce4b054_/bin/read_analysis.py", line 895, in <module>
    main()
  File "/home/esox/github/metagenomic-simulation/.snakemake/conda/10f683cb1581764c18df4732fce4b054_/bin/read_analysis.py", line 669, in main
    if aligner == 'minimap2':
UnboundLocalError: local variable 'aligner' referenced before assignment

It appears that the function expects the aligner object, however this variable cannot currently be parsed in metagenome mode (here).

lcoombe commented 1 month ago

Hi @ezherman,

Thanks for reporting. Yes, I also found this in some test runs last week - I am testing a few additional fixes for the code and hope to have those all pushed later this week. I'll keep you updated!

Thank you for your interest in NanoSim! Lauren

lcoombe commented 1 month ago

Hi @ezherman,

Just an update that I have pushed a fix for this error to master branch, and plan to release v3.2.2 tomorrow. Note that since we have only tested meta-NanoSim using minimap2, we still do not include an aligner option on the command-line - but that problem variable has now been assigned properly.

Thanks again for reporting! Lauren

ezherman commented 1 month ago

Thanks @lcoombe, that's great!

mariferrarini commented 1 month ago

Just a quick feedback, I just installed NanoSim through conda and the issue still remains (exactly the same error as above). Will install now the github directly !

lcoombe commented 1 month ago

Hi @mariferrarini,

Thanks for the report - yes, we have not yet done a release including those changes. We delayed it to incorporate a couple other reported fixes in other issues. I will update here when the release is done! But in the meantime, absolutely, installing via GitHub is the way to go!

lcoombe commented 1 month ago

Update: I just released v3.2.2, which includes the fix for this issue. It will often take around a day for conda to pick-up the new version.