wigToBigWig報(bào)錯(cuò): item's end is longer than chromosome size

從NCBI下載到由macs2生成的wig文件(wig file from macs),正在開(kāi)心可以不用自己分析數(shù)據(jù)直接借用的時(shí)候,發(fā)現(xiàn)wig文件轉(zhuǎn)bigwig時(shí)候(wigToBigWig),報(bào)錯(cuò):item's end is longer than chromosome size。

/software/wigToBigWig  col.wig  arabidopsis.genome  col.bigwig 
#Line 3825834 of col.wig: chromosome 5 has 26975502 bases, but item ends at 26975550

答案1:
在網(wǎng)上找到有人在biostars上已經(jīng)問(wèn)了這個(gè)問(wèn)題而且已經(jīng)有答案了Question: Wig file obtained from MACS14 is longer than chromosome size?
macs2會(huì)把reads延伸300bp,導(dǎo)致有的片段會(huì)超出基因組范圍,macs2生成的bedgraph文件也有相同問(wèn)題。解決方法就是用UCSC的bedclip工具(點(diǎn)擊到UCSC工具下載頁(yè)面),先把超出的基因組的片段扔掉,或者把超出的部分去掉(parameter:-truncate)。但是下載后發(fā)現(xiàn)bedclip的輸入對(duì)象是bed文件,要應(yīng)用于我的wig文件,還要麻煩的轉(zhuǎn)格式。
使用說(shuō)明如下:

bedClip - Remove lines from bed file that refer to off-chromosome locations.
usage:
   bedClip [options] input.bed chrom.sizes output.bed
chrom.sizes is a two-column file/URL: <chromosome name> <size in bases>

答案2:
小白還是想偷個(gè)懶看看有沒(méi)有人寫好了腳本。
在簡(jiǎn)書上也有作者用bedclip解決相似問(wèn)題,還寫好了可以直接使用的腳本。但是輸入文件是macs2的bedgraph文件。MACS2學(xué)習(xí)筆記

答案3:
繼續(xù)找答案,在biostars上看到了另一個(gè)問(wèn)題和回答。Question: item's end higher than chrom size, wigToBigWig。其實(shí)wigToBigWig有一個(gè)參數(shù)-clip,可以直接把有超出基因組部分的片段扔掉,而不報(bào)錯(cuò)。
使用說(shuō)明如下:

options:
   -blockSize=N - Number of items to bundle in r-tree.  Default 256
   -itemsPerSlot=N - Number of data points bundled at lowest level. Default 1024
   -clip - If set just issue warning messages rather than dying if wig
                  file contains items off end of chromosome or chromosomes
                  that are not in the chrom.sizes file.

這個(gè)方法簡(jiǎn)單方便,可以直接輸入wig文件,但是缺點(diǎn)就是不能像bedClip一樣,只去超出的那部分,而是把有超出基因組部分的整個(gè)片段丟掉。
成功拿到想要的bigwig文件啦ヾ(≧▽≦*)o

/software/wigToBigWig  -clip  col.wig  arabidopsis.genome  col.bigwig 

寫在后面:
如果有人寫出了用bedClip解決wig轉(zhuǎn)bigwig片段超出基因組的腳本,記得提醒小白,一起學(xué)習(xí),謝謝!!☆⌒(*^-゜)v

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容