Package jmotifx.sequenceobjects

Examples of jmotifx.sequenceobjects.AroundSiteFPeptideObject


        System.out.println(" Creating sequences' around-site-formatted-peptide objects....");
        String centerResidue = configMap.get("centerResidue");
        ArrayList<AroundSiteFPeptideObject> asfpobjs = new ArrayList<AroundSiteFPeptideObject>(); //Around site fpeptide objects - asfpo
        for(String peptideSequence : peptideSequences){
            peptideSequence = peptideSequence.replaceAll("[^A-Z]", "");
            AroundSiteFPeptideObject asfpobj = new AroundSiteFPeptideObject(peptideSequence,centerResidue);
            asfpobjs.add(asfpobj);          
        }
        return asfpobjs;
    }
View Full Code Here


                      if( i == 0 ){ isCenter = true; }
                      int pos = i; // relative position to center...
                      aArr[j] = new AminoAcid(symb, isCenter, pos);
                     
                   }
                   bGFPep.add(new AroundSiteFPeptideObject(aArr));
               }
            }
        }      
        return bGFPep;
    }
View Full Code Here

                      int pos = i;
                      aArr[j] = new AminoAcid(symb,isGlyc,pos);;
                     
                   }
                   //bGFPep.add(new AroundSiteFPeptideObject(aArr));
                   AroundSiteFPeptideObject fgbo = new AroundSiteFPeptideObject(aArr);
                   String str = fgbo.getSequence();
                   if(foundSeqs.contains(str)==false){
                        foundSeqs.add(str);
                        bGFPep.add(fgbo);
                   }
               }
View Full Code Here

                    int pos = j;
                    aArr[k] = new AminoAcid(symb,isGlyc,pos);
                }
             
            }
            rPep.add(new AroundSiteFPeptideObject(aArr));
        }      
        return rPep;
    }
View Full Code Here

        ArrayList<AroundSiteFPeptideObject> idGlyc_tmp = new ArrayList<AroundSiteFPeptideObject>();
        ArrayList<AroundSiteFPeptideObject> bGGlyc_tmp = new ArrayList<AroundSiteFPeptideObject>();
       
        Iterator<AroundSiteFPeptideObject> itr1 = glycObjs_nr.iterator();
        while(itr1.hasNext()){
            AroundSiteFPeptideObject glycObj = itr1.next();
            if(mSigRP.inFGlycObjAaSeqArray(mSigRP.getResidueSymbol(), mSigRP.getResiduePosition(), glycObj)){
               idGlyc_tmp.add(glycObj);
            }
        }
       
        Iterator<AroundSiteFPeptideObject> itr2 = bGGlycObj.iterator();
        while(itr2.hasNext()){
            AroundSiteFPeptideObject bglycObj = itr2.next();
            if(mSigRP.inFGlycObjAaSeqArray(mSigRP.getResidueSymbol(), mSigRP.getResiduePosition(), bglycObj)){
               bGGlyc_tmp.add(bglycObj);
            }
        }
       
View Full Code Here

        ArrayList<AroundSiteFPeptideObject> idGlyc_tmp = new ArrayList<AroundSiteFPeptideObject>();
        ArrayList<AroundSiteFPeptideObject> bGGlyc_tmp = new ArrayList<AroundSiteFPeptideObject>();
       
        Iterator<AroundSiteFPeptideObject> itr1 = glycObjs_nr.iterator();
        while(itr1.hasNext()){
            AroundSiteFPeptideObject glycObj = itr1.next();
            //String motif_seq = motif.motif_seq;
            String glycOb_seq = glycObj.getSequence();
            if(!motif.matches(glycOb_seq)){
               idGlyc_tmp.add(glycObj);
            }
        }
       
        Iterator<AroundSiteFPeptideObject> itr2 = bGGlycObj.iterator();
        while(itr2.hasNext()){
            AroundSiteFPeptideObject bglycObj = itr2.next();
            String bglycOb_seq = bglycObj.getSequence();
            if(!motif.matches(bglycOb_seq)){
               bGGlyc_tmp.add(bglycObj);
            }
        }
       
View Full Code Here

        String loopDir = getIterationResultDirectory(outDir, loop, itr_count);
        try {
            PrintWriter writer = new PrintWriter(loopDir + File.separator + type + ".seqs");
            Iterator<AroundSiteFPeptideObject> itr = fglycObjs.iterator();
            while(itr.hasNext()){
                AroundSiteFPeptideObject fglycObj = itr.next();
                writer.println(fglycObj.getSequence());
               
            }
            writer.close();
        } catch (FileNotFoundException ex) {
            Logger.getLogger(MotifX.class.getName()).log(Level.SEVERE, null, ex);
View Full Code Here

   
    private void estimateResidueFrequencies(ArrayList<AroundSiteFPeptideObject> fGPObjs) {
        //throw new UnsupportedOperationException("Not yet implemented");
        Iterator<AroundSiteFPeptideObject> itr = fGPObjs.iterator();
        while(itr.hasNext()){
            AroundSiteFPeptideObject fGPObj = itr.next();
            AminoAcid[] aArr = fGPObj.getSeqArray();
            for(int i = 0; i < aArr.length; i++){
                int pos_index = getPositionIndex(aArr[i].getPosition());
                int aASymb_index = getAaSymbolIndex(aArr[i].getSymbol());
                matrix[aASymb_index][pos_index]++;
            }
View Full Code Here

    public int getOccurrence(ArrayList<AroundSiteFPeptideObject> fGlycObjs){
        int occurrence = 0;
        //implement
        Iterator<AroundSiteFPeptideObject> itr = fGlycObjs.iterator();
        while(itr.hasNext()){
            AroundSiteFPeptideObject fGlycObj = itr.next();
            if(inFGlycObjAaSeqArray(residue_symb,relative_position,fGlycObj)){
                occurrence++;
            }
        }
       
View Full Code Here

    //get GlycPepObj that match motif
    public ArrayList<AroundSiteFPeptideObject> getMatches(ArrayList<AroundSiteFPeptideObject> fGlycObjs){
        ArrayList<AroundSiteFPeptideObject> matches = new ArrayList<AroundSiteFPeptideObject>();
        Iterator<AroundSiteFPeptideObject> itr = fGlycObjs.iterator();
        while(itr.hasNext()){
            AroundSiteFPeptideObject fGlycObj = itr.next();
            if(this.matches(fGlycObj.getSequence())){
                matches.add(fGlycObj);
            }
        }       
        return matches;
    }
View Full Code Here

TOP

Related Classes of jmotifx.sequenceobjects.AroundSiteFPeptideObject

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.