/*
* 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.lenstra2011;
import fork.lib.base.file.io.txt.ReadTable;
import fork.lib.base.file.management.Dirs;
import java.io.File;
import data.cerevisiae.inhouse.jointable.JoinTable;
/**
*
* @author man-mqbpjmg4
*/
public class JoinTables extends JoinTable{
public static void main(String[] args) throws Exception{ //debug
File dir= Dirs.getFile("dir");
File nf= new File(dir+"/anno/sgd_name.bed");
File ref= new File(dir+"/anno/xu_2009_orfs.bed");
JoinTable jj= new JoinTable();
jj.initRows(ref);
jj.addNameBedFile(nf);
File wd= new File(dir+"/other_datasets\\lenstra_2011\\GSE25909_RAW\\idmap\\norm\\plot/");
File inf= new File(wd+"/combine_raw.txt");
ReadTable rt= new ReadTable(inf);
String[] cols= rt.getTableAsArray()[0];
for( int i=1; i<cols.length; i++ ){
jj.addHashMapIDToVal(rt.getHashMap(0, i), cols[i]);
}
File out= new File(wd+"/combine.txt");
jj.writeToFile(out);
}
}