Package data.cerevisiae.histmod.xue2012

Source Code of data.cerevisiae.histmod.xue2012.BarToWig

/*
* 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);;
        }
    }
}
   
}
TOP

Related Classes of data.cerevisiae.histmod.xue2012.BarToWig

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.