slowkoni / rfmix

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

segmentation fault #14

Closed cwarden45 closed 5 years ago

cwarden45 commented 5 years ago

Hi,

I am trying to run RFMix on a Linux system. I have tried using Ubuntu in Windows 10, as well as a Debian image on Google Cloud.

In both situations, I get an error message:

Ubuntu (within Windows 10):

/opt/rfmix/rfmix -f Genes_for_Good/GFG_CDW_phased.vcf -r Genes_for_Good/1000_Genomes_plus_CDW_GFG_phased.vcf -m sample_map_1000_Genomes_UNRELATED_plus_1_child_GFG_CW.txt -g 1000_Genomes_genetic_map.txt -o Genes_for_Good/RFMix_seed0/chr1 --chromosome=1 --n-threads 4 --random-seed 0

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

Segmentation fault (core dumped)

Google Cloud (Debian):

 /opt/rfmix/rfmix -f Genes_for_Good/GFG_CDW_phased.vcf -r Genes_for_Good/1000_Genomes_plus_CDW_GFG_phased.vcf -m Genes_for_Good/sample_map_1000_Genomes_UNRELATED_plus_1_child_GFG_CW.txt -g 1000_Genomes_genetic_map.txt -o Genes_for_Good/RFMix_seed0/chr1 --chromosome=1 --n-threads 4 --random-seed 10

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

Segmentation fault

Can you please help me troubleshoot this issue?

If it helps, I have the files described in that command uploaded here: https://drive.google.com/drive/folders/1bvftQbF-9bJrVLxxgEpyNqKCH_5pMURT?usp=sharing

Thank You, Charles

cwarden45 commented 5 years ago

Also, in the interests of completeness, I also get a similar error message with CentOS 7 (on Google Cloud):

/opt/rfmix/rfmix -f Genes_for_Good/GFG_CDW_phased.vcf -r Genes_for_Good/1000_Genomes_plus_CDW_GFG_phased.vcf -m Genes_for_Good/sample_map_1000_Genomes_UNRELATED_plus_1_child_GFG_CW.txt -g 1000_Genomes_genetic_map.txt -o Genes_for_Good/RFMix_seed0/chr1 --chromosome=1 --n-threads 4 --random-seed 0

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

Segmentation fault
cwarden45 commented 5 years ago

Likewise, cygwin gives error message like Ubuntu in Windows 10:

 /opt/rfmix/rfmix -f Genes_for_Good/GFG_CDW_phased.vcf -r Genes_for_Good/1000_Genomes_plus_CDW_GFG_phased.vcf -m sample_map_1000_Genomes_UNRELATED_plus_1_child_GFG_CW.txt -g 1000_Genomes_genetic_map.txt -o Genes_for_Good/RFMix_seed0/chr1 --chromosome=1 --n-threads 4 --random-seed 0

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

Segmentation fault (core dumped)
cwarden45 commented 5 years ago

While I haven't completely exhausted possibilities of compiling in a Windows environment (instead of a UNIX/Linux environment), I found a solution (because somebody recommended using the earlier version of rfmix):

I could download that code here: https://sites.google.com/site/rfmixlocalancestryinference/

This may even work better with the code that I was hoping to use for visualization: https://github.com/armartin/ancestry_pipeline

So, I will close the issue, recommending use of version 1.5.4 (if other people encounter a similar problem).

troycomi commented 2 years ago

I know this is old, but just ran into the same error. Because rfmix uses a custom parser, it is very particular about the option syntax. In particular, any long options like --n-threads must be specified like --n-threads=4 instead of --n-threads 4.