/*
* 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.liu2005_histmods;
import data.cerevisiae.inhouse.jointable.JoinTable;
import fork.lib.base.file.FileName;
import fork.lib.base.file.management.Dirs;
import java.io.File;
import java.util.Arrays;
/**
*
* @author man-mqbpjmg4
*/
public class JoinTableL {
public static void main(String[] args) throws Exception { //debug
File dir= Dirs.getFile("dir");
File ref= new File(dir+"/anno/xu_2009_orfs.bed");
File d= new File(dir+"/other_datasets\\liu_2005_hist-mods\\data\\wig\\score");
JoinTable jj= new JoinTable();
jj.initRows(ref);
File[] fs= d.listFiles();
Arrays.sort(fs);
for( int i=0; i<fs.length; i++ ){
File f= fs[i];
if(f.isDirectory() && ! f.getName().equals("plot")){
String fn= FileName.getBaseName(f);
jj.addBedFile(new File(d+"/"+fn+"/"+fn+"_sacCer1-xu_gene_five_0.150.bed"));
jj.addBedFile(new File(d+"/"+fn+"/"+fn+"_sacCer1-xu_gene_three_150.0.bed"));
}
}
jj.writeToFile(new File(d+"/combine.txt"));
}
}