Package data.cerevisiae.histmod.xue2012

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

/*
* 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.BedGraphReader;
import fork.lib.bio.anno.genomic.LandscapeBuilder;
import fork.lib.bio.anno.genomic.LandscapeTransformer;
import java.io.File;

/**
*
* @author man-mqbpjmg4
*/
public class Unlog {
   
   
   
   
   
   
   
   
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("wig") && !f.getName().contains("unlog")){
            LandscapeBuilder lb= new BedGraphReader(f).getLandscapeBuilder();

            LandscapeTransformer lt= new LandscapeTransformer(lb);
            lt.unlog();
           
            File of= new File(d+"/unlog_"+FileName.getBaseName(f)+".wig");
            new BedGraphExporter(lb).writeToFile(of);;
        }
    }
}
 
   
   
}
TOP

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

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.