##Munge sumstats Takes an unprocessed GWAS sumstat file, performs QC and changes it to a standard format. Location: https://github.com/ymer/ldsc Details at: ? Contact: Jonatan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Distributions | |
using GLM | |
using RCall | |
using Random | |
Random.seed!(2) | |
n = 10000 | |
ses = collect(1:n) | |
pgs = rand(Normal(), n) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Combinatorics | |
function find_matching_pairs(s) | |
l, starts = [], [] | |
for i in 1:length(s) | |
if s[i] == "(" | |
push!(starts, i) | |
elseif s[i] == ")" | |
push!(l, (pop!(starts), i)) | |
end |