bedGraphToBigWig genome size does not fit
1
0
Entering edit mode
8.4 years ago

Hi I was trying to convert begGraph into bigwig file. but got error like:

"End coordinate 121843858 bigger than chr11 size of 121843856 line 3239399 of ..."

the bedgraph was from MACS peak calling.

~/_MACS_bedGraph/treat/~_treat_afterfiting_all.bedGraph

I got the genome size file by:

fetchChromSizes mm9 > mm9.chrom.sizes

then I ran the command:

bedGraphToBigWig *_treat_afterfiting_all.sorted.bedGraph ~/Ref_sequence/Mus_musculus/mm9.chrom.sizes *.bw

but I always got error like:

"End coordinate 121843858 bigger than chr11 size of 121843856 line 3239399 of ..."

initially, I thought that I just did not sort the bedGraph file, so I sorted the file:

sort -k1,1 -k2,2n *.bedGraph > *. sorted.bedGraph

then I rerun the command, but got the same error.

Anyone has any idea what might go wrong? Thanks!

alignment ChIP-Seq • 4.3k views
ADD COMMENT
1
Entering edit mode

Are you sure your BedGraph was mm9?

ADD REPLY
1
Entering edit mode
6.8 years ago
RouTaï ▴ 10

Error probably comes from read extension occuring during bedgraph building. This can bring read coordinates out of the chromosomes boundaries To prevent this situation you might want to limit signal coordinates to the chromosome ones:

bedtools slop -i ${File} -g ${chrom_info} -b 0 | bedClip stdin ${chrom_info} ${File}.clip

Then sort it again :

LC_COLLATE=C sort -k1,1 -k2,2n ${File}.clip &> ${File}.sort.clip

and redo the bedGraphToBigWig conversion

This might do what you want

ADD COMMENT

Login before adding your answer.

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