Skip to content

Commit

Permalink
update GWAS() to remove extra snps in user's mapfile
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaotianjing committed Mar 18, 2022
1 parent 95852dc commit 6980586
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/3.GWAS/src/GWAS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ function GWAS(mme,map_file,marker_effects_file::AbstractString...;

window_size_bp = map(Int64,parse(Float64,split(window_size)[1])*1_000_000)
mapfile = (header == true ? readdlm(map_file,',',header=true)[1] : readdlm(map_file,','))
#remove SNPs in mapfile that are not used in Bayesian analysis (e.g., removed in QC)
snpID = mme.M[1].markerID
in_snpID = findall(x -> x snpID, mapfile[:,1])
mapfile = mapfile[in_snpID,:]

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

Expand Down

0 comments on commit 6980586

Please sign in to comment.