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

Fixes to load_maf #223

Merged
merged 5 commits into from
Apr 28, 2017
Merged

Fixes to load_maf #223

merged 5 commits into from
Apr 28, 2017

Conversation

tavinathanson
Copy link
Contributor

@tavinathanson tavinathanson commented Apr 28, 2017

In this PR:

  • Pass encoding through; I had some MAFs that needed encoding="latin1" when in Python 3, for example. Add a test to ensure that this does not break Python 2 (was seeing Bio.Seq errors if I did not convert ref and alt to str in Python 2).
  • Use isnull rather than isnan; the latter errors when chromosomes are strings vs. numerical (TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''). Added a test for this.

Curious if I can handle any of the above more intelligently?


This change is Reviewable

@coveralls
Copy link

coveralls commented Apr 28, 2017

Coverage Status

Coverage remained the same at 87.294% when pulling 9f692f3 on maf_loading_fixes into f70f3e3 on master.

Copy link
Contributor

@iskandr iskandr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any way to do this better, thanks for fixing it!

@tavinathanson
Copy link
Contributor Author

@iskandr can you think of any reason I should have left if not contig vs. just using isnull?

@tavinathanson tavinathanson merged commit a9b7fbc into master Apr 28, 2017
@tavinathanson tavinathanson deleted the maf_loading_fixes branch April 28, 2017 22:17
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

Successfully merging this pull request may close these issues.

None yet

3 participants