You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Referring to file: code/example-with-provided-LD.R
in which case ind.chr3 and ind.chr2 are not the same?
## indices in 'df_beta'
ind.chr <- which(df_beta$chr == chr)
## indices in 'map_ldref'
ind.chr2 <- df_beta$`_NUM_ID_`[ind.chr]
## indices in 'corr_chr'
ind.chr3 <- match(ind.chr2, which(map_ldref$chr == chr))
'df_beta' was derived from this matching: (info_snp <- tibble::as_tibble(snp_match(sumstats, map_ldref, return_flip_and_rev = T))), so it already contains the variants that are both in the summary statistics and map_ldref, as well as the right chromosome (which(df_beta$chr == chr)). So not sure what ind.chr3 <- match(ind.chr2, which(map_ldref$chr == chr)) is doing here.
The text was updated successfully, but these errors were encountered:
I believe ind.chr2 <- df_beta$_NUM_ID_[ind.chr] already contains the same info as ind.chr3.
Since you already filter for the specific chromosome you need and you take the indices of map_ldref from _NUM_ID_ column.
I don't follow you. ind.chr3 is needed to get the subset of each LD matrix (the indices relative to each chromosome).
Using ind.chr2 instead of ind.chr3 wouldn't work.
Referring to file:
code/example-with-provided-LD.R
in which case
ind.chr3
andind.chr2
are not the same?'df_beta' was derived from this matching:
(info_snp <- tibble::as_tibble(snp_match(sumstats, map_ldref, return_flip_and_rev = T)))
, so it already contains the variants that are both in the summary statistics and map_ldref, as well as the right chromosome (which(df_beta$chr == chr)
). So not sure whatind.chr3 <- match(ind.chr2, which(map_ldref$chr == chr))
is doing here.The text was updated successfully, but these errors were encountered: