Examples of Genotype


Examples of org.broad.igv.variant.Genotype

            genotypeMap.put(sample, vcfGenotype);
        }

        zygosityCount = new ZygosityCount();
        for (String sample : getSampleNames()) {
            Genotype genotype = getGenotype(sample);
            zygosityCount.incrementCount(genotype);
        }

        String afString = null;
        String[] alleleFreqKeys = {"AF", "GMAF"};
View Full Code Here

Examples of org.broad.igv.variant.Genotype

        double methTotal = 0;
        int samplesWithData = 0;
        final int size = getSampleNames().size();
        if (size > 0) {
            for (String sample : getSampleNames()) {
                Genotype genotype = getGenotype(sample);
                double mr = genotype.getAttributeAsDouble("MR");
                double goodBaseCount = genotype.getAttributeAsDouble("MR");
                if (!Double.isNaN(mr) && !Double.isNaN(goodBaseCount) && goodBaseCount > VariantTrack.METHYLATION_MIN_BASE_COUNT) {
                    methTotal += mr;
                    samplesWithData++;
                }
            }
View Full Code Here

Examples of org.jgap.Genotype

    final EcEvolver myFunc = new EcEvolver(source, destination, requiredActions);
    evolvers[threadIndex] = myFunc;

    final Configuration conf = constructConfiguration(threadIndex, myFunc);

    final Genotype population = Genotype.randomInitialGenotype(conf);

    //Please justify this code.
    //-Lomilar
//    if (!firstrun)
//    {
//      int totalevoSinceDiscoveryOnBest = 0;
//      int numBestThreads = 0;
//      synchronized (bestScores)
//      {
//        for (int i = 0; i < bestScores.length; i++)
//        {
//          if (bestScores[i] >= bestScore)
//          {
//            numBestThreads++;
//            totalevoSinceDiscoveryOnBest += evolutionsSinceDiscovery[i];
//          }
//        }
//      }
//
//      if (!(totalevoSinceDiscoveryOnBest > Math.max(stagnationLimit, STAGNATION_LIMIT_MIN) * numBestThreads)
//          && numBestThreads < Math.max(Math.ceil(NUM_THREADS / 3), 1))
//      {
//        loadOldBuildOrders(population, conf, myFunc);
//      }
//    }
//    else
      if (firstrun && threadIndex == 0)
    {
      loadOldBuildOrders(population, conf, myFunc);
    }
    else if (firstrun && threadIndex == NUM_THREADS - 1)
    {
      firstrun = false;
    }

    final Thread thread = new Thread(population);
    conf.getEventManager().addEventListener(GeneticEvent.GENOTYPE_EVOLVED_EVENT, new GeneticEventListener()
    {
      @Override
      public void geneticEventFired(GeneticEvent a_firedEvent)
      {
        Collections.shuffle(conf.getGeneticOperators());
        BASE_MUTATION_RATE += .001;
        if (BASE_MUTATION_RATE >= (double) CHROMOSOME_LENGTH / 2.0 )
          BASE_MUTATION_RATE = 1;
        IChromosome fittestChromosome = population.getFittestChromosome();
        if (killThreads)
        {
          threads.remove(thread);
          thread.interrupt();
        }
View Full Code Here
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.