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

wellington_bootstrap.py finishes with empty files #37

Open
KRSBar opened this issue Mar 30, 2018 · 3 comments
Open

wellington_bootstrap.py finishes with empty files #37

KRSBar opened this issue Mar 30, 2018 · 3 comments

Comments

@KRSBar
Copy link

KRSBar commented Mar 30, 2018

Hello,

I recently attempted differential footprinting for the first time with wellington_bootstrap.py. After running the output files were completely empty. There were no errors raised during the run.

Is this simply because there are no differential footprints that pass the default FDR threshold? This was run on approximately 156,000 peak regions so I was thinking it would find something.

Thanks in advance for any help.

@brisk022
Copy link
Contributor

I have the same problem. The output files are empty even when I set -fdr 0.99 -fdrlimit 0.

@brisk022
Copy link
Contributor

Here is what's happening. The footprints method of the Diffwel class performs a division when creating coordinates for GenomicIntervalSet object (line 74 in wellington_bootstrap.py) .

return_set.append(((i[0] + i[1])/2, i[3]))

This works fine in python2 as it automagically casts the result as int. In python3, the operation returns a float, which subsequently causes a TypeError during an attempt to use the coordinate as array index best_footprintsizes[i[0]] (line 103). The exception is successfully swallowed by the exception monster called multiprocessing. So, the script finishes without any errors and the exit code 0 but empty output files.

The way to fix it is to add an explicit int cast, i.e.

return_set.append((int((i[0] + i[1])/2), i[3]))

PS I might be wrong here as the exception message mentions numpy.float64, so it might be a numpy version issue rather than python2/python3.

@jpiper
Copy link
Owner

jpiper commented Jul 18, 2019

I'm hoping #39 will have fixed this. I am working on a new release...

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

No branches or pull requests

3 participants