Skip to content
New issue

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

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

Already on GitHub? # to your account

Cannot print plotCorrelation due to the wrong value in call function set_rotation from matplotlib #1183

Closed
aletomczak opened this issue Jan 15, 2023 · 2 comments

Comments

@aletomczak
Copy link

aletomczak commented Jan 15, 2023

Hi, I have encountered a problem while executing command:

plotCorrelation --corData deeptools_analysis/bamSummaryOutput --corMethod pearson --whatToPlot scatterplot --plotFile scatter_limited_pearson.png

Outliers were detected in the data. Consider using the --removeOutliers parameter to avoid a bias in the pearson correlation.

Traceback (most recent call last):
File "/.../bin/plotCorrelation", line 12, in <module>
main(args)
File "/.../python3.10/site-packages/deeptools/plotCorrelation.py", line 239, in main
corr.plot_scatter(args.plotFile,
File "/////python3.10/site-packages/deeptools/correlation.py", line 507, in plot_scatter
tick.label.set_rotation('45')
File "/.../python3.10/site-packages/matplotlib/text.py", line 1196, in set_rotation
raise ValueError("rotation must be 'vertical', 'horizontal' or "
ValueError: rotation must be 'vertical', 'horizontal' or a number, not 45

==================================================
Problem can be repaired by changing the value str '45' for int 45 in /.../deeptools/correlation.py

  • deeptools 3.5.1
  • python 3.10.8
  • matplotlib-base 3.6.2

Best regards, Ola

adRn-s added a commit that referenced this issue Jan 20, 2023
@adRn-s adRn-s closed this as completed Jan 20, 2023
@li1311139481
Copy link

I'm sorry, I was installed with conda deeptools, I found the correlation.py.
i change
axmatrix.set_xticklabels(np.array(self.labels).astype('str')[index], rotation=45, ha='left')
to
axmatrix.set_xticklabels(np.array(self.labels).astype('int')[index], rotation=45, ha='left')
or to
axmatrix.set_xticklabels(np.array(self.labels).astype('int')[index], rotation='45', ha='left')
They don't work, could you tell me should how to fix it ?
Or should I download the source package and manually install after fix this problem?

@li1311139481
Copy link

i solved it
it should change all tick.label.set_rotation('45') for tick.label.set_rotation(45)
Note there are two ('45'), need replace all

adRn-s added a commit that referenced this issue Feb 3, 2023
* Fix label options

* add pool

* trigger test

* new azure syntax?

* run also on PR

* fix #1159

* fixes #1172

* Addressing #1181

* Bigwig average (#1169)

* Fixes #1159

* Revert "dendogram of plotCorrelation now matches each cell correctly"

* add bigwigAverage

* linting

* remove forgotten prints

* make bigwigAverage executable

* fix galaxy tests

Co-authored-by: A.s <62971995+adRn-s@users.noreply.github.com>
Co-authored-by: LeilyR <25766687+LeilyR@users.noreply.github.com>

* Addresses #1183

* Fix galaxy tests (#1186)

* upload artifact

* allow 1 or 2 lines diff for bowtie2 program

* change github action to get artifacts

* fix plotPCA

* try to fix old samtools installed

* add forgotten channels

---------

Co-authored-by: Cristóbal Gallardo <gallardo@informatik.uni-freiburg.de>
Co-authored-by: Björn Grüning <bjoern@gruenings.eu>
Co-authored-by: LeilyR <25766687+LeilyR@users.noreply.github.com>
Co-authored-by: Lucille Delisle <lucille.delisle@epfl.ch>
Co-authored-by: adRn-s <salatino@omics.dev>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants