Has anyone seen this error with CNVnator and knows a work-around?
Calculating histograms with bin size of 100 for 'chr18' ...
Making GC histogram for 'chr18' ...
Sequence length (78077249) is different from expectation (78077248) for 'chr18'.
Hello,
I also encounter the same problem that sequence length is different from expectation by 1 when I run cnvnator. The command is
./cnvnator -root out.root -chrom 1 -his 100.
Here is the output:
Allocating memory ...
Done.
Calculating histograms with bin size of 100 for '1' ...
Making GC histogram for '1' ...
Sequence length (249250622) is different from expectation (249250621) for '1'.
Doing nothing!
Done.
I have tried several methods, like setting file format to unix, using several ways to split whole bam file by chromosome and then convert each bam to .fa file. But all methods failed.
It's been more than a year I don't know whether you have found a solution or not... but I had the same problem.
In my case, I generated my reference sequence (your hg19.fa) from a Windows computer and tried to perform CNVnator on a Linux computer. And CNVnator kept telling me reference length was +1 longer than expected. No matter how I changed the header in my SAM file.
To solve the problem, all I need to do is to convert the reference.fa file from CR+LF (DOS/Windows) to LF (Unix).
Go to gvim with reference.fa file open, enter ":set ff=unix". You should see your document change from "dos" into "unix" at the bottom of the gvim window. After I did this, CNVnator had no more error.
Hello, I also encounter the same problem that sequence length is different from expectation by 1 when I run cnvnator. The command is ./cnvnator -root out.root -chrom 1 -his 100.
Here is the output: Allocating memory ... Done. Calculating histograms with bin size of 100 for '1' ... Making GC histogram for '1' ... Sequence length (249250622) is different from expectation (249250621) for '1'. Doing nothing! Done.
I have tried several methods, like setting file format to unix, using several ways to split whole bam file by chromosome and then convert each bam to .fa file. But all methods failed.