Skip to content

Commit

Permalink
update GWAS for window size
Browse files Browse the repository at this point in the history
  • Loading branch information
reworkhow committed Jul 21, 2021
1 parent 824230a commit 5c74aeb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/3.GWAS/src/GWAS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ function GWAS(mme,map_file,marker_effects_file::AbstractString...;
if map_file == false && typeof(window_size) <: Integer
println("The map file is not provided. A fake map file is generated with $window_size markers in each 1 Mb window.")
nmarkers=length(readdlm(marker_effects_file[1],',',header=true)[2])
mapfile = DataFrame(markerID=1:nmarkers,
positions =
mapfile = DataFrame(markerID =1:nmarkers,
chromosome=fill(1,nmarkers),
position=1:10_000:nmarkers*10_000)
position =Int.(floor.(1:(1_000_000/window_size):nmarkers*(1_000_000/window_size))))
CSV.write("mapfile.temp",mapfile)
map_file, window_size = "mapfile.temp", "1 Mb"
end
Expand Down

0 comments on commit 5c74aeb

Please sign in to comment.