fgvieira / ngsF-HMM

Estimation of per-individual inbreeding tracts under a probabilistic framework
GNU General Public License v3.0
13 stars 6 forks source link

Error: Fw and Bw lkl do not match! #3

Closed cbossu closed 3 years ago

cbossu commented 4 years ago

Hello, I'm running into the error regarding likelihood check: "Fw and Bw lkl do not match!" and "Numerical result out of range". Given the code is from the below chunk of code, and it's coded as a likelihood check due to precision issues on large datasets, I'm curious about what is considered a large data set. I'm trying to run this on 14 individuals with 6x coverage. I'm attempting to see how ngsFHMM works with 6X coverage, compared to other programs to identify runs of homozygosity (those that require called genotypes).

Do I need to subsample the bam files we have to lower coverage to allow this program to work? Can I adjust the 0.001 to a smaller number?

Thanks.

Christen

// Lkl check! - relaxed (to 0.001) due to precision issues on large datasets for (uint64_t i = 0; i < pars->n_ind; i++) if( abs(logsum(Fw[i][pars->n_sites],2) - logsum(Bw[i][0],2)) > 0.001 ){ printf("Ind %lu: %.15f\t%.15f (%.15f)\n", i, logsum(Fw[i][pars->n_sites],2), logsum(Bw[i][0],2), abs(logsum(Fw[i][pars->n_sites],2) - logsum(Bw[i][0],2)) ); error(FUNCTION, "Fw and Bw lkl do not match!"); }

fgvieira commented 4 years ago

Hi Christen,

14 indiv at 6x coverage should be fine... how are you running ngsF-HMM? Can you send me the log file?

cbossu commented 4 years ago

Hello Filipe, I’ve attached the error file (.err) and the log file (.out). If you want the script, I can send that too. Best,

Christen

Christen Bossu The Institute of the Environment and Sustainability Center for Tropical Research University of California, Los Angeles Los Angeles, CA 90095-1496 cbossu@ucla.edu

On Feb 25, 2020, at 08:36, Filipe G. Vieira notifications@github.com wrote:

Hi Christen,

14 indiv at 6x coverage should be fine... how are you running ngsF-HMM? Can you send me the log file?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fgvieira/ngsF-HMM/issues/3?email_source=notifications&email_token=ADCLYF4JPQSNNRRUW5NNR7DREU3JFA5CNFSM4KZ7ZLOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM4NUMA#issuecomment-590928432, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCLYF2SOKBDZ2A2N63HIE3REU3JFANCNFSM4KZ7ZLOA.

fgvieira commented 4 years ago

HI Christen,

where did you attach the files? if not too big, you can also just copy/paste them directly here.

cbossu commented 4 years ago

Sorry. The files had .err and .out extensions, which wasn't supported by github. I've re-added them here with appropriate extensions. Best,

Christen BUOW.ngsFHMM.7897975.out.txt BUOW.ngsFHMM.7897975.err.txt

fgvieira commented 4 years ago

It looks like you are running angsd to get the 10 GL (option -doGlf 4), but that format is not supported by ngsF-HMM. Try running angsd with -doGlf 2 and run ngsF-HMM without the --loglkl option.