ilarsf / gwasTools

Basic and fast GWAS functions for QQ and Manhattan plots (incl. gene names)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Script fails if no SNPs are significant?

endrebak opened this issue · comments

If I run the test data included with SAIGE I get the following results:

CHROM    POS    ID    REF    ALT    AC    MAC    MAF    AF    CHISQ    BETA    SEBETA_GC    PVALUE_GC    LOG10P_GC
1    4    rs4    2    1    20    20    0.01    0.01    0.00900168133609557    -0.0748360120098867    0.788767156474349    0.924    0.0341342498337596
1    9    rs9    2    1    4    4    0.002    0.002    0.778767920480584    -1.36954622722431    1.5519319320999    0.378    0.42306208504815
1    10    rs10    2    1    4    4    0.002    0.002    0.198787281155206    0.655246816602172    1.46963884563484    0.656    0.183293820523815
1    11    rs11    2    1    2    2    0.001    0.001    0.0982969720215684    -1.10691964528169    3.53057974490197    0.754    0.122696058298277
1    12    rs12    2    1    30    30    0.015    0.015    0.0187906336497365    -0.0897892694469568    0.655018740034906    0.891    0.0501376964185931
1    14    rs14    2    1    75    75    0.0375    0.0375    0.0298836109133599    -0.0747761355054132    0.432560123012224    0.863    0.0641127257257747
1    15    rs15    2    1    244    244    0.122    0.122    1.32622747205384    -0.28363607944272    0.24629322403832    0.249    0.602968677777628
1    17    rs17    2    1    12    12    0.006    0.006    0.00243722719101353    -0.0411351808952507    0.833230970885822    0.961    0.0174457511091217
1    20    rs20    2    1    762    762    0.381    0.381    0.000120928933151418    -0.00181338599534426    0.164901705220366    0.991    0.00382730415769189
1    22    rs22    2    1    459    459    0.2295    0.2295    0.559747345486054    0.144922266593042    0.193704226331097    0.454    0.342597941239989

But if I run your script on these data I get the message:

Error in seq.default(2, length(chrLab), by = 2) : wrong sign in 'by' argument Calls: axis -> seq -> seq.default Execution halted

I do not know if fixing this is worth your time, but I thought I should report the error :)

Thanks. The script expects to see at least 2 different chromosomes in the input data.