Package edu.msu.cme.rdp.alignment.pairwise

Examples of edu.msu.cme.rdp.alignment.pairwise.PairwiseAlignment


                if ( lowestCommonRank == null){  // not the rank we care
                    continue;
                }

                // we need to use overlap_trim mode and calculate distance as metric to count insertions, deletions and mismatches.
                PairwiseAlignment result = PairwiseAligner.align(seq.getSeqString().replaceAll("U", "T"), trainSeq.getSeqString().replaceAll("U", "T"), scoringMatrix, mode);
                short sab = (short) (100 - 100*dist.getDistance(result.getAlignedSeqj().getBytes(), result.getAlignedSeqi().getBytes(), 0));
                sabCoutMap.get(lowestCommonRank)[sab]++;
                               
            }          
        }
        parser.close();
View Full Code Here


            for ( int j = i+1; j < seqList.size(); j++){
                LineageSequence seqy = seqList.get(j);
                HierarchyTree treey = nodeMap.get((String) seqy.getAncestors().get(seqy.getAncestors().size() - 1));
               
                Taxonomy lowestCommonAnc = findLowestCommonAncestor(treex, treey);              
                PairwiseAlignment result = PairwiseAligner.align(seqx.getSeqString().replaceAll("U", "T"), seqy.getSeqString().replaceAll("U", "T"), scoringMatrix, mode);
                double distance = dist.getDistance(result.getAlignedSeqj().getBytes(), result.getAlignedSeqi().getBytes(), 0);

                if ( show_alignment){
                    System.out.println(">\t" + seqx.getSeqName() + "\t" + seqy.getSeqName() + "\t" + String.format("%.3f", distance) + "\t" + lowestCommonAnc.getHierLevel());
                    System.out.println(result.getAlignedSeqi() + "\n");
                    System.out.println(result.getAlignedSeqj() + "\n");
                }
       
                ArrayList<Double> distList = distanceMap.get(lowestCommonAnc);
                if ( distList == null){
                    distList = new ArrayList<Double>();
View Full Code Here

TOP

Related Classes of edu.msu.cme.rdp.alignment.pairwise.PairwiseAlignment

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.