QSG-Group / WISH

5 stars 3 forks source link

error running generate.modules #4

Open mjsduncan opened 4 years ago

mjsduncan commented 4 years ago

i have a large and unbalanced data set: ~ 30k snps, 500 cases, 30 controls. i've successfully generated the correlation matrices but running generate.modules seems to process the snps initially but then produces this error generating one of the output tables:

modules <- generate.modules(ep,values="Coefficients",power=c(seq(1,10,0.1),c(12:21)),
                            n.snps=500, minClusterSize=50, type="unsigned",threads=2)
...
# 99   19.0    0.617 -1.180          0.608    11.7        -1    492
# 100  20.0    0.603 -1.160          0.619    11.5        -1    486
# 101  21.0    0.597 -1.160          0.615    11.3        -1    481
# 102  22.0    0.567 -1.130          0.614    11.1        -1    475
# Error in seq.default(from = min(k), to = max(k), length = nBreaks + 1) : 
#   'from' must be a finite number

there were originally some snps with no alternate alleles (all samples had value 0) but the same error occurs when they are removed. there are lots of singltons though. i tried reducing the input power matrix default from 12:22 in the columns to 12:21 but that didn't help. any suggestions?

thanks for your work! mike

mjsduncan commented 4 years ago

dropping singletons (where case or control MAC=0) produces the same error. also, reducing the power range to stop at 21 or 10 produces the same error but the power value in the second column still goes to 22 to fail (as in line 102 in op example output), are the alternate input values not being used?

mjsduncan commented 4 years ago
warnings()
# Warning messages:
# 1: In as.vector(log10(dk)) : NaNs produced
# 2: In as.vector(log10(dk)) : NaNs produced
# 3: In as.vector(log10(dk)) : NaNs produced
# ...
# 49: In as.vector(log10(dk)) : NaNs produced
# 50: In as.vector(log10(dk)) : NaNs produced