Segmentation fault error in CONTROL-FREEC
0
0
Entering edit mode
7 months ago
DdogBoss • 0

Hi,

I am trying to run CONTROL-FREEC on diploid yeast samples to detect CNVs on a department cluster.

The config file looks like this:

[general]

chrLenFile = yeast_chr.len
ploidy = 2
window = 150000

#breakPointThreshold = -.002;
#coefficientOfVariation = 0.062
chrFiles = /net/smith/vol1/home/student/FREEC-11.6b/data/test_sludge/yeast_files
outputDir = /net/smith/vol1/home/student/FREEC-11.6b/data/test_sludge/output
#degree=3

[sample]

mateFile = /net/smith/vol1/home/student/FREEC-11.6b/data/test_sludge/caffeine_ML_S47/caffeine_ML_S47_R1R2_sort.bam
inputFormat = bam
mateOrientation = 0

[control]

mateFile = /net/smith/vol1/home/student/FREEC-11.6b/data/test_sludge/1011_BTC_fleichmanns_S5/1011_BTC_fleichmanns_S5_R1R2_sort.bam
inputFormat = bam
mateOrientation = 0

The full command line output is:

./freec -conf ./config_sludge.txt
Control-FREEC v11.6 : a method for automatic detection of copy number alterations, subclones and for accurate estimation of contamination and main ploidy using deep-sequencing data
Non Multi-threading mode
..Breakpoint threshold for segmentation of copy number profiles is 0.8
..telocenromeric set to 50000
..FREEC is not going to output normalized copy number profiles into a BedGraph file (for example, for visualization in the UCSC GB). Use "[general] BedGraphOutput=TRUE" if you want a BedGraph file
..FREEC is not going to adjust profiles for a possible contamination by normal cells
..Window = 150000 was set
..Output directory:     /net/smith/vol1/home/student/FREEC-11.6b/data/test_sludge/output
..Directory with files containing chromosome sequences: /net/smith/vol1/home/student/FREEC-11.6b/data/test_sludge/yeast_files
..Sample file:  /net/smith/vol1/home/student/FREEC-11.6b/data/test_sludge/caffeine_ML_S47/caffeine_ML_S47_R1R2_sort.bam
..Sample input format:  bam
..will use this instance of samtools: 'samtools' to read BAM files
..Control file: /net/smith/vol1/home/student/FREEC-11.6b/data/test_sludge/1011_BTC_fleichmanns_S5/1011_BTC_fleichmanns_S5_R1R2_sort.bam
..Input format for the control file:    bam
..Polynomial degree for "Sample ReadCount ~ Control ReadCount" normalization is 1
..Minimal CNA length (in windows) is 1
..File with chromosome lengths: yeast_chr.len
..uniqueMatch = FALSE
..average ploidy set to 2
..break-point type set to 2
..noisyData set to 0
..minimal number of reads per window in the control sample is set to 10
..Control-FREEC will not look for subclones
..File yeast_chr.len was read
..[genomecopynumber] Starting reading /net/smith/vol1/home/student/FREEC-11.6b/data/test_sludge/caffeine_ML_S47/caffeine_ML_S47_R1R2_sort.bam
..samtools should be installed to be able to read BAM files; will use the following command for samtools: samtools view -@ 1 /net/smith/vol1/home/student/FREEC-11.6b/data/test_sludge/caffeine_ML_S47/caffeine_ML_S47_R1R2_sort.bam
..finished reading /net/smith/vol1/home/student/FREEC-11.6b/data/test_sludge/caffeine_ML_S47/caffeine_ML_S47_R1R2_sort.bam
PROFILING [tid=140279949358912]: /net/smith/vol1/home/student/FREEC-11.6b/data/test_sludge/caffeine_ML_S47/caffeine_ML_S47_R1R2_sort.bam read in 8 seconds [fillMyHash]
4091282 lines read..
9027 reads used to compute copy number profile
printing counts into /net/smith/vol1/home/student/FREEC-11.6b/data/test_sludge/output/caffeine_ML_S47_R1R2_sort.bam_sample.cpn
..Window size:  150000
..File yeast_chr.len was read
..[genomecopynumber] Starting reading /net/smith/vol1/home/student/FREEC-11.6b/data/test_sludge/1011_BTC_fleichmanns_S5/1011_BTC_fleichmanns_S5_R1R2_sort.bam
..samtools should be installed to be able to read BAM files; will use the following command for samtools: samtools view -@ 1 /net/smith/vol1/home/student/FREEC-11.6b/data/test_sludge/1011_BTC_fleichmanns_S5/1011_BTC_fleichmanns_S5_R1R2_sort.bam
..finished reading /net/smith/vol1/home/student/FREEC-11.6b/data/test_sludge/1011_BTC_fleichmanns_S5/1011_BTC_fleichmanns_S5_R1R2_sort.bam
PROFILING [tid=140279949358912]: /net/smith/vol1/home/student/FREEC-11.6b/data/test_sludge/1011_BTC_fleichmanns_S5/1011_BTC_fleichmanns_S5_R1R2_sort.bam read in 4 seconds [fillMyHash]
2087161 lines read..
70871 reads used to compute copy number profile
printing counts into /net/smith/vol1/home/student/FREEC-11.6b/data/test_sludge/output/1011_BTC_fleichmanns_S5_R1R2_sort.bam_control.cpn
..will remove all windows with read count in the control less than 10
..will process the control file as well: removing all windows with read count in the control less than 10
..Set ploidy for the control genome equal to 2
..Running FREEC with ploidy set to 2
Initial guess for polynomial:
Y = 0.127372*x+0
Error in linear regression, code: -1
Number of EM iterations :0
Error in EM => unable to calculate normalized profile
..Copy number profile normalization -> done
..Calculating breakpoints, breakPointThreshold = 0.8
..You have zero windows with reads. Will try to continue anyway..
..failed to run segmentation on chr1
..You have zero windows with reads. Will try to continue anyway..
..failed to run segmentation on chr2
..You have zero windows with reads. Will try to continue anyway..
..failed to run segmentation on chr3
..You have zero windows with reads. Will try to continue anyway..
..failed to run segmentation on chr4
..You have zero windows with reads. Will try to continue anyway..
..failed to run segmentation on chr5
..You have zero windows with reads. Will try to continue anyway..
..failed to run segmentation on chr6
..You have zero windows with reads. Will try to continue anyway..
..failed to run segmentation on chr7
..You have zero windows with reads. Will try to continue anyway..
..failed to run segmentation on chr8
..You have zero windows with reads. Will try to continue anyway..
..failed to run segmentation on chr9
..You have zero windows with reads. Will try to continue anyway..
..failed to run segmentation on chr10
..You have zero windows with reads. Will try to continue anyway..
..failed to run segmentation on chr11
..You have zero windows with reads. Will try to continue anyway..
..failed to run segmentation on chr12
..You have zero windows with reads. Will try to continue anyway..
..failed to run segmentation on chr13
..You have zero windows with reads. Will try to continue anyway..
..failed to run segmentation on chr14
..You have zero windows with reads. Will try to continue anyway..
..failed to run segmentation on chr15
..You have zero windows with reads. Will try to continue anyway..
..failed to run segmentation on chr16
..You have zero windows with reads. Will try to continue anyway..
..failed to run segmentation on chrM
..calculate median values
..calculating medians for copy numbers
..calculating medians for 1
Segmentation fault

What I have tried checking was the bam file depth in the control and the sample. That didn't seem to change anything. The sample that I am testing has a known CNV. The cpn output files are being generated, and being populated. Samtools is installed, and version is here:

samtools --version
samtools 1.17
Using htslib 1.17
Copyright (C) 2023 Genome Research Ltd.

The chromosome length file is formatted as shown:

1       chr1    230218
2       chr2    813184
3       chr3    316620
4       chr4    1531933
5       chr5    576874
6       chr6    270161
7       chr7    1090940
8       chr8    562643
9       chr9    439888
10      chr10   745751
11      chr11   666816
12      chr12   1078177
13      chr13   924431
14      chr14   784333
15      chr15   1091291
16      chr16   948066
17      chrM    85779
copy-number-variants FREEC • 508 views
ADD COMMENT
0
Entering edit mode

From the department of redundancy department: I don't think you need the error message, followed by a full command + error message.

Don't know what causes this part:

You have zero windows with reads.

But it is a safe bet that a segmentation fault is caused by no reads with which to work.

ADD REPLY
0
Entering edit mode

Ok, I can edit the post so that it only mentions the error once and think a little bit more as to why are there no reads.

ADD REPLY

Login before adding your answer.

Traffic: 2732 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6