Class TaxaSimilarityMain
- java.lang.Object
-
- edu.msu.cme.rdp.classifier.train.validation.distance.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 voidcalPairwiseSimilaritye(java.lang.String taxonFile, java.lang.String trainSeqFile, java.lang.String testSeqFile)voidcalSabSimilarity(java.lang.String taxonFile, java.lang.String trainSeqFile, java.lang.String testSeqFile)voidcreatePlot(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 voidmain(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)
-
-
-
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.IOExceptionedu.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.OverlapCheckFailedExceptionThis 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.IOExceptionedu.msu.cme.rdp.alignment.pairwise.rna.OverlapCheckFailedException
-
-