Class TaxaSimilarityMain


  • public class TaxaSimilarityMain
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String[] RANKS  
    • Constructor Summary

      Constructors 
      Constructor Description
      TaxaSimilarityMain​(java.util.List<java.lang.String> selectedRanks)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void calPairwiseSimilaritye​(java.lang.String taxonFile, java.lang.String trainSeqFile, java.lang.String testSeqFile)  
      void calSabSimilarity​(java.lang.String taxonFile, java.lang.String trainSeqFile, java.lang.String testSeqFile)  
      void createPlot​(java.lang.String plotTitle, java.io.File outdir)  
      java.util.HashMap<java.lang.String,​HierarchyTree> getAncestorNodes​(HierarchyTree root, java.lang.String seqName, java.util.List<java.lang.String> ancestors)  
      static void main​(java.lang.String[] args)
      This calculates the average similarity (Sab score or pairwise alignment) between taxa at given ranks and plot the box and whisker plot and accumulation curve.
      static java.util.List<java.lang.String> readRanks​(java.lang.String rankFile)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • RANKS

        public static java.lang.String[] RANKS
    • Constructor Detail

      • TaxaSimilarityMain

        public TaxaSimilarityMain​(java.util.List<java.lang.String> selectedRanks)
    • Method Detail

      • readRanks

        public static java.util.List<java.lang.String> readRanks​(java.lang.String rankFile)
                                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • getAncestorNodes

        public java.util.HashMap<java.lang.String,​HierarchyTree> getAncestorNodes​(HierarchyTree root,
                                                                                        java.lang.String seqName,
                                                                                        java.util.List<java.lang.String> ancestors)
      • calSabSimilarity

        public void calSabSimilarity​(java.lang.String taxonFile,
                                     java.lang.String trainSeqFile,
                                     java.lang.String testSeqFile)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • calPairwiseSimilaritye

        public void calPairwiseSimilaritye​(java.lang.String taxonFile,
                                           java.lang.String trainSeqFile,
                                           java.lang.String testSeqFile)
                                    throws java.io.IOException,
                                           edu.msu.cme.rdp.alignment.pairwise.rna.OverlapCheckFailedException
        Throws:
        java.io.IOException
        edu.msu.cme.rdp.alignment.pairwise.rna.OverlapCheckFailedException
      • createPlot

        public void createPlot​(java.lang.String plotTitle,
                               java.io.File outdir)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • main

        public static void main​(java.lang.String[] args)
                         throws java.io.IOException,
                                edu.msu.cme.rdp.alignment.pairwise.rna.OverlapCheckFailedException
        This calculates the average similarity (Sab score or pairwise alignment) between taxa at given ranks and plot the box and whisker plot and accumulation curve. The distances associate to a given rank contains the distances between different child taxa. It does not include the distances within the same child taxa. For example, if a query and it's closest match are from the same genus, the distance value is added to that genus. If there are from different genera but the same family, the distance value is added to that family, etc.
        Parameters:
        args -
        Throws:
        java.io.IOException
        edu.msu.cme.rdp.alignment.pairwise.rna.OverlapCheckFailedException