Hi,
First of all, thank you for this tool. I was trying to work with the example-with-provided-ldref.R script but when I keep getting an error when I try to run lines 50-70.
Code:
tmp <- tempfile(tmpdir = "tmp-data")
for (chr in 1:22) {
cat(chr, ".. ", sep = "")
ind.chr <- which(df_beta$chr == chr)
ind.chr2 <- df_beta$_NUM_ID_
[ind.chr]
ind.chr3 <- match(ind.chr2, which(map_ldref$chr == chr))
corr_chr <- readRDS(paste0("ld_chr", chr, ".rds"))[ind.chr3, ind.chr3]
if (chr == 1) {
corr <- as_SFBM(corr_chr, tmp, compact = TRUE)
} else {
corr$add_columns(corr_chr, nrow(corr))
}
}
Error: 1.. Error in gzfile(file, "rb") : cannot open the connection
In addition: Warning message:
In gzfile(file, "rb") :
cannot open compressed file 'ld_chr1.rds', probable reason 'No such file or directory'
I am new to this so any help would be greatly appreciated. I can get ind.chr, ind.chr2 and ind.chr3 commands to run but I'm not sure how to save those so I can use them for the rest of the code.
Thank you in advance!