Beispiel #1
0
 private void makeFullMap(ArrayList QTL, double[][] map) {
   ArrayList chromosomes = new ArrayList();
   for (int i = 0; i < map.length; i++) {
     ArrayList chromosome = new ArrayList();
     for (int j = 0; j < map[i].length; j++) {
       chromosome.add(new Double(map[i][j]));
     }
     chromosomes.add(chromosome);
   }
   for (Iterator e = QTL.iterator(); e.hasNext(); ) {
     AbstractLoci al = (AbstractLoci) e.next();
     int chr = al.getChr()[0];
     double loc = al.getLocation()[0];
     ArrayList chromosome = (ArrayList) chromosomes.get(chr);
     for (int j = 0; j < chromosome.size(); j++) {
       double loc_map = ((Double) chromosome.get(j)).doubleValue();
       if (loc < loc_map) {
         chromosome.add(j, new Double(loc));
         al.setLoci(j);
         break;
       }
     }
   }
   distance = new double[chromosomes.size()][];
   for (int i = 0; i < chromosomes.size(); i++) {
     ArrayList chromosome = (ArrayList) chromosomes.get(i);
     distance[i] = new double[chromosome.size()];
     for (int j = 0; j < chromosome.size(); j++) {
       distance[i][j] = ((Double) chromosome.get(j)).doubleValue();
     }
   }
 }
Beispiel #2
0
 private void setup(ArrayList QTL, double[][] map, Parameter1 p) {
   int[][] pointIndex = new int[QTL.size()][3];
   pointPowerF = new Hashtable();
   pointPowerWald = new Hashtable();
   pointPowerLOD = new Hashtable();
   pointPowerAT = new Hashtable();
   pointPowerDT = new Hashtable();
   pointPowerAPvalue = new Hashtable();
   pointPowerDPvalue = new Hashtable();
   pointPowerEmpiricalAPvalue = new Hashtable();
   pointPowerEmpiricalDPvalue = new Hashtable();
   for (int i = 0; i < QTL.size(); i++) {
     AbstractLoci al = (AbstractLoci) QTL.get(i);
     pointIndex[i][0] = al.getChr()[0];
     double location = al.getLocation()[0];
     for (int j = 0; j < map[al.getChr()[0]].length - 1; j++) {
       if (location < map[al.getChr()[0]][j + 1]) {
         pointIndex[i][1] = j;
         pointIndex[i][2] =
             (new Double((location - map[al.getChr()[0]][j]) / p.step)).intValue() + 1;
         break;
       }
     }
     pointPowerF.put(Utils.makeKey(pointIndex[i]), new Integer(0));
     pointPowerWald.put(Utils.makeKey(pointIndex[i]), new Integer(0));
     pointPowerLOD.put(Utils.makeKey(pointIndex[i]), new Integer(0));
     pointPowerAT.put(Utils.makeKey(pointIndex[i]), new Integer(0));
     pointPowerDT.put(Utils.makeKey(pointIndex[i]), new Integer(0));
     pointPowerAPvalue.put(Utils.makeKey(pointIndex[i]), new Integer(0));
     pointPowerDPvalue.put(Utils.makeKey(pointIndex[i]), new Integer(0));
     pointPowerEmpiricalAPvalue.put(Utils.makeKey(pointIndex[i]), new Integer(0));
     pointPowerEmpiricalDPvalue.put(Utils.makeKey(pointIndex[i]), new Integer(0));
   }
 }