Examples of NucleotideSequence


Examples of au.org.intersect.samifier.domain.NucleotideSequence

            // GFF (GenomeParserImpl) files use 1-based indices
            int startIndex = location.getStart() - 1;
            int stopIndex = location.getStop();

            if (!location.getSequenceType()) {
                parts.add(new NucleotideSequence(null, GeneSequence.INTRON, location.getStart(), location.getStop()));
                continue;
            }
            if (code.length() < startIndex || code.length() < stopIndex) {
                continue;
            }
            StringBuilder sequence = new StringBuilder(code.substring(startIndex, stopIndex));
            String sequenceString;
            if (gene.isForward()) {
                sequenceString = sequence.toString();
            } else {
                sequenceString = StringUtils.replaceChars(sequence.reverse().toString(), "ACGT", "TGCA");
            }
            parts.add(new NucleotideSequence(sequenceString, GeneSequence.CODING_SEQUENCE, location.getStart(), location.getStop()));
        }
        if (GenomeConstant.REVERSE_FLAG.equals(gene.getDirectionStr())) {
            Collections.reverse(parts);
        }
View Full Code Here

Examples of fork.lib.bio.seq.NucleotideSequence

   
    FastaSequenceExtractor se= new FastaSequenceExtractor(gen, gbout);
    SequenceExtractorEntry en;
    while( (en= se.nextEntry())!=null ){
        GenomicRegion gr= en.getGenomicRegion();
        NucleotideSequence seq= NucleotideSequenceParser.parseSequence(en.getSequence());
        double at= seq.atContent();
        bw.write( gr.toBedFormat()+"\t"+ ((double)Math.round(at*100)/100)+"\n" );
    }
   
    bw.close();
}
View Full Code Here

Examples of org.moltools.lib.seq.NucleotideSequence

      //For all libraries except spacers
      TagLibrary library = libraries[i];
      if (!(library instanceof SpacerLibrary)) {
        //Iterate through each tag...
        for (int tagno = 0; tagno < libraries[i].size(); tagno++) {
          NucleotideSequence t = libraries[i].getSequenceAt(tagno);
          //setStatus(t.getName());
          for (Iterator<CandidateAnalysisModule> m = modules.iterator(); m.hasNext(); ) {
            ProbeAnalysisModule mod = (ProbeAnalysisModule) m.next();
            if (!mod.acceptTag(t, probeset)) {
              //log.printLine(t.getName() + " not accepted by " + PlugInDescriptor.getBriefDescription(mod)); //$NON-NLS-1$
View Full Code Here

Examples of org.moltools.lib.seq.NucleotideSequence

        ProbeMakerPropertyUtils.clearMessages(five);
        //Set up the structure for the MPC, 5'
        float Tm;
        if (five.length() > 0) {
          if (t != null) {
            NucleotideSequence temp = p.getTarget().getTemplateCluster().getSequence(ProbeMakerTarget.KEY_FIVE_PRIME);
            if (temp != null) {
              int secstart = t.getFivePrimeFixedEnd() == TemplateHandler.THREEPRIME ? 1 :
                temp.length() - five.length() + 1;
              int secend = t.getFivePrimeFixedEnd() == TemplateHandler.THREEPRIME ? five.length() :
                temp.length();
              NAHybridStructure st = new DefaultNAHybridStructure(five, 1, five.length(),
                  temp,
                  secstart, secend);
              Tm = calculateTm(five, temp, st, defaultMpc, backupMpc);
              ProbeMakerPropertyUtils.setHybridizationTemp(five,Tm);
            }
          }
          else {
            Tm = calculateFullMatchTm(five, defaultMpc, backupMpc);
            ProbeMakerPropertyUtils.setHybridizationTemp(five,Tm);
          }
        }

      }

    }
    catch (ClusterException e) {
//      Do nothing
    }


    try {
      PropertyAcceptorNucleotideSequence three = (PropertyAcceptorNucleotideSequence) p.getSequence(TSSPair.KEY_THREE_PRIME);
      if (three != null) {
        ProbeMakerPropertyUtils.clearMessages(three);
        //Set up the structure for the MPC, 3'
        float Tm;
        if (three.length() > 0) {
          if (t != null) {
            NucleotideSequence temp = p.getTarget().getTemplateCluster().getSequence(ProbeMakerTarget.KEY_THREE_PRIME);
            if (temp != null) {
              int secstart = t.getThreePrimeFixedEnd() == TemplateHandler.THREEPRIME ? 1 :
                temp.length() - three.length() + 1;
              int secend = t.getThreePrimeFixedEnd() == TemplateHandler.THREEPRIME ? three.length() :
                temp.length();
              NAHybridStructure st = new DefaultNAHybridStructure(three, 1, three.length(),
                  temp, secstart,
                  secend);
              Tm = calculateTm(three, temp, st, defaultMpc, backupMpc);
              ProbeMakerPropertyUtils.setHybridizationTemp(three,Tm);
View Full Code Here

Examples of org.moltools.lib.seq.NucleotideSequence

    //Create a table
    if (db.isEmpty()) {
      resultsTable = new JTable();
    }
    else {
      NucleotideSequence seq = db.iterator().next();
      if (seq instanceof ProbeMakerTarget) {
        Collection<ProbeMakerTarget> targets = new ArrayList<ProbeMakerTarget>();
        for (NucleotideSequence s : db.getSequenceCollection()) {
          targets.add((ProbeMakerTarget) s);
        }
View Full Code Here

Examples of org.moltools.lib.seq.NucleotideSequence

    p1 = proj.getProbes().getSequenceAt(0);
    p2 = proj.getProbes().getSequenceAt(1);
    p3 = proj.getProbes().getSequenceAt(2);

    NucleotideSequence tag1 = libraries2_1_1[0].getSequenceAt(0);
   
    assertEquals(proj.getTagAllocationTable().getUserIDs(tag1).contains(p1.getID()),false);
    assertEquals(proj.getTagAllocationTable().getUserIDs(tag1).contains(p3.getID()),true);
   
    assertEquals(2, task.getCandidatesGenerated());
View Full Code Here

Examples of org.moltools.lib.seq.NucleotideSequence

    if (spacerPosition > -1 && spacerString.length() == 0 &&
        p.getTags().size() > 0) {
      //Spacer used and not first call
      //Shouldn't bother with this if the combination of the other tags is invalid
      if (tagSelector.isValidCombination(tagSelector.getTagIndices(), p)) {
        NucleotideSequence spacer = ( (SpacerLibrary) taglibraries[spacerPosition]).getNext();
        if (spacer != null) {
          p.removeTagAt(spacerPosition);
          p.addTagAt(spacer, spacerPosition);
          return true;
        }
View Full Code Here

Examples of org.moltools.lib.seq.NucleotideSequence

        if (p.getTags().size() > spacerPosition) {
          //We have to replace the tag with a copy, otherwise the next probe will adjust the same spacer
          //first remove the old spacer
          p.removeTagAt(spacerPosition);
          int spacerLength = Math.max(0, prefLength - p.length());
          NucleotideSequence spacer;
          if (spacerString.length() > 0) {
            String temp = ""; //$NON-NLS-1$
            //Add a new nucleotide until the correct length is achieved
            for (int i = 0; i < spacerLength; i++) {
              temp += spacerString.charAt(i % spacerString.length());
View Full Code Here

Examples of org.moltools.lib.seq.NucleotideSequence

  protected void reserve(Probe p) {
    //Target target = p.getTarget();
    p.setTagsAllocated(true);
    //Iterate through the tag positions
    for (int tagpos = 0; tagpos < p.getTags().size(); tagpos++) {
      NucleotideSequence tag = p.getTagAt(tagpos);
      //Set each tag to used
      tagAllocationTable.use(tag,p,tagpos);  
    }
  }
View Full Code Here

Examples of org.moltools.lib.seq.NucleotideSequence

  /**Clears this probe candidate by removing any messages and tags.*/
  protected void clear(Probe p) {
    ProbeMakerPropertyUtils.clearMessages(p);

    for (int i = 0; i < p.getTags().size(); i++) {
      NucleotideSequence t = p.getTagAt(i);
      //This target is no longer associated with this tag
      tagAllocationTable.unuse(t,p);
    }
    p.removeAllTags();
    p.setTagsAllocated(false);
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.