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

Opening up permission on GenericGenomicRDD constructor #1735

Closed
devin-petersohn opened this issue Sep 18, 2017 · 6 comments
Closed

Opening up permission on GenericGenomicRDD constructor #1735

devin-petersohn opened this issue Sep 18, 2017 · 6 comments
Assignees
Milestone

Comments

@devin-petersohn
Copy link
Member

@devin-petersohn devin-petersohn commented Sep 18, 2017

Is there a reason to keep GenericGenomicRDD constructor package private? I could use the constructor downstream, if it's not closed for a serious issue.

@fnothaft
Copy link
Member

@fnothaft fnothaft commented Sep 18, 2017

I generally prefer to keep things closed up if possible, but if you need it then you need it. What are you doing downstream?

As a minor aside, we'd likely want to keep the constructor closed but add an apply method, but that's beside the point.

@devin-petersohn
Copy link
Member Author

@devin-petersohn devin-petersohn commented Sep 18, 2017

I need to enable nested set theory operations, which is impossible to generalize without using some kind of GenericGenomicRDD-like object (because I must define a regionFn for most operations). It is also a cleaner abstraction than GenomicRDD[(T, Iterable[X]), Nothing].

@devin-petersohn
Copy link
Member Author

@devin-petersohn devin-petersohn commented Sep 18, 2017

I should also add that transform on a non-Generic GenomicRDD post-join returns a Nothing object.

@fnothaft
Copy link
Member

@fnothaft fnothaft commented Sep 18, 2017

Is it correct to read your first comment as:

because I must define a regionFn for most operations

being the important clause? Specifically, you need to customize the regionFn after a join?

I should also add that transform on a non-Generic GenomicRDD returns a Nothing object.

Can you give an example? I haven't seen this before but I haven't been looking for it.

@devin-petersohn
Copy link
Member Author

@devin-petersohn devin-petersohn commented Sep 18, 2017

Specifically, you need to customize the regionFn after a join?

For set theory operations, many times you want the resulting region data to be changed in some way (subtract, intersect, etc.).

Can you give an example? I haven't seen this before but I haven't been looking for it.

This is only post-join. I updated my comment too late. When we cast to a [GenomicRDD[(T, Iterable[X]), Z] from a GenericGenomicRDD in the join, the type checking somehow infers Z to be Nothing.

@fnothaft
Copy link
Member

@fnothaft fnothaft commented Sep 18, 2017

For set theory operations, many times you want the resulting region data to be changed in some way (subtract, intersect, etc.).

Oh yeah, the rationale makes sense. I just want to make sure I'm understanding why you need the interface opened up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.