CNVnator error :Can't determine length for 'chr1'. No reference genome specified.
1
0
Entering edit mode
6.9 years ago
chevivien ▴ 90

Hii,

I am getting this error when creating histograms using cnvnator

Allocating memory ... Can't determine length for 'chr1'. No reference genome specified. Done. Calculating histograms with bin size of 100 for 'chr1' ...

This is the command I am using

Command option 1: cnvnator -genome /home/vchebii/cnv/sample.fa -root sample.root -chrom chr1 -his 100 -d /home/vchebii/cnv/ Command option2: cnvnator -root sample.root -his 100 -d /home/vchebii/cnv/

Individual chromosome fasta files and reference genome is in the director /cnv but I still get the error.

I generated the root file without any problem.

How has experienced this before and how do you solve it?

cnvanator cnv no reference genome • 2.3k views
ADD COMMENT
0
Entering edit mode

How are the chromosomes named in your bam file? Are those the same? Or do you have chr1 in bam and '1' without 'chr' as fasta?

ADD REPLY
0
Entering edit mode

Bam files are named like this @SQ SN:chr1 LN:157403528 @SQ SN:chr2 LN:136510947 @SQ SN:chr3 LN:120038259

Chrom fasta files are named like this chr1.fa, chr2.fa, chr3,fa e.t.c.

Chrom fasta headers and reference genome looks like this:

chr1

ADD REPLY
0
Entering edit mode

But -genome /home/vchebii/cnv/sample.fa is not pointing to your genome.fa ?

ADD REPLY
0
Entering edit mode

The genome file ((sample.fa) is here /home/vchebii/cnv/sample.fa and the chrom files are here as well /home/vchebii/cnv/

Actually, I am running the cnvnator in the directory where all input files are.

ADD REPLY
0
Entering edit mode
6.8 years ago
rbagnall ★ 1.8k

CNVnator should be able to get the chromosome lengths from your sam header. Try without the -genome option. Also, where is the bam file?

From CNVnator:

"Chromosome names and lengths are parsed from sam/bam file header. Using -genome option one can overwrite this default behavior."

Step 1: Extract read mappings from bam file:

cnvnator -root output.root -chrom chr1 -tree your.bam (optional: -unique)

Step 2: Generate histogram:

cnvnator -root output.root -chrom chr1 -his 100 -d directory_containing_one_fasta_per_chromosome
ADD COMMENT
0
Entering edit mode

It's running well now. Thanks

ADD REPLY

Login before adding your answer.

Traffic: 2512 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