@Override
    protected Integer call() throws Exception {
        updateMessage("Overlapping...");
        Manager ma = Manager.getInstance();
        int ptype = Integer.parseInt(ma.getParam(Manager.Keyword.Process_Type));
        List<Pair> overlap;
        if(ptype == 0){
            if(ma.containResult(Manager.Result.Cor_Matrix)){
                StringMatrix corM = (StringMatrix)ma.getResult(Manager.Result.Cor_Matrix);
                Map<String, InteractMap> interMap = (Map<String, InteractMap>)ma.getResult(Manager.Result.Interaction_Map);
                //StringMatrix interaction = MatrixBuilder.readString(ma.getParam(Manager.Keyword.Input_interaction), false, false, false);
                //ma.putResult(Manager.Result.Interaction_Matrix, interaction);
                //List<Pair> p2 = PairUtils.fromStringMatrix(interaction, 0, 1);
                List<Pair> p1 = PairUtils.fromStringMatrix(corM, 0, 1);
                overlap = PairUtils.overlap(interMap, p1);
                //overlap = PairUtils.overlap(p1, p2);
            }else{
                return 4;
            }
        }else if(ptype == 1){
            DataMatrix geneM = (DataMatrix)ma.getResult(Manager.Result.Gene_Matrix);
            DataMatrix miRNAM = (DataMatrix)ma.getResult(Manager.Result.MiRNA_Matrix);
            Map<String, InteractMap> interMap = (Map<String, InteractMap>)ma.getResult(Manager.Result.Interaction_Map);
            overlap = PairUtils.overlap(interMap, geneM.getRownames(), miRNAM.getRownames());
        }else if(ptype == 2){
            DataMatrix geneM = (DataMatrix)ma.getResult(Manager.Result.Gene_Matrix);
            Map<String, InteractMap> interMap = (Map<String, InteractMap>)ma.getResult(Manager.Result.Interaction_Map);
            overlap = PairUtils.overlap(interMap, geneM.getRownames());
        }else if(ptype == 3){
            DataMatrix miRNAM = (DataMatrix)ma.getResult(Manager.Result.MiRNA_Matrix);
            if(ma.containParam(Manager.Keyword.Input_interaction) && !ma.getParam(Manager.Keyword.Input_interaction).isEmpty()){
                StringMatrix interaction = MatrixBuilder.readString(ma.getParam(Manager.Keyword.Input_interaction), false, false, false);
                ma.putResult(Manager.Result.Interaction_Matrix, interaction);
                List<Pair> p2 = PairUtils.fromStringMatrix(interaction, 0, 1);
                overlap = PairUtils.overlap(p2, miRNAM.getRownames());
            }else{
                return 1;
            }
        }else{
            return 2;
        }
        ma.putResult(Manager.Result.Overlap, overlap);
        ma.putResult(Manager.Result.Overlap_Num, overlap.size());
        return 0;
    }