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

[pbfusion] Error from visualize_fusion.py #705

Open
dbswls0322 opened this issue Aug 5, 2024 · 3 comments
Open

[pbfusion] Error from visualize_fusion.py #705

dbswls0322 opened this issue Aug 5, 2024 · 3 comments

Comments

@dbswls0322
Copy link

dbswls0322 commented Aug 5, 2024

Operating system
Linux OS

Package name
pbfusion-visualize_fusion.py

Conda environment
I set up the conda environment with python 3.8.19 and downloaded packages required for visualize_fusion.py

Describe the bug
I got an error running visualize_fusion.py. First, I faced a problem because 'clean' does not include in matplotlib available style. To fix it, I modified the code like below for assigning mplstyle clean. plt.style.use("https://raw.githubusercontent.com/nicoguaro/matplotlib_styles/master/styles/clean.mplstyle")

Now I got another error, UnboundLocalError: local variable 'panel' referenced before assignment.

Error message
Traceback (most recent call last):
File "./visualize_fusion.md.py", line 259, in
main(args)
File "./visualize_fusion.md.py", line 254, in main
plot_fusion(ref_genes, alignments, breakpoints, args.output)
File "./visualize_fusion.md.py", line 183, in plot_fusion
panel.plot([start, stop], [ypos]*2, lw=0.2, c=color, zorder=10)
UnboundLocalError: local variable 'panel' referenced before assignment

To Reproduce
Here is my code and data that I used.

python3 ./visualize_fusion.md.py --output ./trisomy2_fusion_browser_shot.png --annotation ./gencode.v39.annotation.sorted.gtf --fusion ./trisomy.sample2.breakpoints.groups.bed --bam ./trisomy.sample2.mapped.bam

Expected behavior
I wish I could get a new visualize_fusion.py file asap to generate result.
Also if there is some requirements in terms of python or packages version, please inform it on pbfusion github.

@zeeev
Copy link
Contributor

zeeev commented Aug 6, 2024

Thank you for the example. I'll try to take a look this week.

@jocelyne-pacbio
Copy link

Hello,
We apologize of the delay. We are working on a new release of pbfusion which should address this issue (stay tune!). In our testing, we attempted to run your data through but it looks like the bed file has raw reads in the IDs and the mapped bam has clustered reads.
We realize that it has been a while and you might not remember, but do you recall if you called fusions using raw reads or clustered reads? We completely understand if it's been too long.

@zeeev zeeev reopened this Dec 13, 2024
@zeeev
Copy link
Contributor

zeeev commented Dec 13, 2024

@dbswls0322, We've released version 0.5.1.

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

No branches or pull requests

4 participants