/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package data.cerevisiae.histmod.xue2012;
import fork.lib.base.file.FileName;
import fork.lib.base.file.management.Dirs;
import fork.lib.bio.anno.genomic.BarReader;
import fork.lib.bio.anno.genomic.BedGraphExporter;
import fork.lib.bio.anno.genomic.LandscapeBuilder;
import java.io.File;
/**
*
* @author man-mqbpjmg4
*/
public class BarToWig {
public static void main(String[] args) throws Exception { //debug
File dir= Dirs.getFile("dir");
File d= new File(dir+"/other_datasets/xue_2012_h4k18_h3k16");
File[] fs= d.listFiles();
for( int i=0; i<fs.length; i++ ){
File f= fs[i];
if(FileName.getExt(f).equals("bar")){
LandscapeBuilder lb= new BarReader(f).getLandscapeBuilder();
File of= new File(d+"/"+FileName.getBaseName(f)+".wig");
new BedGraphExporter(lb).writeToFile(of);;
}
}
}
}