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

[hail][feature] add `contig_length` function #7121

Merged
merged 3 commits into from Sep 27, 2019

Conversation

@tpoterba
Copy link
Collaborator

commented Sep 24, 2019

Fixes #7111

Fixes #7111
@@ -85,5 +85,11 @@ class ReferenceGenomeFunctions(rg: ReferenceGenome) extends RegistryFunctions {
Seq(TString(), TInt32())).get
If(isValid(Array(contig, pos)), getRef(Array(contig, pos, before, after)), NA(TString()))
}

registerRGCode("contigLength", TString(), TInt32(), null) {

This comment has been minimized.

Copy link
@danking

danking Sep 25, 2019

Collaborator

what's the deal with this pt argument which is null and not used in the definition of registerRGCode?

This comment has been minimized.

Copy link
@tpoterba

tpoterba Sep 25, 2019

Author Collaborator

this is the ptype registration function. If null, the function returns the canoncical PType for the virtual type.

@@ -85,5 +85,11 @@ class ReferenceGenomeFunctions(rg: ReferenceGenome) extends RegistryFunctions {
Seq(TString(), TInt32())).get
If(isValid(Array(contig, pos)), getRef(Array(contig, pos, before, after)), NA(TString()))
}

registerRGCode("contigLength", TString(), TInt32(), null) {
case (r, rt, (contigT, contig: Code[long])) =>

This comment has been minimized.

Copy link
@danking

danking Sep 25, 2019

Collaborator

what's up with the lowercase long?

This comment has been minimized.

Copy link
@tpoterba

tpoterba Sep 25, 2019

Author Collaborator

a bug is up

This comment has been minimized.

Copy link
@tpoterba

tpoterba Sep 25, 2019

Author Collaborator

hah, was being interpreted as a type variable.

@tpoterba tpoterba changed the title [hail] add `contig_length` function [hail][feature] add `contig_length` function Sep 26, 2019
@danking danking merged commit 469e564 into hail-is:master Sep 27, 2019
1 check passed
1 check passed
ci-test success
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.