Package edu.msu.cme.rdp.classifier.train.validation.distance

# Class TaxaSimilarityMain

java.lang.Object
edu.msu.cme.rdp.classifier.train.validation.distance.TaxaSimilarityMain

public class TaxaSimilarityMain extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`static String[]`
`RANKS`

## Constructor Summary

Constructors
Constructor
Description
`TaxaSimilarityMain(List<String> selectedRanks)`

## Method Summary

Modifier and Type
Method
Description
`void`
`calPairwiseSimilaritye(String taxonFile, String trainSeqFile, String testSeqFile)`
`void`
`calSabSimilarity(String taxonFile, String trainSeqFile, String testSeqFile)`
`void`
`createPlot(String plotTitle, File outdir)`
`HashMap<String,HierarchyTree>`
`getAncestorNodes(HierarchyTree root, String seqName, List<String> ancestors)`
`static void`
`main(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 List<String>`
`readRanks(String rankFile)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### RANKS

public static String[] RANKS

## Constructor Details

### TaxaSimilarityMain

public TaxaSimilarityMain(List<String> selectedRanks)

## Method Details

### readRanks

public static List<String> readRanks(String rankFile) throws IOException

Throws:
  `IOException`

### getAncestorNodes

public HashMap<String,HierarchyTree> getAncestorNodes(HierarchyTree root, String seqName, List<String> ancestors)

### calSabSimilarity

public void calSabSimilarity(String taxonFile, String trainSeqFile, String testSeqFile) throws IOException

Throws:
  `IOException`

### calPairwiseSimilaritye

public void calPairwiseSimilaritye(String taxonFile, String trainSeqFile, String testSeqFile) throws IOException, edu.msu.cme.rdp.alignment.pairwise.rna.OverlapCheckFailedException

Throws:
  `IOException`
  `edu.msu.cme.rdp.alignment.pairwise.rna.OverlapCheckFailedException`

### createPlot

public void createPlot(String plotTitle, File outdir) throws IOException

Throws:
  `IOException`

### main

public static void main(String[] args) throws 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:
  `IOException`
  `edu.msu.cme.rdp.alignment.pairwise.rna.OverlapCheckFailedException`