neurogenomics / MAGMA_Celltyping

Find causal cell-types underlying complex trait genetics
https://neurogenomics.github.io/MAGMA_Celltyping
71 stars 31 forks source link

map.snps.to.genes error: object 'read_header' not found #45

Closed ChenJin2020 closed 3 years ago

ChenJin2020 commented 3 years ago

Hello,

Thank you for this excellent package.

I got an error when I was mapping the SNPs to the genes:

Error in MAGMA.Celltyping::map.snps.to.genes(path_formatted = gwas_sumstats_path_formatted, : object 'read_header' not found.

The formatted GWAS sum stats is: SNP CHR BP P A1 A2 BETA rs10070308 5 107281621 2.77e-09 C T 0.0994 rs10154963 3 150169559 1.809e-08 C T 0.0765 rs10198789 2 28968811 4.45e-14 C T 0.0929 rs10219645 12 48529737 6.906e-09 C T 0.0756 rs10255049 7 56121304 1.022e-26 G A 0.1404 rs10406053 19 13987186 1.972e-11 G C 0.1021 rs10409547 19 50402819 1.027e-09 G T 0.0926 rs1044595 1 180943529 1.273e-26 T C 0.1323 rs10477172 5 141682090 2.844e-14 T C 0.0919 rs10521305 16 53908484 9.616e-20 C T 0.2628 rs10734411 11 32541784 1.159e-26 G A 0.1294 rs10743271 12 7353790 7.42e-11 T C 0.0891 rs10743724 12 30776022 3.484e-10 C T 0.0759 rs10764106 10 37055384 1.593e-10 C T 0.0775 rs10769315 11 48110367 4.277e-08 T C 0.0815 rs10795520 10 5764160 6.655e-15 G A 0.0965 rs10804920 3 189438689 5.984e-12 T C 0.0842 rs10818873 9 126559993 1.241e-18 C T 0.2184 rs10823203 10 70219610 2.865e-26 G C 0.1589 rs10854167 20 61533039 1.439e-32 G C 0.1752

Thanks,

Chen

bschilder commented 3 years ago

@ChenJin2020, did you manage to find the source of the issue?

Sounds like MungeSumstats wasn't loaded yet (library(MungeSumstats)). Though if that's the case I'll make sure it's imported when the function is called.