Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update run_finemap.R for Finemap Version 1.3? #5

Open
kathryntsai opened this issue Jul 10, 2019 · 0 comments
Open

Update run_finemap.R for Finemap Version 1.3? #5

kathryntsai opened this issue Jul 10, 2019 · 0 comments

Comments

@kathryntsai
Copy link

Hi @variani thank you for creating this package! I've found it really helpful for my summer internship project.

I'm currently working with the run_finemap function. I'm using Finemap version 1.3.1 for Mac OS X, but not with Finemap version 1.1. The errors make sense based on the documention for Finemap 1.3. I've noticed the following changes can be made to update it:

First, the master file for FINEMAP 1.3.1 needs to have columns with the following headings: z;ld;snp;config;cred;[prior-k if applicable];log;n_samples

Second, the z-file for Finemap 1.3.1 has to be 8 columns, unlike the 2 provided in the example. In R, I could modify the example z1 file as the following, using the input z-file documentation for FINEMAP:

z1 <- data.table(z1$snp, 1, 1:5363, "A", "G", 0, z1$zscore, 0)
colnames(z1)[1:8] <- c("snp", "chromosome", "position", "allele1", "allele2", "maf", "zscore", "se")

However, the third issue I have not been able to resolve. Even after I've updated the finemap.R function to address the extra columns, I get this error when I try to run the example with the updated z-file:
Error : Expected 'rsid' in line 1 column 1 of file 'region.z'!

I also updated finemapr to use the "rsid" column name for "snp", but this didn't resolve the issue.

Do you know what the issue could be? I've made a pull request so you can see the comparisons between the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant