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

Segmentation fault #11

Open
xtYao opened this issue Mar 6, 2017 · 8 comments
Open

Segmentation fault #11

xtYao opened this issue Mar 6, 2017 · 8 comments
Assignees

Comments

@xtYao
Copy link

xtYao commented Mar 6, 2017

Hi @ashokrajaraman @leofountain ,

I tried running Weaver's example code again, nevertheless the "segmentation fault" error still persists. Below are the outputs of the command:

-- Weaver PLOIDY
$ Weaver PLOIDY -f $example/INPUT/SIMU.fa -S $example/INPUT/FINAL_SV -s $example/INPUT/SNP -g $example/INPUT/REGION -w $example/INPUT/X.bam.wig -r 0 -m $example/INPUT/map100mer.bd -p 64 -t 20 -n 0 RUN MODE PLOIDY THREAD was set to 64. FASTA was set to /gpfs/commons/home/yaox-934/tmp/weaverTest/Weaver_example/INPUT/SIMU.fa. WIG was set to /gpfs/commons/home/yaox-934/tmp/weaverTest/Weaver_example/INPUT/X.bam.wig. MAP was set to /gpfs/commons/home/yaox-934/tmp/weaverTest/Weaver_example/INPUT/map100mer.bd. SV was set to /gpfs/commons/home/yaox-934/tmp/weaverTest/Weaver_example/INPUT/FINAL_SV. SNP was set to /gpfs/commons/home/yaox-934/tmp/weaverTest/Weaver_example/INPUT/SNP. GAP was set to /gpfs/commons/home/yaox-934/tmp/weaverTest/Weaver_example/INPUT/REGION. RUNFLAG was set to 0. chrA 13388 chrB 9702 Getting coverage profile... Getting coverage profile done! Getting GC content done! Getting Mapability done! Segmentation fault

-- Weaver LITE
$ Weaver LITE -f $example/INPUT/SIMU.fa -S $example/INPUT/FINAL_SV -s $example/INPUT/SNP -g $example/INPUT/REGION -w $example/INPUT/X.bam.wig -r 0 -m $example/INPUT/map100mer.bd -p 64 -t 20 -n 0 RUN MODE LITE THREAD was set to 64. FASTA was set to /gpfs/commons/home/yaox-934/tmp/weaverTest/Weaver_example/INPUT/SIMU.fa. WIG was set to /gpfs/commons/home/yaox-934/tmp/weaverTest/Weaver_example/INPUT/X.bam.wig. MAP was set to /gpfs/commons/home/yaox-934/tmp/weaverTest/Weaver_example/INPUT/map100mer.bd. SV was set to /gpfs/commons/home/yaox-934/tmp/weaverTest/Weaver_example/INPUT/FINAL_SV. SNP was set to /gpfs/commons/home/yaox-934/tmp/weaverTest/Weaver_example/INPUT/SNP. GAP was set to /gpfs/commons/home/yaox-934/tmp/weaverTest/Weaver_example/INPUT/REGION. RUNFLAG was set to 0. TUMOR coverage was set to 20. NORMAL was set to 0. chrA 13388 chrB 9702 Getting coverage profile... Getting coverage profile done! Getting GC content done! Getting Mapability done! Segmentation fault

These command gave me two temporary files (supposedly):
$ ls -l total 1071872 -rw-rw---- 1 yaox-934 milab 405 Oct 29 2014 cmd drwxrwx--- 2 yaox-934 milab 4096 Oct 29 2014 INPUT drwxrwx--- 2 yaox-934 milab 4096 Nov 3 2014 OUTPUT -rw-rw-r-- 1 yaox-934 milab 0 Mar 6 14:25 TARGET -rw-rw-r-- 1 yaox-934 milab 1609869 Mar 6 14:27 tempfile -rw-rw---- 1 yaox-934 milab 1097298665 Oct 29 2014 X.bam -rw-rw---- 1 yaox-934 milab 161816 Oct 29 2014 X.bam.bai

Have you seen this error before? What might be the cause for it?

Thanks,
XY

@ashokrajaraman
Copy link
Collaborator

Hi XY

In src/partition.cpp, there is a pragma statement in line 339. This statement has been known to cause a race condition. Could you try compiling the code after commenting this, and then run the Weaver PLOIDY and LITE options?

@ashokrajaraman ashokrajaraman self-assigned this Mar 7, 2017
@xtYao
Copy link
Author

xtYao commented Mar 7, 2017

Hi @ashokrajaraman ,

Thanks for your reply. I worked with the sys admin who helped me compile the program since then and we are now able to get rid of the Segmentation fault error for Weaver main program. The example command involving Weaver PLOIDY runs successfully.

However, when I invoke Weaver LITE command from the example, the output files got created but none populated with data.

bash:~/tmp/weaverTest/Weaver_example 1017 $ Weaver-new LITE -f SIMU.fa -S FINAL_SV -s SNP -g REGION -w X.bam.wig -r 0 -m map100mer.bd -p 64 -t 20 -n 0 RUN MODE LITE THREAD was set to 64. FASTA was set to SIMU.fa. WIG was set to X.bam.wig. MAP was set to map100mer.bd. SV was set to FINAL_SV. SNP was set to SNP. GAP was set to REGION. RUNFLAG was set to 0. TUMOR coverage was set to 20. NORMAL was set to 0. Getting coverage profile... Getting coverage profile done! Getting GC content done! Getting Mapability done! base_mean = 20 best_norm = 0 LBP scan LBP LBP init LBP print LBP scan bash:~/tmp/weaverTest/Weaver_example 1018 $ ls -l total 1071872 -rw-rw---- 1 yaox-934 milab 405 Oct 29 2014 cmd -rw-rw-r-- 1 yaox-934 milab 0 Mar 7 15:04 EACH_REGION -rw-rw-r-- 1 yaox-934 milab 0 Mar 7 15:04 EACH_REGION_1 drwxrwx--- 2 yaox-934 milab 4096 Oct 29 2014 INPUT drwxrwx--- 2 yaox-934 milab 4096 Nov 3 2014 OUTPUT -rw-rw-r-- 1 yaox-934 milab 0 Mar 7 15:04 REGION_CN_PHASE -rw-rw-r-- 1 yaox-934 milab 0 Mar 7 15:04 SNP_CN_PHASE -rw-rw-r-- 1 yaox-934 milab 0 Mar 7 15:04 SV_CN_PHASE -rw-rw-r-- 1 yaox-934 milab 0 Mar 7 15:04 SV_REMOVED -rw-rw-r-- 1 yaox-934 milab 0 Mar 7 15:04 SV_SELECTED -rw-rw-r-- 1 yaox-934 milab 0 Mar 7 15:02 TARGET -rw-rw-r-- 1 yaox-934 milab 0 Mar 7 15:04 tempfile -rw-rw---- 1 yaox-934 milab 1097298665 Oct 29 2014 X.bam -rw-rw---- 1 yaox-934 milab 161816 Oct 29 2014 X.bam.bai

So I thought this maybe due to skipping the "solo_ploidy TARGET 2" command, but when I execute it I got Segmentation fault again:

bash:mskilab01:~/tmp/weaverTest/Weaver_example 1021 $ solo_ploidy TARGET 2 Segmentation fault

and this cannot be solved by recompiling the program.

Do you have any thought on this?

Thanks!

@ashokrajaraman
Copy link
Collaborator

Hi @xtYao ,

Actually, you should not have to run solo_ploidy now, so this should not be the case. But I am unable to reproduce the issue with Weaver LITE on the example data at the moment, and it also works fine on the real data sets I've run it on. I would check if all the input files are populated, just in case. Remember, these are files in the INPUT directory.

@xtYao
Copy link
Author

xtYao commented Mar 12, 2017

@ashokrajaraman Thanks so much for the explanation! I see the Weaver LITE is running.

Weaver-new LITE -f $example/INPUT/SIMU.fa -S $example/INPUT/FINAL_SV -s $example/INPUT/SNP -g $example/INPUT/REGION -w $example/INPUT/X.bam.wig -r 0 -m $example/INPUT/map100mer.bd -p 64 -t 20 -n 0

Unfortunately the example command is now halted at this error:

-nancao 0 0108863040 Weaver-new: class.cpp:158: void Linear_region_info::set_value(std::string, int, std::map<std::basic_string<char>, std::vector<site> >&, std::map<std::basic_string<char>, std::vector<interval> >&, std::map<std::basic_string<char>, std::map<interval, region_numbers> >&, \ std::vector<observe>&): Assertion rate_mean == rate_mean' failed.`

By any chance you have run into it before? Attached the stdout.
tmp.out.txt

Thanks!
XY

@ashokrajaraman
Copy link
Collaborator

ashokrajaraman commented Mar 12, 2017

Could you set the -r option to 1 and try again? I think that might be the issue here.

@xtYao
Copy link
Author

xtYao commented Mar 12, 2017

@ashokrajaraman Yes, you're right. I changed the '-r' to 1 and I realized we have gone through this in another thread. Thanks again!

Next question is, the LITE command stopped at:

LBP print LBP scan xxxxxxxxxxxxx chrA xxxxxxxxxxxxx chrB pp 236 1 0 0 pp 236 2 0 -106.109 pp 946 1 0 0 DEAD chrB 946 946452 947451 21.299 2 1 1 0 Weaver-new: LBP.cpp:3017: void Viterbi_lite(std::map<std::basic_string<char>, std::vector<site> >&, std::map<std::basic_string<char>, std::map<interval, region_numbers> >&, std::map<std::basic_string<char>, std::map<int, std::basic_string<char> > >&, std::map<std::basic_string<char>, std::map<int, double> >&, std::vector<observe>&, std::set<site>&, std::set<site>&, std::set<site>&, std::set<site>&, std::map<std::basic_string<char>, std::map<int, int> >&, std::vector<int>&, std::map<CA, int>&, int, std::map<std::basic_string<char>, std::map<int, CA> >&, std::map<CA, CA>&, std::map<std::basic_string<char>, std::vector<interval> >&): Assertion max_p != 1' failed.
Aborted`

Maybe related to this, I noticed a error upstream that didn't cause the program to stop where it couldn't find the bedtools. The path '/../external_bin/bedtools' obviously is not correct since it searches for the root dir. I tried loading the bedtools explicitly in my $PATH before running the Weaver LITE command, and it still tried to find bedtools in that wrong path. Is there a way to make Weaver use the bedtools in environment variable?

Getting coverage profile done! Getting GC content done! sh: /../external_bin/bedtools: No such file or directory Getting Mapability done!

Attached stdout again.
tmp.out.txt

@ashokrajaraman
Copy link
Collaborator

No, the bedtools part should be different. In fact, I have not seen anyone have a problem with finding the bedtools binary, since the Weaver_pipeline.pl script explicitly uses the relative location of the binary in Weaver/external_bin/. We may change this later, but that's how it is for now. I would check if the path to this directory has not been modified in any of the perl or shell scripts in Weaver/bin and Weaver/Weaver_SV/bin/.

The assertion for max_p != 1 is, I believe, a convergence condition for LBP. It does not trip up anything on this end, and I have tried it on 2-3 different systems now. It could very well be a property of the initialization of the MRF model, and since LBP is not guaranteed to converge, just failed to do so for some reason. I would suggest trying it on another system just in case, since I think this is probably not a bug in and of itself.

@d-cameron
Copy link

I have the same problem and it is not a user error. Uncommenting main.cpp:250 indicates that BIN is set to an empty string. Weaver is in fact attempting to call /../external_bin/bedtools when called using the documented example parameters and -r 1

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