/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package data.cerevisiae.histmod.kirmizis2009;
import fork.lib.base.file.io.txt.ReadTable;
import fork.lib.base.format.collection.FormatOp1D;
import java.io.File;
import java.util.ArrayList;
/**
*
* @author forksapien
*/
public class SignalReader {
protected File f;
protected ArrayList<String> ids= new ArrayList<>();
protected ArrayList<Double> vs= new ArrayList<>();
public SignalReader(File f)throws Exception{
this.f=f;
init();
}
protected void init() throws Exception{
ReadTable rt= new ReadTable(f);
rt.param().setSkipSyntax("#");
rt.setSkipRows(0);
String[][] arr= rt.getTableAsArray();
ids= FormatOp1D.strToArrayList( rt.getColumn(0) );
vs= FormatOp1D.doubleToArrayDouble( FormatOp1D.objToDouble(rt.getColumn(1)) );
}
public ArrayList<String> getIDs(){
return ids;
}
public ArrayList<Double> getVs(){
return vs;
}
}