Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: in recorded genealogy log likelihood #67

Open
FatihSarigol opened this issue Mar 19, 2020 · 2 comments
Open

Error: in recorded genealogy log likelihood #67

FatihSarigol opened this issue Mar 19, 2020 · 2 comments

Comments

@FatihSarigol
Copy link

Hello. I had completed running one dataset successfully thanks to your help before but with a new one I ran into a strange error that I received after the program was running fine for 2 days, that I didnt get before. Do you have any tips that can help? Thanks in advance! (and I hope you are all fine and safe!)

**Error: in recorded genealogy log likelihood for gen 32846: (recorded = 47.6939, actual = 47.6939, diff = -5.31535e-06, 1-ratio = 1.11447e-07).

Error: -- Aborting when logging after MCMC iteration -15401, due to data structure inconsistency.**

Here is my control file:

GENERAL-INFO-START

            seq-file                GphocsInput
            trace-file              tursiops_trace
            burn-in         25000
            mcmc-iterations         100000
            mcmc-sample-skip                0
            start-mig               0
            iterations-per-log              100
            logs-per-line           100

            tau-theta-print         10000
            tau-theta-alpha         1
            tau-theta-beta          10000

            mig-rate-print          0.001
            mig-rate-alpha          0.002
            mig-rate-beta           0.00001

            locus-mut-rate          CONST

            find-finetunes          TRUE
            find-finetunes-num-steps                100
            find-finetunes-samples-per-step         100

GENERAL-INFO-END

CURRENT-POPS-START

            POP-START
                            name            Ttruncatus
                            samples         Ttruncatus d
            POP-END

            POP-START
                            name            Taduncus
                            samples         Taduncus d
            POP-END

            POP-START
                            name            Lobliquidens
                            samples         Lobliquidens d
            POP-END

CURRENT-POPS-END

ANCESTRAL-POPS-START

            POP-START
                            name            Tursiops
                            children                Ttruncatus              Taduncus
                            tau-initial             0.9
            POP-END

            POP-START
                            name            root
                            children                Tursiops                Lobliquidens
                            tau-initial             1.0
            POP-END

ANCESTRAL-POPS-END

MIG-BANDS-START

            BAND-START
                            source          Ttruncatus
                            target          Taduncus
            BAND-END

            BAND-START
                            source          Ttruncatus
                            target          Lobliquidens
            BAND-END

            BAND-START
                            source          Taduncus
                            target          Ttruncatus
            BAND-END

            BAND-START
                            source          Taduncus
                            target          Lobliquidens
            BAND-END

            BAND-START
                            source          Lobliquidens
                            target          Ttruncatus
            BAND-END

            BAND-START
                            source          Lobliquidens
                            target          Taduncus
            BAND-END

MIG-BANDS-END

@gphocs-dev
Copy link
Owner

hi Fatih,

This is a technical bug in G-PhoCS's data structures that indicates that the different structures used to store information about the local genealogies are not 100% consistent. This often is caused by a series of aggregated rounding errors, and it's typically associated with extreme cases, such as very high migration rates, or very close divergence times. Is that the case in your analyses? Either way, there's not much that you can do about this, other than play with the migration bands. I am in the process of transitioning the code into more stable data structures, but this is a long-term project that will not be done any time soon.

@jsalt
Copy link

jsalt commented May 19, 2021

Hi there,

I'm encountering a similar error and am hoping for some clarification on how best to adjust my control file. It's a pretty large run (I think), because I have 5 current pops and 32 migration bands. I successfully ran G-Phocs (v1.3) on a version of this dataset that included one less population (4 current pops and 18 migration bands), but now I am getting the following error:

Fatal Error 0033.

Error: -- Aborting when logging after MCMC iteration 11599, due to data structure inconsistency.

Any insights into how to solve this would be much appreciated! Thanks in advance.

Here's my control file:

GENERAL-INFO-START

seq-file        cmu-outgroup-109-gphocs.txt
trace-file      pdr-outgroup-mcmc.out
mcmc-iterations 1000000

# automatic finetune finder
find-finetunes  TRUE

tau-theta-alpha 1.0
tau-theta-beta  10000.0

mig-rate-alpha  0.002
mig-rate-beta   0.00001

GENERAL-INFO-END

CURRENT-POPS-START

POP-START
    name    N_Mex
    samples ari45547 d ari45549 d	 ari45554 d   ari7700 d   ari7702 d
POP-END

POP-START
    name    S_Mex
    samples	pec2828 d pec35866 d	 pec35867 d	 pec46867 d	 pec46883 d
POP-END

POP-START
    name    USA
    samples flo270594 d flo270595 d	 flo270596 d	 flo48982 d	 flo69842 d
POP-END

POP-START
    name    Cuba cub33315 d	 cub33316 d	 cub33317 d	 cub33319 d	 cub33320 d
POP-END

POP-START
    name    BTBO cnc14442 d	 cnc14443 d	 cnp14424 d	 cnp14431 d	 cnp14433 d
POP-END

CURRENT-POPS-END

ANCESTRAL-POPS-START

POP-START
    name        S_NOBO
    children    Cuba    S_Mex
POP-END

POP-START
    name        N_NOBO
    children    USA N_Mex
POP-END

POP-START
    name    NOBO
    children    S_NOBO    N_NOBO
POP-END

POP-START
    name    ANBO
    children    NOBO    BTBO
POP-END

ANCESTRAL-POPS-END

MIG-BANDS-START
    BAND-START
        source  S_Mex
        target  Cuba
    BAND-END

    BAND-START
        source  S_Mex
        target  N_Mex
    BAND-END

    BAND-START
        source  S_Mex
        target  USA
    BAND-END

    BAND-START
        source  S_Mex
        target  N_NOBO
    BAND-END

    BAND-START
        source  Cuba
        target  N_Mex
    BAND-END

    BAND-START
        source  Cuba
        target  USA
    BAND-END

    BAND-START
        source  Cuba
        target  N_NOBO
    BAND-END

    BAND-START
        source  N_Mex
        target  USA
    BAND-END

    BAND-START
        source  S_NOBO
        target  N_NOBO
    BAND-END

    BAND-START
        source  Cuba
        target  S_Mex
    BAND-END

    BAND-START
        source  N_Mex
        target  S_Mex
    BAND-END

    BAND-START
        source  USA
        target  S_Mex
    BAND-END

    BAND-START
        source  N_NOBO
        target  S_Mex
    BAND-END

    BAND-START
        source  N_Mex
        target  Cuba
    BAND-END

    BAND-START
        source  USA
        target  Cuba
    BAND-END

    BAND-START
        source  N_NOBO
        target  Cuba
    BAND-END

    BAND-START
        source  USA
        target  N_Mex
    BAND-END

    BAND-START
        source  N_NOBO
        target  S_NOBO
    BAND-END

    BAND-START
        source  BTBO
        target  S_NOBO
    BAND-END

    BAND-START
        source  BTBO
        target  Cuba
    BAND-END

    BAND-START
        source  BTBO
        target  N_Mex
    BAND-END

    BAND-START
        source  BTBO
        target  USA
    BAND-END

    BAND-START
        source  BTBO
        target  S_NOBO
    BAND-END

    BAND-START
        source  BTBO
        target  N_NOBO
    BAND-END

    BAND-START
        source  BTBO
        target  NOBO
    BAND-END

    BAND-START
        source  S_Mex
        target  BTBO
    BAND-END

    BAND-START
        source  Cuba
        target  BTBO
    BAND-END

    BAND-START
        source  N_Mex
        target  BTBO
    BAND-END

    BAND-START
        source  USA
        target  BTBO
    BAND-END

    BAND-START
        source  S_NOBO
        target  BTBO
    BAND-END

    BAND-START
        source  N_NOBO
        target  BTBO
    BAND-END

    BAND-START
        source  NOBO
        target  BTBO
    BAND-END

MIG-BANDS-END

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants