Package data.cerevisiae.histmod.kirmizis2009

Source Code of data.cerevisiae.histmod.kirmizis2009.SignalReader

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

Related Classes of data.cerevisiae.histmod.kirmizis2009.SignalReader

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.