Package common.inspect

Source Code of common.inspect.ClassifierBuilderBedValue

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package common.inspect;

import fork.lib.base.file.io.txt.ReadTable;
import java.io.File;
import java.util.HashMap;

/**
*
* @author forksapien
*/
public class ClassifierBuilderBedValue {
   
   
protected File bed;
protected String tag;
protected int n;
protected ClassifierGeneValue cl;
   
   
   
    public ClassifierBuilderBedValue(File bed, String tag, int n) throws Exception{
        this.bed=bed;
        this.tag=tag;
        this.n=n;
        init();
    }
   
   
   
protected void init() throws Exception{
    HashMap<String,Double> idv= new HashMap<>();
    String[][] arr= new ReadTable(bed).getTableAsArray();
    for( int i=0; i<arr.length ; i++ ){
        String[] r= arr[i];
        idv.put(r[3], Double.parseDouble(r[4]));
    }
    cl= new ClassifierGeneValue(idv, tag, n);
}


public ClassifierGeneValue getClassifier(){
    return cl;
}

   
   
}
TOP

Related Classes of common.inspect.ClassifierBuilderBedValue

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.