Entering edit mode
2.7 years ago
raf.marcondes
▴
110
I'm getting the error below when trying to make a Manhattan plot in qqman from GWAS results (from gemma). It doesn't make any sense because all columns are in the same dataframe, so obviously they have the same length. I also already checked that chr, ps, and p_wald are all numeric, and that none has NAs. Thanks for any help!
> head(dat) chr rs ps n_miss allele1 allele0 af beta se logl_H1 l_remle p_wald 1: 1 chr1_cl:20487[Thamno]C,T 20487 0 T C 0.241 0.06871735 0.02126837 31.94490 1e+05 0.0034440570 2: 1 chr1_cl:23607[Thamno]A,G 23607 0 A G 0.278 0.06240038 0.02013539 31.73593 1e+05 0.0047535890 3: 1 chr1_cl:23620[Thamno]C,T 23620 0 C T 0.222 -0.11707830 0.02759205 34.71714 1e+05 0.0002647592 4: 1 chr1_cl:24502[Thamno]C,G 24502 0 G C 0.667 0.08801808 0.02332899 33.61826 1e+05 0.0008856252 5: 1 chr1_cl:56337[Thamno]C,T 56337 0 C T 0.444 0.04538745 0.01622219 30.89880 1e+05 0.0097585820 6: 1 chr1_cl:94431[Thamno]C,T 94431 0 T C 0.222 0.06705353 0.02130109 31.74712 1e+05 0.0042208430
> manhattan(x=dat, + chr='chr', + bp='ps', + p='p_wald', + logp=T, + suggestiveline=F) Error in tapply(d$SNP, d$CHR, length) : arguments must have same length In addition: Warning message: In manhattan(x = dat, chr = "chr", bp = "ps", p = "p_wald", logp = T, : No SNP column found. OK unless you're trying to highlight.