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

std::out of range error #153

Open
kalimero0411 opened this issue Oct 21, 2023 · 7 comments
Open

std::out of range error #153

kalimero0411 opened this issue Oct 21, 2023 · 7 comments

Comments

@kalimero0411
Copy link

I tried running cafe5 with many species and got a valid lambda only after removing 17 OGs (from orthofinder). However, afterwards I always get the following error:

Filtering families not present at the root from: 46627 to 16060

No root family size distribution specified, using uniform distribution
Inferring processes for Base model
Score (-lnL): 839506.19397248
Maximum possible lambda for this topology: 4.5203052110078
Computing pvalues...
terminate called after throwing an instance of 'std::out_of_range'
  what():  vector::_M_range_check: __n (which is 721) >= this->size() (which is 721)

I tried decreasing the CPU number to 1 and inputting the lambda manually. The happens in the conda environment v5.0 as well as the v5.1 from GitHub.

Could you advise me on what could be done?
Thank you.

@benfulton
Copy link
Member

Can you share your tree and input files? Or send them directly to me if you prefer. What lambda did you input manually?

@kalimero0411
Copy link
Author

kalimero0411 commented Oct 23, 2023 via email

@benfulton
Copy link
Member

This appears to be a bug in CAFE in handling family sizes over 1000. I believe you only have one, in the very first family, so if you remove that one it should work.

If you are technically inclined, you could edit config.h and modify the value of MAX_STACK_FAMILY_SIZE to 2000 and that should work as well.

We'll try to get a fix in, but I don't know for when we have another CAFE release planned.

@xiongqian123456789
Copy link

Hello

I also met this error as follows:
cat cafe.e7330161
terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 801) >= this->size() (which is 801)
/var/spool/pbs/mom_priv/jobs/7330161.gatk1.SC: line 38: 34880 Aborted (core dumped) cafe5 -i gene.counts.tab -t tree.withTime.nwk -p -o 3results --cores 40 -l 0.001

And I checkd the input file with no family > 1000;
And I also could not find the config.h file to modify the value of MAX_STACK_FAMILY_SIZE.

Really appreaciated for your help!

@ShanfenO
Copy link

Hello
What is the number of species you have successfully run

@kalimero0411
Copy link
Author

I edited config.h MAX_STACK_FAMILY_SIZE to 5000 and recompiled.
Then ran 23 Brassicales species and it worked perfectly.

@ShanfenO
Copy link

I edited config.h MAX_STACK_FAMILY_SIZE to 5000 and recompiled. Then ran 23 Brassicales species and it worked perfectly.
OK.
Thank you.

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

4 participants