Entering edit mode
21 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?
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).
Is your chromosome name in the bedgraph, the same as the chrom.sizes file? I.e. is it also named '1' or 'chr1' ?