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

Questions about LD Reference file #17

Open
DoraCChen opened this issue Apr 5, 2024 · 6 comments
Open

Questions about LD Reference file #17

DoraCChen opened this issue Apr 5, 2024 · 6 comments

Comments

@DoraCChen
Copy link

Hello cTWAS developers,

Thank you for putting together this useful tool! I am in the process of implementing GWAS and had a few questions about preparing the LD matrix .RDS/ Rvar files. Specifically:

  1. I'm having issues downloading files from the UKB Ref hg38 box folder directly onto my computing cluster (via both wget and curl), and unfortunately have to download the files individually ("The selected item(s) exceed the download size limit."). Do you have any tips on how to more efficiently download these Box files? Thank you.

  2. I'm trying to adapt the convert_geno_to_LDR_chr.R script to create LD matrices from 1000G Phase 3 data (adapted from LDSC). Are you open to sharing your BASH file for running the R file, or the arguments that you're supplying to the R script?

Thank you!

@kevinlkx
Copy link
Member

Hello,

Thank you for your interest. We will provide a function in the package that should make it easier for you to convert your genotype data to the LD matrices. We will also upload gzipped LD matrix files (one for each chromosome) for both UKB reference and 1000G Phase 3 data (from LDSC reference). So that you can either download those precomputed files directly or generate those LD matrices using your own genotype data.

I will let you know once they are ready (hopefully in the next 2-3 days).

@CuihuaXia
Copy link

Hi,

I was trying to build the LD matrices based on the 1000 Genomes using your pipeline convert_geno_to_LDR_chr_b37.R for AFR and Asian ancestries. But I could not successfully run it.

I got an error saying `{
"name": "ERROR",
"message": "Error in eval(expr, envir, enclos): object 'prep_pvar' not found
",
"stack": "Error in eval(expr, envir, enclos): object 'prep_pvar' not found
Traceback:

  1. sapply(ldref_files, prep_pvar, outputdir = out_dir)
  2. match.fun(FUN)"
    }`.

It seems the variable prep_pvar was not defined in the code.

Could you help me resolve this issue, or could you possibly provide a resource of AFR and Asian LD matrices in the required format for direct use?

Thanks in advance,
Cuihua

@DoraCChen
Copy link
Author

Thank you for updating these resources!

I also had a follow up question. Do you happen to know if it's possible to do cross-tissue analyses using the cTWAS interface (i.e. running the R equivalent of S-MultiXcan or using the z-scores from those files to run fine mapping)? Thank you.

@kevinlkx
Copy link
Member

kevinlkx commented Apr 18, 2024

We just updated the package with a new function convert_geno_to_LD_matrix for converting genotype data to LD matrices and variant information files in our format.
You may follow the updated R scripts for UK Biobank and 1000G European data], and the "convert genotype data to LD matrices" section in the tutorial.

@kevinlkx
Copy link
Member

For the question about cross-tissue analyses using the cTWAS, we are actively working on a new version of the model for that type of analysis, and will release a new version of the package which will allow cross-tissue analyses.

@CuihuaXia
Copy link

We just updated the package with a new function convert_geno_to_LD_matrix for converting genotype data to LD matrices and variant information files in our format. You may follow the updated R scripts for UK Biobank and 1000G European data], and the "convert genotype data to LD matrices" section in the tutorial.

Great! This works perfectly for me. Thank you so much!
Cuihua

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

3 participants