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

added test for negative color from bigwig or bedgraph tracks #37

Closed
wants to merge 4 commits into from

Conversation

fidelram
Copy link
Contributor

@fidelram fidelram commented Jul 8, 2018

No description provided.

@fidelram fidelram added the WIP work in progress label Jul 8, 2018
@fidelram
Copy link
Contributor Author

fidelram commented Jul 8, 2018

@Phlya I added some tests for the new feature that you added. However, I see some problems with the bigwig fill case. See the first track in this image:

image

Can you take a look? I added a bigwig file that has some negative values to the test data. You can your the test as py.test test_bigWigTrack.py.

In the bedgraph case I don't see the problem, but for type=line and points the image looks strange to me:

image

@Phlya
Copy link
Contributor

Phlya commented Jul 8, 2018

Thank you, I'll try to have a look tomorrow!

@Phlya
Copy link
Contributor

Phlya commented Jul 14, 2018

Sorry, I didn't manage to look into it then, and now I'm on holidays with not much free time. But I remember about this.

@Phlya
Copy link
Contributor

Phlya commented Jul 27, 2018

OK, for some reason interpolate=True creates this weird problem for bigwig tracks... Strange. I'll try some simple examples with matplotlib plots, maybe it's a bug...

@Phlya
Copy link
Contributor

Phlya commented Jul 27, 2018

image

Yep, pretty sure this is a bug in matplotlib!

@Phlya
Copy link
Contributor

Phlya commented Jul 28, 2018

So the issue is having NaNs... While it has been confirmed a bug in matplotlib, it should be possible to also create a workaround while they are sorting it out - maybe set all NaNs to zero? Or to a value of the opposite sign to what we are plotting?

@fidelram
Copy link
Contributor Author

fidelram commented Aug 3, 2018 via email

@fidelram
Copy link
Contributor Author

fidelram commented Sep 5, 2018

I would like to add a new pyGenomeTracks release. Do you think we can finalize this? Using interpolation=False does not work?

@Phlya
Copy link
Contributor

Phlya commented Sep 5, 2018

Hi, sorry, forgot about this to be honest. See my PR, nans get replaced by zeros. I ran the test and it looks fine.

Phlya and others added 2 commits September 5, 2018 12:03
Fix interpolation in BigWig fill_between
@fidelram fidelram closed this Sep 26, 2018
@vivekbhr vivekbhr deleted the test_neg_color branch December 12, 2018 22:40
@Phlya
Copy link
Contributor

Phlya commented Mar 5, 2019

FYI, as discovered in mpl issue tracker, updating numpy to 1.16 fixes the issue with interpolation.
matplotlib/matplotlib#11781 (comment)

@fidelram
Copy link
Contributor Author

fidelram commented Mar 5, 2019

Great to know. I will update the requirements

fidelram added a commit that referenced this pull request Mar 5, 2019
@Phlya
Copy link
Contributor

Phlya commented Mar 5, 2019

Well, we circumvented the issue by converting all NaNs to zeros, so it is fine now anyway, but you might want to revert https://github.com/deeptools/pyGenomeTracks/pull/37/files/47b13185690f65e53f27f92666095ed3ab5d2048..HEAD then if you are updating requirements.

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

Successfully merging this pull request may close these issues.

2 participants