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

adding min_partitions to import_bed #5932

Merged
merged 7 commits into from Apr 24, 2019

Conversation

Projects
None yet
4 participants
@konradjk
Copy link
Collaborator

commented Apr 22, 2019

No description provided.

@tpoterba

This comment has been minimized.

Copy link
Collaborator

commented Apr 22, 2019

should we just accept **kwargs and pass them to import_table?

@jigold

This comment has been minimized.

Copy link
Collaborator

commented Apr 22, 2019

Won't the docs for that be confusing?

@tpoterba

This comment has been minimized.

Copy link
Collaborator

commented Apr 22, 2019

I dunno. That does seem like the easiest way to make sure everything stays consistent

@konradjk

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 22, 2019

How would type-checking and docs work for that?

@tpoterba

This comment has been minimized.

Copy link
Collaborator

commented Apr 22, 2019

docs would say something like "all optional arguments to import_table are valid arguments to import_bed". Typechecking would happen on the import_table call

konradjk added some commits Apr 22, 2019

@konradjk

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 22, 2019

Looks like it needs some sort of typecheck though and i'm not sure what to do with it:

RuntimeError: import_bed: invalid typecheck signature: function parameters with no defined type: ['kwargs']

konradjk added some commits Apr 23, 2019

@konradjk

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 23, 2019

How's this @tpoterba ?

@@ -656,7 +659,8 @@ def import_bed(path, reference_genome='default', skip_invalid_intervals=False) -
'f2': tint32, 'f3': tstr,
'f4': tstr},
comment=["""^browser.*""", """^track.*""",
r"""^\w+=("[\w\d ]+"|\d+).*"""])
r"""^\w+=("[\w\d ]+"|\d+).*"""],

This comment has been minimized.

Copy link
@jigold

jigold Apr 24, 2019

Collaborator

This looks good, but my one concern is if someone overrides one of these options that we know are correct for bed files.

This comment has been minimized.

Copy link
@konradjk

konradjk Apr 24, 2019

Author Collaborator

What do you mean? If someone passes reference_genome='GRCh38' it will correctly go to import_bed, but anything not in the signature will go on to import_table - if down the line, someone adds reference_genome to import_table, that will be a problem, but not sure if that is fixable here.

This comment has been minimized.

Copy link
@tpoterba

tpoterba Apr 24, 2019

Collaborator

If someone overrides these they'll get an error that you tried to pass the same argument twice. Maybe better to explicitly check for these options, but it seems hard to really screw yourself here

This comment has been minimized.

Copy link
@konradjk

konradjk Apr 24, 2019

Author Collaborator

Ohhhh you mean like comment=? 🤔

This comment has been minimized.

Copy link
@tpoterba

tpoterba Apr 24, 2019

Collaborator

yeah

This comment has been minimized.

Copy link
@tpoterba

tpoterba Apr 24, 2019

Collaborator

maybe document which ones are used or something?

@konradjk konradjk requested a review from jigold Apr 24, 2019

documented used arguments

@jigold

jigold approved these changes Apr 24, 2019

@danking danking merged commit 7c94df9 into hail-is:master Apr 24, 2019

1 check passed

hail-ci-0-1 successful build
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.