fgvieira/ngsLD

fit_LDdecay.R error: 'to' must be a finite number

fuesseler opened this issue · 1 comments

Hello!
Thanks for developing this tool. I've been trying to run fit_LDdecay.R but keep running into this error message:

INFO [10:34:59.548] Random seed: 93
INFO [10:34:59.590] Fitting r2 LD decay assuming a one (rate of decay) parameter decay model
INFO [10:34:59.637] Reading file rndsample005.ld
INFO [10:39:41.323] Number of lines: 42765770
INFO [10:39:41.327] Number of lines after filtering: 0
Error in seq.default(0, max(tmp_data$dist) + opt$fit_bin_size, opt$fit_bin_size) :
'to' must be a finite number
Calls: seq -> seq.default
In addition: Warning message:
In max(tmp_data$dist) : no non-missing arguments to max; returning -Inf
Execution halted

this is the command I run:
ls rndsample005.ld | Rscript --vanilla --slave fit_LDdecay.R --out test.rndsample005_decay.pdf --col 3 --ld r2 --n_ind 135 --fit_level 100 --max_kb_dist 2000 --fit_boot 100 --fit_bin_size 1000

Do you have any idea what might be going wrong here? Any help would be much appreciated!

Best regards,
F

I found the problem: my input file did not have a header. Adding the header fixes the error.