Examples of Gene


Examples of gem.Gene

          for (int i = 2; i <= cterms.length; i++)
          {
            cnstrLine[i] = Gene.getCall(cterms[i-1]) + " " + vterms[i-1];
          }

          list.add(new Gene(cnstrLine));
        }
      }

      callReader.close();
    }
View Full Code Here

Examples of net.sf.picard.annotation.Gene

                throw new RuntimeException("No exons detected for transcript " + transcriptId);
            }


            String geneName = firstFeature.getAttribute(ATTR_NAME_GENE_ID);
            Gene gene = geneMap.get(geneName);
            if (gene == null) {
                gene = new Gene(firstFeature.getSequenceName(), transcriptStart, transcriptEnd,
                    !firstFeature.isPositiveStrand(), geneName  );
                geneMap.put(geneName, gene);
            }

            Gene.Transcript t = gene.addTranscript(transcriptId, transcriptStart, transcriptEnd,
                    transcriptStart, transcriptEnd, numExons);

            for (int i = 0; i < numExons; ++i ) {
                t.addExon(exonStarts[i], exonEnds[i]);
            }
View Full Code Here

Examples of net.sf.picard.annotation.Gene


    }

    public void addCoverage(String geneId, int startPos, int endPos) {
        Gene gene = geneMap.get(geneId);
        for (Gene.Transcript t : gene) {
            int[] coverage = transcriptCoverage.get(t);
            if (coverage == null) {
                coverage = new int[t.length()];
                transcriptCoverage.put(t, coverage);
View Full Code Here

Examples of net.sf.picard.annotation.Gene

    void createHelperMaps() {
        intronIntervalTreeMap =  new IntervalTreeMap<Integer>();
        int numIntrons = 0;

        for (Map.Entry<String,Gene> entry : geneMap.entrySet()) {
            Gene gene = entry.getValue();
            for (final Gene.Transcript tx : gene) {
                int numExons = tx.exons.length;
                if (numExons < 2) {
                    continue;
                }
                int[] breakCoords = new int[(numExons - 1)*2];
                int k = 0;

                if ( gene.isPositiveStrand() ) {
                    for (int i = 0; i < numExons; ++ i) {
                        Gene.Transcript.Exon e = tx.exons[i];
                        if (i == 0) {
                            breakCoords[k++] = e.end;
                        } else if ( i == numExons - 1) {
                            breakCoords[k++] = e.start;
                        } else {
                            breakCoords[k++] = e.start;
                            breakCoords[k++] = e.end;
                        }
                    }
                } else {
                    // make sure there is no problem with sorting
                    Arrays.sort(tx.exons, new Comparator<Gene.Transcript.Exon>() {
                        @Override
                        public int compare(Gene.Transcript.Exon e1, Gene.Transcript.Exon e2) {
                            return e1.start > e2.start ? -1 : 1;
                        }
                    });

                    for (int i = numExons - 1; i >= 0; -- i) {
                        Gene.Transcript.Exon e = tx.exons[i];
                        if (i == 0) {
                            breakCoords[k++] = e.start;
                        } else if ( i == numExons - 1) {
                            breakCoords[k++] = e.end;
                        } else {
                            breakCoords[k++] = e.start;
                            breakCoords[k++] = e.end;
                        }
                    }
                }

                for (int i = 0; i < breakCoords.length; i+=2) {
                    String chrName = gene.getSequence();
                    Interval intronInterval = new Interval(chrName, breakCoords[i], breakCoords[i+1]);
                    numIntrons++;
                    intronIntervalTreeMap.put(intronInterval, numIntrons);
                    junctionLocationMap.put(chrName, breakCoords[i],breakCoords[i+1]);
                }
View Full Code Here

Examples of org.encog.ml.genetic.genes.Gene

    this.networkChromosome = new Chromosome();

    // create an array of "double genes"
    final int size = network.getStructure().calculateSize();
    for (int i = 0; i < size; i++) {
      final Gene gene = new DoubleGene();
      this.networkChromosome.getGenes().add(gene);
    }

    getChromosomes().add(this.networkChromosome);
View Full Code Here

Examples of org.encog.ml.genetic.genes.Gene

      final int temp = iswap1;
      iswap1 = iswap2;
      iswap2 = temp;
    }

    final Gene gene1 = chromosome.getGenes().get(iswap1);
    final Gene gene2 = chromosome.getGenes().get(iswap2);

    // remove the two genes
    chromosome.getGenes().remove(gene1);
    chromosome.getGenes().remove(gene2);
View Full Code Here

Examples of org.jgap.Gene

            continue;
          IChromosome chromosome = (IChromosome) ((ICloneable) arg0.getChromosome(i)).clone();
          Gene[] beforeArray = chromosome.getGenes();
          int randomPoint = (int) (Math.random() * beforeArray.length);
          int randomPoint2 = (int) (Math.random() * beforeArray.length);
          Gene swap = beforeArray[randomPoint];
          beforeArray[randomPoint] = beforeArray[randomPoint2];
          beforeArray[randomPoint2] = swap;
          try
          {
            chromosome.setGenes(beforeArray);
View Full Code Here

Examples of org.jgap.Gene

          IChromosome chromosome = (IChromosome) ((ICloneable) arg0.getChromosome(i)).clone();
          Gene[] beforeArray = chromosome.getGenes();
          int randomPoint = (int) (Math.random() * beforeArray.length);
          if (randomPoint < beforeArray.length - 1)
          {
            Gene swap = beforeArray[randomPoint];
            beforeArray[randomPoint] = beforeArray[randomPoint + 1];
            beforeArray[randomPoint + 1] = swap;
          }
          try
          {
View Full Code Here

Examples of org.jgap.Gene

        VecInstruction inst = null;

        for (int i = 0; i < program.size(); i++) {

            Gene g = program.get(i);

            if (g instanceof IntegerGene) {
                IntegerGene ig = (IntegerGene) g;
                inst = IntegerInstructionGene.getInstruction(ig.intValue(),
                        size);
View Full Code Here

Examples of org.jgap.Gene

    this.size=size;
  }
 
  public Gene getInstance(Configuration gaConf) throws InvalidConfigurationException{
   
    Gene ret = null;
                switch(type){
                    case INTEGER:
                        return new IntegerInstructionGene(gaConf,size);
                    case SYMBOL:
                        return new SymbolInstructionGene(gaConf,size);
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.