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

Error with BINDetect static plot, AttributeError: 'FancyArrowPatch' object has no property 'add_objects' #275

Closed
Freeda2023 opened this issue Jun 17, 2024 · 4 comments
Assignees
Labels

Comments

@Freeda2023
Copy link

Hello,
I'm trying to run BINDetect and in the step of static plot, I get the error of:
2024-06-17 18:21:49 (8246) [INFO] - cntrl / KO (static plot) `

Traceback (most recent call last): File "/home/farzaneh/miniconda3/bin/TOBIAS", line 11, in sys.exit(main()) File "/home/farzaneh/miniconda3/lib/python3.9/site-packages/tobias/TOBIAS.py", line 162, in main args.func(args) File "/home/farzaneh/miniconda3/lib/python3.9/site-packages/tobias/tools/bindetect.py", line 819, in run_bindetect fig = plot_bindetect(motif_list, clustering, [cond1, cond2], args) File "/home/farzaneh/miniconda3/lib/python3.9/site-packages/tobias/tools/bindetect_functions.py", line 773, in plot_bindetect adjust_text(txts, ax=ax1, add_objects=[l], text_from_points=True, arrowprops=dict(arrowstyle='-', color='black', lw=0.5)) #, expand_text=(0.1,1.2), expand_objects=(0.1,0.1)) File "/home/farzaneh/miniconda3/lib/python3.9/site-packages/adjustText/init.py", line 635, in adjust_text arrowpatch = FancyArrowPatch( File "/home/farzaneh/miniconda3/lib/python3.9/site-packages/matplotlib/_api/deprecation.py", line 386, in wrapper return func(*inner_args, **inner_kwargs) File "/home/farzaneh/miniconda3/lib/python3.9/site-packages/matplotlib/patches.py", line 4241, in init super().init(**kwargs) File "/home/farzaneh/miniconda3/lib/python3.9/site-packages/matplotlib/patches.py", line 113, in init self.update(kwargs) File "/home/farzaneh/miniconda3/lib/python3.9/site-packages/matplotlib/artist.py", line 1064, in update raise AttributeError(f"{type(self).name!r} object " AttributeError: 'FancyArrowPatch' object has no property 'add_objects'

`
How can I fix this issue? I changed my matplotlib per its request but the issue is still here.
Thanks

@hschult hschult self-assigned this Jun 18, 2024
@hschult
Copy link
Collaborator

hschult commented Jun 18, 2024

Hello @Freeda2023,

the error comes from the adjustText package because they changed the name of one of their parameters. We have already fixed this in the #270 pull request. If you install the current version from our dev branch, it should work. You can do this e.g. with pip install git+https://github.com/loosolab/TOBIAS@dev.

However, if the error persists please don't hesitate to reopen the issue.

@hschult hschult closed this as completed Jun 18, 2024
@Freeda2023
Copy link
Author

I installed successfully the dev version but I'm not sure if my code runs it through "dev" version or not since I still get the same error. TOBIAS --version returns 0.16.2-b.

@hschult
Copy link
Collaborator

hschult commented Jun 20, 2024

0.16.2-b is the correct version your error may have a different reason. However, I need more information to help you. Would you kindly provide your BINDetect call or even better a small reproducible example? To ensure this is not related to your data you can also try to run our BINDetect examples.

@hschult hschult reopened this Jun 20, 2024
Copy link

No activity for at least 30 days. Marking issue as stale. Stale issues are closed after one week.

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

2 participants