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

Fix issue with strand_specific code #2

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
1 participant
@zeehio
Copy link

zeehio commented Nov 10, 2017

Hi,

As the parmap author I have been contacting parmap users to make sure they can smoothly update to the minor API changes I had to make in parmap==1.5.0. This pull request updates your code to reflect those changes. Basically I had to replace parallel=True with pm_parallel=True. It has been so far a very smooth upgrade with no issues in any other parmap user.

Unfortunately, I have found an issue in your usage of parmap that may have lead to some incorrect results. Until parmap 1.5.0, parmap.map supported multiple positional arguments, but not keyword arguments. This was stated in the README. However, you were using parmap and trying to pass the strand_specific= keyword argument in this line of code. I am sorry to say that this keyword argument was never passed to the underlying coverage_single function, and therefore the default strand_specific=False was always used.

If you want to check the impact of this bug on your results, please make sure you have the latest parmap version installed (which does support keyword arguments, you can use pip install -U parmap) and run your code again, once you have accepted this pull request. I hope for the best and that the impact is small.

Best,

Sergio

Update parmap API to remove DeprecationWarnings
parmap 1.5.0 introduced support for passing keyword arguments to
mapped functions, as keyword arguments were not supported before.

The drawback of this new feature is that a consistent
naming of parmap arguments is needed in order to prevent conflicts
between parmap arguments and user-defined arguments. The new parmap
convention is to prefix all its arguments with "pm_" (for parmap)
as documented http://parmap.readthedocs.io/en/latest/

This commit updates the cll-chromatin parmap calls to
use the new API, removing the deprecation warnings that appear with
parmap==1.5.1 (the parmap version used).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment