Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@alexiandra97
Copy link

Ensure that the transcripts variable is always initialized before use to prevent UnboundLocalError:

Traceback (most recent call last):
  File "/home/training.imgge/add_most_severe_pli.py", line 129, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/training.imgge/add_most_severe_pli.py", line 125, in main
    write_pli_annotated_vcf(in_vcf, out_vcf)
  File "/home/training.imgge/add_most_severe_pli.py", line 90, in write_pli_annotated_vcf
    vcf_record = construct_most_severe_pli_info(line, pli_ind)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/training.imgge/add_most_severe_pli.py", line 53, in construct_most_severe_pli_info
    pli_values = parse_vep_transcripts(transcripts, pli_ind)
                                       ^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'transcripts' where it is not associated with a value

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • If necessary, also make a PR on the nf-core/raredisease branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Ensure the test suite passes (nextflow run . -profile test_singleton,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

@github-actions
Copy link

github-actions bot commented Aug 19, 2025

Warning

Newer version of the nf-core template is available.

Your pipeline is using an old version of the nf-core template: 3.3.1.
Please update your pipeline to the latest version.

For more documentation on how to update your pipeline, please see the nf-core documentation and Synchronisation documentation.

@alexiandra97 alexiandra97 changed the base branch from master to dev August 20, 2025 13:02
@fellen31
Copy link
Contributor

I've added these two modules to nf-core as addmostsevereconsequence and addmostseverepli. Perhaps these suggested changes could be added to those, and the local modules here be replaced with the nf-core ones?

I was planning on adding the whole subworkflow, but haven't gotten around to it yet.

@alexiandra97
Copy link
Author

I've updated files in modules repo - nf-core/modules#8940

@jemten
Copy link
Collaborator

jemten commented Aug 26, 2025

Thanks @alexiandra97. Unless you want to replace the local module with the nf-core one directly in this PR we can merge this and go from local to nf-core in a different PR.

@ramprasadn
Copy link
Collaborator

Addressed in #732

@ramprasadn ramprasadn closed this Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants