BoevaLab / FREEC

Control-FREEC: Copy number and genotype annotation in whole genome and whole exome sequencing data
152 stars 49 forks source link

Segmentation fault (core dumped) at "will remove all windows with read count in the control less than 50" #20

Open igordot opened 7 years ago

igordot commented 7 years ago

I am running Control-FREEC. If I use the BAM files, I run into this error:

CG-content printed into ./GC_profile.targetedRegions.cnp
..using GC-content to normalize the control profile
file ./GC_profile.targetedRegions.cnp is read
..will remove all windows with read count in the control less than 50
Warning: control length is not equal to the sample length for chromosome 1
Warning: control length is not equal to the sample length for chromosome 2
Warning: control length is not equal to the sample length for chromosome 3
Warning: control length is not equal to the sample length for chromosome 4
Warning: control length is not equal to the sample length for chromosome 5
Warning: control length is not equal to the sample length for chromosome 6
Warning: control length is not equal to the sample length for chromosome 7
Warning: control length is not equal to the sample length for chromosome 8
Warning: control length is not equal to the sample length for chromosome 9
Warning: control length is not equal to the sample length for chromosome 10
Warning: control length is not equal to the sample length for chromosome 11
Warning: control length is not equal to the sample length for chromosome 12
Warning: control length is not equal to the sample length for chromosome 13
Warning: control length is not equal to the sample length for chromosome 14
Warning: control length is not equal to the sample length for chromosome 15
Warning: control length is not equal to the sample length for chromosome 16
Warning: control length is not equal to the sample length for chromosome 17
Warning: control length is not equal to the sample length for chromosome 18
Warning: control length is not equal to the sample length for chromosome 19
Warning: control length is not equal to the sample length for chromosome 20
Warning: control length is not equal to the sample length for chromosome 21
Warning: control length is not equal to the sample length for chromosome 22
Warning: control length is not equal to the sample length for chromosome X
Segmentation fault (core dumped)

In my experience, a core dump happens when there is a memory issue, but it's only 45MB, so that can't be the reason.

If I repeat the analysis, but change from mateFile to mateCopyNumberFile using the .cpn files from the failed analysis, the problem goes away:

CG-content printed into ./GC_profile.targetedRegions.cnp
..using GC-content to normalize the control profile
file ./GC_profile.targetedRegions.cnp is read
..will remove all windows with read count in the control less than 50
..will process the control file as well: removing all windows with read count in the control less than 50
..Set ploidy for the control genome equal to 2
..Running FREEC with ploidy set to 2

It's using the same .cpn files for doing that calculation as far as I can tell. Why does it work one in one version but not the other? I tried multiple times with the same results.

valeu commented 7 years ago

"Segmentation fault (core dumped)" means that FREEC tries to access an element in a vector that does not exits. I suggest you send me an email with your config file and the complete output into the command line. Thank you. Valentina valentina.boeva at inserm . fr

igordot commented 7 years ago

I sent you an email.

In the meantime, I also tried compiling with a newer version of gcc (6.1 instead of 4.4). I got the same type of error, but it is a little different. I am adding it here in case this applies to anyone else:

Warning: control length is not equal to the sample length for chromosome 22
Warning: control length is not equal to the sample length for chromosome X
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted (core dumped)
lixuenan commented 7 years ago

@igordot Had you solved this problem? I got the same error as you mentioned in the first question, I don't have any idea to solve the problem and need your help

igordot commented 7 years ago

@lixuenan In my case, the problem was that the chromosome lengths file and the BED file did not have the same chromosomes. The discrepancy was that the BED file did not have chrM. Removing chrM from the chromosome lengths file solved the problem.

lixuenan commented 7 years ago

@igordot Thanks a lot for your reply, I solved the problem above.