slowkoni / rfmix

RFMIX - Local Ancestry and Admixture Inference Version 2
73 stars 25 forks source link

Aborted (core dumped) #11

Open XuexueLiu opened 5 years ago

XuexueLiu commented 5 years ago

I uese the command like below,but get the errors, I donnot know what is going on, thankyou very much! ./rfmix -f ab.vcf -r reference.vcf -m sample.map -g genetic.map -o db --chromosome=8 -s 5000 --reanalyze-reference

RFMIX v2.03-r0 - Local Ancestry and Admixture Inference (c) 2016, 2017 Mark Koni Hamilton Wright Bustamante Lab - Stanford University School of Medicine Based on concepts developed in RFMIX v1 by Brian Keith Maples, et al.

This version is licensed for non-commercial academic research use only For commercial licensing, please contact cdbadmin@stanford.edu

--- For use in scientific publications please cite original publication --- Brian Maples, Simon Gravel, Eimear E. Kenny, and Carlos D. Bustamante (2013). RFMix: A Discriminative Modeling Approach for Rapid and Robust Local-Ancestry Inference. Am. J. Hum. Genet. 93, 278-288

Loading genetic map for chromosome 8 ... done Mapping samples ... 10 samples combined Scanning input VCFs for common SNPs on chromosome 8 ... 664601 SNPs Loading haplotypes... done Defining and initializing conditional random field... setting up CRF points and random forest windows... computing random forest window spacing overlay... initializing apriori reference subpop across CRF... setting up random forest probability estimation arrays... done Defining and initializing conditional random field... done 3027722 (22.8%) variant alleles 0 (0.0%) missing alleles

Generating internal simulation samples... Internally simulated 0 samples from 0 randomly selected reference parents. mm::allocate() called at setup_ref_haplotypes():627 (random-forest.cpp) requesting zero or negative size (0) mm::allocate() called at setup_ref_haplotypes():627 (random-forest.cpp) requesting zero or negative size (0) mm::allocate() called at setup_ref_haplotypes():683 (random-forest.cpp) requesting zero or negative size (0) mm::allocate() called at bootstrap_haplotypes():462 (random-forest.cpp) requesting zero or negative size (0) mm::allocate() called at bootstrap_haplotypes():463 (random-forest.cpp) requesting zero or negative size (0) mm::allocate() called at build_tree():495 (random-forest.cpp) requesting zero or negative size (0) mm::allocate() called at setup_ref_haplotypes():683 (random-forest.cpp) requesting zero or negative size (0) mm::allocate() called at bootstrap_haplotypes():462 (random-forest.cpp) requesting zero or negative size (0) mm::allocate() called at bootstrap_haplotypes():463 (random-forest.cpp) requesting zero or negative size (0) mm::allocate() called at build_tree():495 (random-forest.cpp) requesting zero or negative size (0) mm::allocate() called at setup_ref_haplotypes():627 (random-forest.cpp) requesting zero or negative size (0) mm::allocate() called at setup_ref_haplotypes():683 (random-forest.cpp) requesting zero or negative size (0) mm::allocate() called at bootstrap_haplotypes():462 (random-forest.cpp) requesting zero or negative size (0) mm::allocate() called at bootstrap_haplotypes():463 (random-forest.cpp) requesting zero or negative size (0) mm::allocate() called at build_tree():495 (random-forest.cpp) requesting zero or negative size (0) rfmix: random-forest.cpp:248: node_t add_node(tree_t, int, int, int, int, double, mm, int): Assertion `n_ref != 0' failed. rfmix: random-forest.cpp:248: node_t add_node(tree_t, int, int, int, int, double, mm, int): Assertion n_ref != 0' failed. rfmix: random-forest.cpp:248: node_t* add_node(tree_t*, int*, int, int*, int, double, mm*, int): Assertionn_ref != 0' failed. mm::allocate() called at setup_ref_haplotypes():627 (random-forest.cpp) requesting zero or negative size (0) mm::allocate() called at setup_ref_haplotypes():683 (random-forest.cpp) requesting zero or negative size (0) mm::allocate() called at bootstrap_haplotypes():462 (random-forest.cpp) requesting zero or negative size (0) mm::allocate() called at bootstrap_haplotypes():463 (random-forest.cpp) requesting zero or negative size (0) mm::allocate() called at build_tree():495 (random-forest.cpp) requesting zero or negative size (0) Aborted (core dumped)

tesspott commented 5 years ago

Hi Xuexue Liu,

Were you able to resolve this issue? I am having a similar issue with my analysis.

Best,

Tess

AAvalos82 commented 5 years ago

Experiencing a similar issue here with the output only being slightly different:

mm::allocate() called at build_tree():495 (random-forest.cpp) requesting zero or negative size (0)
rfmix: random-forest.cpp:248: node_t* add_node(tree_t*, int*, int, int*, int, double, mm*, int): Assertion `n_ref != 0' failed.
mm::allocate() called at bootstrap_haplotypes():462 (random-forest.cpp) requesting zero or negative size (0)
rozaimirazali commented 5 years ago

Anyone found solution to this problem? Any other alternative tool?

cathynes commented 5 years ago

Has anyone found the solution for this issue? I'm having the exact same problem

cathynes commented 5 years ago

In Case anyone else run into this issue, please make sure that your sample file is tab-delimited and check the log file to make sure that the total number of individuals after combining reference and the admixed sample is correct.

HaimengBai commented 4 years ago

In Case anyone else run into this issue, please make sure that your sample file is tab-delimited and check the log file to make sure that the total number of individuals after combining reference and the admixed sample is correct.

Problem solved! Thank you Cathynes.

slowkoni commented 4 years ago

Looks like folks may be attempting to use RFMIX when the number of reference samples per sub-population is very small or even just a single sample. This is not recommended for population level analysis, and the program is not intended for pedigree level analysis.

That said, the abort on assertion failure is not the best error in the world to have surfacing to the user, but it is better than “segmentation fault (core dumped)”. In this case it does at least indicate what assumption is violated, namely the sample size (all programs must make assumptions at some point, good programs check those assumptions, better ones fail a bit more gracefully than this when an assumption is violated)

Other than correcting file format errors or mismatches of sample map and sample data that cause the program to fail to recognize reference samples (sounds like at least two of you experienced something like that), the most likely reason small reference population size will cause a failure that looks like this is an inability to randomly select a small subset of those reference samples for each subpopulation to use as parents for simulating an admixed population with known answers. RFMIX does this for internal calibration of state transition in the conditional random field. There is no principled way of determining the needed weighting values so the program determines it empirically from the data at runtime.

There is a way to bypass the simulation, as it is unnecessary to run it again and again if you are using the same reference data but different query data. Set the option ‘—crf-weight=X’ where X is whatever the previous value was determined to be (it is displayed on stdout). With very small reference data sizes, so small this simulation step can not meaningfully take place (founders must be withheld from the reference data for the simulation, possibly resulting in either no founders or no reference samples), you can simply do something like ‘—crf-weight=1.0’

If that command line option is set, there is no need to run a simulation to determine that parameter and RFMIX will skip doing that.

Good luck, Koni

On Wed, Jan 8, 2020 at 10:17 HaimengBai notifications@github.com wrote:

In Case anyone else run into this issue, please make sure that your sample file is tab-delimited and check the log file to make sure that the total number of individuals after combining reference and the admixed sample is correct.

Problem solved! Thank you Cathynes.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/slowkoni/rfmix/issues/11?email_source=notifications&email_token=ACLKSKPJ3XBTJ6SZYIFYCV3Q4YKFHA5CNFSM4GJLHOJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEINPN4A#issuecomment-572192496, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACLKSKLQGGVRGWNI5IBKZILQ4YKFHANCNFSM4GJLHOJA .