Package gem.util

Examples of gem.util.Progress


   * @param trips
   */
  public static void assignGammaPval(Collection<Triplet> trips)
  {
    System.out.print("Assigining significance ...");
    Progress p = new Progress(trips.size());
    for (Triplet t : trips)
    {
      t.pvalGamma = calcGammaPval(t.cnt);
//      t.pvalGamma = calcModulationPval(t.cnt);

//      int[][][] c = CaseCounter.countComplete(t);
//      t.dcmi = MINDy.calcDMI(c);
//      t.pvalDcmi = MINDy.calcPval(c);

      p.tick();
    }
  }
View Full Code Here


    double pv_thr = 5.418500919305291E-4;

    List <Triplet> trips = new ArrayList<Triplet>();

    Progress p = new Progress(mods.size());

    for (String u1 : mods)
    {
      p.tick();

      Gene U1 = id2gene.get(u1);
      if (U1 == null) continue;

      for (String u2 : mods)
View Full Code Here

   */
  public static void count(Collection<Triplet> trips, double tailRatio)
  {
    System.out.print("Counting cases ... ");

    Progress p = new Progress(trips.size());
    Set<Gene> adjusted = new HashSet<Gene>();
    for (Triplet t : trips)
    {
      if (!adjusted.contains(t.M)) { t.M.rankAdjustStatus(tailRatio); adjusted.add(t.M);}
      if (!adjusted.contains(t.F)) { t.F.rankAdjustStatus(tailRatio); adjusted.add(t.F);}
      if (!adjusted.contains(t.T)) { t.T.rankAdjustStatus(tailRatio); adjusted.add(t.T);}

      count(t);
      p.tick();
    }
  }
View Full Code Here

  {
    System.out.print("Counting cases ... ");

    int tc = ArrayUtils.countTrue(ignore);

    Progress p = new Progress(trips.size());
    Set<Gene> adjusted = new HashSet<Gene>();
    for (Triplet t : trips)
    {
      if (!adjusted.contains(t.M)) { t.M.rankAdjustStatus(tailRatio, 1-tailRatio, ignore, tc); adjusted.add(t.M);}
      if (!adjusted.contains(t.F)) { t.F.rankAdjustStatus(tailRatio, 1-tailRatio, ignore, tc); adjusted.add(t.F);}
      if (!adjusted.contains(t.T)) { t.T.rankAdjustStatus(tailRatio, 1-tailRatio, ignore, tc); adjusted.add(t.T);}

      count(t);
      p.tick();
    }
  }
View Full Code Here

   */
  public static void writeGenes(Collection<Gene> set, String filename)
  {
    try
    {
      Progress p = new Progress(set.size());
      BufferedWriter writer = new BufferedWriter(new FileWriter(filename));

      for (Gene gene : set)
      {
        writer.write(gene + "\n");
        p.tick();
      }

      writer.close();
    }
    catch (IOException e)
View Full Code Here

        expChMap.put(gene, mch > 0 ? ACTIVATED : INACTIVATED);
      }
    }

    Progress p = new Progress(modMap.size());

    for (Mod mod : modMap.values())
    {
      p.tick();
      for (Triplet t : trips)
      {
        mod.count(t);
      }
    }
View Full Code Here

TOP

Related Classes of gem.util.Progress

Copyright © 2018 www.massapicom. 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.