1 is not found in chromosome sizes file
1
0
Entering edit mode
20 months ago
Aki ▴ 20

I am trying to convert bedGraph to bigWig file with bedGraphToBigWig. but I always get "1 is not found in chromosome sizes file". I used the following script

macs2 callpeak -c SRRc_sorted.bam -t SRRe_sorted.bam -B --nomodel --extsize 200 --SPMR -q 0.01 -f BAM -g hs -n SRR
sort -k1,1 -k2,2n SRR_treat_pileup.bdg > SRR_treat_input.sorted.bdg
bedGraphToBigWig SRR_treat_pileup.bdg hg19.chrom.sizes  SRR_treat_pileup.bw

Do you have any solutions?

chip-seq bedGraphToBigWig • 1.8k views
ADD COMMENT
2
Entering edit mode

This happens when the genome reference you align your reads to and the chomosome sizes file come from different sources. In this case my suspecion is that you aligned to the Ensembl genome reference (which labels chromosomes 1,2,3 etc) but hg19.chrom.sizes comes from UCSU (which labels chromosomes chr1, chr2, chr3 etc).

ADD REPLY
0
Entering edit mode

Is your chromosome name in the bedgraph, the same as the chrom.sizes file? I.e. is it also named '1' or 'chr1' ?

ADD REPLY
2
Entering edit mode
20 months ago
ATpoint 85k

You can use samtools idxstats your.bam | cut -f1,2 to make the size file directly from your bam file, thereby ensuring that chr names match.

ADD COMMENT
0
Entering edit mode

Thank you ATpoint! great

ADD REPLY

Login before adding your answer.

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