简体   繁体   English

降低假发分辨率

[英]Reduce Resolution of Wig

I have some very large WIG files from ChIP-seq binding profiles, but I wish to upload the wig files to some online genome browser. 我有一些来自ChIP-seq绑定配置文件的非常大的WIG文件,但我希望将假发文件上传到一些在线基因组浏览器。 Therefore I need to reduce the size of the wig file, by lowering resolution. 因此,我需要通过降低分辨率来减小假发文件的大小。

Say I don't need a 100 bp window, I can accept 1000 bp window to visualize the binding profile. 假设我不需要100 bp的窗口,我可以接受1000 bp的窗口以可视化绑定配置文件。 Not sure if there are some effective algorithms to do that? 不确定是否有一些有效的算法可以做到这一点?

I can implement using java or R. 我可以使用Java或R来实现。

Currently the most convenient way is to use SPP to lower the resolution of Wig while generating them from Bam. 当前,最方便的方法是使用SPP降低假发的分辨率,同时从Bam生成假发。

Following scripts might be useful. 以下脚本可能有用。

bamtowig("treat.bam","control.bam","name","OutDir",150, 50)
tag.dens<-get.smoothed.tag.density(chip.data, control.tags=input.data, bandwidth=bandwidth, step=step) 
writewig(tag.dens, fname=paste(nam, ".TagDens.bd",bandwidth,".st",step,".wig", sep=""),paste("Tag Density", bandwidth, step))

Another way is parsing the wig directly, as wig is text file, you can write a script that read the wig line by line and merge to the large windows should be an option. 另一种方法是直接解析假发,因为假发是文本文件,因此您可以编写一个脚本来逐行读取假发并合并到大窗口中。 For large windows, average value can be used. 对于大窗口,可以使用平均值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM