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

update GWAS: fixed data type for 2nd and 3rd column when read mapfile. #156

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

zhaotianjing
Copy link
Collaborator

Fixed data type for 2nd and 3rd column when read mapfile.

Reason: user reported that old code mapfile = CSV.read(map_file, DataFrame, header = header, types=Dict(1 => String)) converts the 3rd column to a crazy type of ::SentinelArrays.ChainedVector{Float64, Vector{Float64}}). This will cause error for this line in GWAS(): map(Int64,mapfile[:,3]).

The new code solves the issue. New code: mapfile = CSV.read(map_file, DataFrame, header = header, types=Dict(1 => String, 2 => String, 3 => Int64))

Other modification:
old code:

    chr     = map(string,mapfile[:,2])
    pos     = map(Int64,mapfile[:,3])

new code:

    chr     = mapfile[:,2]
    pos     = mapfile[:,3]

@reworkhow reworkhow merged commit b3e1eee into master Sep 10, 2024
1 check passed
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.

2 participants