Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vcf_out may be unbound in sniffles v2.3.2 #476

Closed
MikkelSchubert opened this issue Apr 22, 2024 · 2 comments
Closed

vcf_out may be unbound in sniffles v2.3.2 #476

MikkelSchubert opened this issue Apr 22, 2024 · 2 comments
Assignees
Labels
Milestone

Comments

@MikkelSchubert
Copy link

If --vcf is not set on the command-line, then the vcf_out variable is unbound at

t.result.emit(vcf_out=vcf_out, snf_out=snf_out, **rkwargs)

I'm guessing that the fix is just to add vcf_out = None before

if config.vcf is not None:

Output:

2024-04-22 13:02:36,811 INFO sniffles.main (1575379): Used command: sniffles --threads 8 --reference resources/genome.fa --input input.bam --snf output.snf --tandem-repeats human_GRCh38_no_alt_analysis_set.trf.bed
[snip]
2024-04-22 13:04:29,601 INFO sniffles.main (1575379): Took 110.51s.
2024-04-22 13:04:29,601 INFO sniffles.main (1575379): 
Traceback (most recent call last):
  File "/opt/software/sniffles/2.3.2/bin/sniffles", line 511, in <module>
    Sniffles2_Main(processes)
  File "/opt/software/sniffles/2.3.2/bin/sniffles", line 447, in Sniffles2_Main
    t.result.emit(vcf_out=vcf_out, snf_out=snf_out, **rkwargs)
UnboundLocalError: cannot access local variable 'vcf_out' where it is not associated with a value
@hermannromanek
Copy link
Collaborator

Hi @MikkelSchubert ,

Thanks for reporting this, you are right - I just pushed a fix containing your suggestion.

Thanks,
Hermann

@lfpaulin
Copy link
Collaborator

Fixed in 48b9645

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants