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

All zero reads with segfault #135

Open
dgodin19 opened this issue Sep 6, 2023 · 1 comment
Open

All zero reads with segfault #135

dgodin19 opened this issue Sep 6, 2023 · 1 comment

Comments

@dgodin19
Copy link

dgodin19 commented Sep 6, 2023

Hi,

I am trying to run FREEC on a saccharomyces cerevisae genome clone and it's ancestor as a control.
I have made a custom chromosome length file, and am running FREEC on bam files. The error that I get is:

Error in linear regression, code: -1
Number of EM iterations :0
Error in EM => unable to calculate normalized profile

The full command line output is:

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:     .
..Sample file:  /net/dunham/vol1/home/dennig2/FREEC-11.6b/data/test_sludge/RBcaf_1purple3_S11/RBcaf_1purple3_S11_comb_R1R2.RG.MD.realign.sort.bam
..Sample input format:  bam
..will use this instance of samtools: 'samtools' to read BAM files
..Control file: /net/dunham/vol1/home/dennig2/FREEC-11.6b/data/test_sludge/anc/anc_comb_R1R2.RG.MD.realign.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 1
..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/dunham/vol1/home/dennig2/FREEC-11.6b/data/test_sludge/RBcaf_1purple3_S11/RBcaf_1purple3_S11_comb_R1R2.RG.MD.realign.sort.bam
..samtools should be installed to be able to read BAM files; will use the following command for samtools: samtools view -@ 1 /net/dunham/vol1/home/dennig2/FREEC-11.6b/data/test_sludge/RBcaf_1purple3_S11/RBcaf_1purple3_S11_comb_R1R2.RG.MD.realign.sort.bam
..finished reading /net/dunham/vol1/home/dennig2/FREEC-11.6b/data/test_sludge/RBcaf_1purple3_S11/RBcaf_1purple3_S11_comb_R1R2.RG.MD.realign.sort.bam
PROFILING [tid=140081489905472]: /net/dunham/vol1/home/dennig2/FREEC-11.6b/data/test_sludge/RBcaf_1purple3_S11/RBcaf_1purple3_S11_comb_R1R2.RG.MD.realign.sort.bam read in 6 seconds [fillMyHash]
4935931 lines read..
60 reads used to compute copy number profile
printing counts into ./RBcaf_1purple3_S11_comb_R1R2.RG.MD.realign.sort.bam_sample.cpn
..Window size:  150000
..File yeast_chr.len was read
..[genomecopynumber] Starting reading /net/dunham/vol1/home/dennig2/FREEC-11.6b/data/test_sludge/anc/anc_comb_R1R2.RG.MD.realign.sort.bam
..samtools should be installed to be able to read BAM files; will use the following command for samtools: samtools view -@ 1 /net/dunham/vol1/home/dennig2/FREEC-11.6b/data/test_sludge/anc/anc_comb_R1R2.RG.MD.realign.sort.bam
..finished reading /net/dunham/vol1/home/dennig2/FREEC-11.6b/data/test_sludge/anc/anc_comb_R1R2.RG.MD.realign.sort.bam
PROFILING [tid=140081489905472]: /net/dunham/vol1/home/dennig2/FREEC-11.6b/data/test_sludge/anc/anc_comb_R1R2.RG.MD.realign.sort.bam read in 15 seconds [fillMyHash]
11372934 lines read..
1880938 reads used to compute copy number profile
printing counts into ./anc_comb_R1R2.RG.MD.realign.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 1
Initial guess for polynomial:
Y = 3.1899e-05*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```

**The command used to run FREEC is:** 

```./freec -conf ./config_sludge.txt```

**I have checked both cpns, and they are populated.**

**The chromosome length file is:** 

```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```

**The config file is:** 

```[general]

chrLenFile = yeast_chr.len
ploidy = 1
window = 150000

#breakPointThreshold = -.002;
#coefficientOfVariation = 0.062
#chrFiles = hg18/hg18_per_chromosome
#outputDir = test
#degree=3

[sample]

mateFile = /net/dunham/vol1/home/dennig2/FREEC-11.6b/data/test_sludge/RBcaf_1purple3_S11/RBcaf_1purple3_S11_comb_R1R2.RG.MD.realign.sort.bam
inputFormat = bam
mateOrientation = 0

[control]

mateFile = /net/dunham/vol1/home/dennig2/FREEC-11.6b/data/test_sludge/anc/anc_comb_R1R2.RG.MD.realign.sort.bam
inputFormat = bam
mateOrientation = 0```

In the meanwhile, I will try to run FREEC on samples with known CNVs to adapt it for yeast use. Is it possible that FREEC is working as intended, and there were no CNVs found?
@dgodin19
Copy link
Author

dgodin19 commented Sep 8, 2023

I tried running it on files with known CNVs, and I got the same error. Is there a specific sort of BAM file that it has to be? Is there a specific read depth that is needed for FREEC?

Samtools is installed:

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

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

1 participant