Skip to content

Commit

Permalink
rename eid column
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierlabayle committed May 24, 2022
1 parent a4644a8 commit 214ac06
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/UKBMain.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ function decode(parsed_args)

columns = first_instance_fields(datasetfile)
dataset = CSV.read(datasetfile, DataFrame, select=columns)
rename!(dataset, :eid => :SAMPLE_ID)

fields = CSV.read(fieldsfile, DataFrame)

Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ end
)
decode(parsed_args)
output = CSV.read(parsed_args["out"], DataFrame)
@test names(output) == ["eid", "21003-0.0", "22001-0.0"]
@test output[:, "eid"] isa Vector{Int}
@test names(output) == ["SAMPLE_ID", "21003-0.0", "22001-0.0"]
@test output[:, "SAMPLE_ID"] isa Vector{Int}
@test output[:, "21003-0.0"] isa Vector{Int}
@test output[:, "22001-0.0"] isa Vector{Union{Bool, Missing}}

Expand Down

0 comments on commit 214ac06

Please sign in to comment.