Ejemplo n.º 1
0
        /// <summary>
        ///     Validate Hierarchical Clustering for stage2 using kimura distance matrix and hierarchical method name
        /// </summary>
        /// <param name="nodeName">xml node name</param>
        /// <param name="hierarchicalMethodName"></param>
        private void ValidateHierarchicalClusteringStage2(string nodeName,
                                                          UpdateDistanceMethodsTypes hierarchicalMethodName)
        {
            Initialize(Constants.MuscleDnaSequenceNode, Constants.ExpectedScoreNode);
            List<ISequence> stage1AlignedSequences = GetStage1AlignedSequence();
            IDistanceMatrix matrix = GetKimuraDistanceMatrix(stage1AlignedSequences);

            IHierarchicalClustering hierarcicalClustering = GetHierarchicalClustering(matrix,
                                                                                      hierarchicalMethodName);

            ValidateHierarchicalClustering(nodeName, hierarcicalClustering.Nodes,
                                           hierarcicalClustering.Edges);

            ApplicationLog.WriteLine(String.Format(null,
                                                   @"PamsamBvtTest:: herarchical clustering stage2 nodes and edges generation and 
          validation completed success with different 
          hierarchical clustering method name {0}",
                                                   hierarchicalMethodName.ToString()));
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Validate Hierarchical Clustering for stage2 using kimura distance matrix
        ///     and hierarchical method name
        /// </summary>
        /// <param name="nodeName">xml node name</param>
        /// <param name="moleculeType">molecule type of sequences</param>
        /// <param name="hierarchicalMethodName">hierarchical method name</param>
        private void ValidateHierarchicalClusteringStage2(string nodeName, MoleculeType moleculeType,
                                                          UpdateDistanceMethodsTypes hierarchicalMethodName)
        {
            switch (moleculeType)
            {
                case MoleculeType.DNA:
                    Initialize(Constants.MuscleDnaSequenceNode, Constants.ExpectedScoreNode);
                    break;
                case MoleculeType.Protein:
                    Initialize(Constants.MuscleProteinSequenceNode, Constants.ExpectedScoreNode);
                    break;
                case MoleculeType.RNA:
                    Initialize(Constants.MuscleRnaSequenceNode, Constants.ExpectedScoreNode);
                    break;
                default:
                    break;
            }

            List<ISequence> stage1AlignedSequences = GetStage1AlignedSequence(moleculeType);

            // Get kimura distance matrix
            IDistanceMatrix matrix = GetKimuraDistanceMatrix(stage1AlignedSequences);

            // Get hierarchical clustering using method name
            IHierarchicalClustering hierarcicalClustering = GetHierarchicalClustering(matrix,
                                                                                      hierarchicalMethodName);

            ValidateHierarchicalClustering(nodeName, hierarcicalClustering.Nodes,
                                           hierarcicalClustering.Edges);

            ApplicationLog.WriteLine(String.Format(null,
                                                   @"PamsamP1Test:: hierarchical clustering stage2 nodes and edges generation and 
                    validation completed success for {0} moleculetype with different 
                    hierarchical clustering method name {1}",
                                                   moleculeType.ToString(),
                                                   hierarchicalMethodName.ToString()));
        }
Ejemplo n.º 3
0
        /// <summary>
        ///     Validate Muscle multiple sequence alignment with different profiler and hierarchical clustering method name.
        /// </summary>
        /// <param name="nodeName">xml node name.</param>
        /// <param name="expectedScoreNode">Expected score node</param>
        /// <param name="hierarchicalClusteringMethodName">hierarchical clustering method name</param>
        /// <param name="profileName">SW/NW profiler</param>
        /// <param name="isWeightedProduct">True if it of the WeightedProduct type else false.</param>
        private void ValidatePamsamAlignWithUpdateDistanceMethodTypes(string nodeName,
                                                                      string expectedScoreNode,
                                                                      UpdateDistanceMethodsTypes
                                                                          hierarchicalClusteringMethodName,
                                                                      ProfileAlignerNames profileName,
                                                                      bool isWeightedProduct)
        {
            ValidatePamsamAlign(nodeName, expectedScoreNode, hierarchicalClusteringMethodName,
                                DistanceFunctionTypes.EuclideanDistance, profileName,
                                ProfileScoreFunctionNames.InnerProduct,
                                isWeightedProduct);

            ApplicationLog.WriteLine(String.Format(null,
                                                   @"PamsamBvtTest:: Pamsam alignment validation completed successfully with different hierarchical clustering method name {0}",
                                                   hierarchicalClusteringMethodName.ToString()));
        }
Ejemplo n.º 4
0
 /// <summary>
 ///     Validate Muscle multiple sequence alignment with different profiler and hierarchical clustering method name.
 /// </summary>
 /// <param name="nodeName">xml node name.</param>
 /// <param name="moleculeType">molecule type of sequences</param>
 /// <param name="expectedScoreNode">Expected score node</param>
 /// <param name="hierarchicalClusteringMethodName">hierarchical clustering method name</param>
 /// <param name="profileName">SW/NW profiler</param>
 private void ValidatePamsamAlignWithUpdateDistanceMethodTypes(string nodeName,
                                                               MoleculeType moleculeType,
                                                               string expectedScoreNode,
                                                               UpdateDistanceMethodsTypes
                                                                   hierarchicalClusteringMethodName,
                                                               ProfileAlignerNames profileName)
 {
     ValidatePamsamAlign(nodeName, moleculeType, expectedScoreNode,
                         hierarchicalClusteringMethodName, DistanceFunctionTypes.EuclideanDistance,
                         profileName, ProfileScoreFunctionNames.WeightedInnerProduct, kmerLength,
                         false, false);
     ApplicationLog.WriteLine(
         String.Format(null,
                       "PamsamP1Test:: Pamsam alignment validation completed successfully for {0} moleculetype with different hierarchical clustering method name {1}",
                       moleculeType.ToString(),
                       hierarchicalClusteringMethodName.ToString()));
 }