PacificBiosciences / pbbioconda

PacBio Secondary Analysis Tools on Bioconda. Contains list of PacBio packages available via conda.
BSD 3-Clause Clear License
248 stars 44 forks source link

[pbfusion] Error from visualize_fusion.py #705

Open dbswls0322 opened 1 month ago

dbswls0322 commented 1 month ago

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 commented 1 month ago

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