/// <summary> /// Initializes a new instance of the MUMmerAttributes class. /// </summary> public MUMmerAttributes() { AlignmentInfo alignmentAttribute = new AlignmentInfo( Properties.Resource.LENGTH_OF_MUM_NAME, Properties.Resource.LENGTH_OF_MUM_DESCRIPTION, true, "20", AlignmentInfo.IntType, null); Attributes.Add(LengthOfMUM, alignmentAttribute); }
/// <summary> /// Initializes a new instance of the NUCmerAttributes class. /// </summary> public NUCmerAttributes() { AlignmentInfo alignmentAttribute; alignmentAttribute = new AlignmentInfo( Properties.Resource.FIXED_SEPARATION_NAME, Properties.Resource.FIXED_SEPARATION_DESCRIPTION, true, ClusterBuilder.DefaultFixedSeparation.ToString(CultureInfo.InvariantCulture), AlignmentInfo.IntType, null); Attributes.Add(FixedSeparation, alignmentAttribute); alignmentAttribute = new AlignmentInfo( Properties.Resource.MAXIMUM_SEPARATION_NAME, Properties.Resource.MAXIMUM_SEPARATION_DESCRIPTION, true, ClusterBuilder.DefaultMaximumSeparation.ToString(CultureInfo.InvariantCulture), AlignmentInfo.IntType, null); Attributes.Add(MaximumSeparation, alignmentAttribute); alignmentAttribute = new AlignmentInfo( Properties.Resource.MINIMUM_SCORE_NAME, Properties.Resource.MINIMUM_SCORE_DESCRIPTION, true, ClusterBuilder.DefaultMinimumScore.ToString(CultureInfo.InvariantCulture), AlignmentInfo.IntType, null); Attributes.Add(MinimumScore, alignmentAttribute); alignmentAttribute = new AlignmentInfo( Properties.Resource.SEPARATION_FACTOR_NAME, Properties.Resource.SEPARATION_FACTOR_DESCRIPTION, true, ClusterBuilder.DefaultSeparationFactor.ToString(CultureInfo.InvariantCulture), AlignmentInfo.FloatType, null); Attributes.Add(SeparationFactor, alignmentAttribute); alignmentAttribute = new AlignmentInfo( Properties.Resource.BREAK_LENGTH_NAME, Properties.Resource.BREAK_LENGTH_DESCRIPTION, true, ModifiedSmithWaterman.DefaultBreakLength.ToString(CultureInfo.InvariantCulture), AlignmentInfo.IntType, null); Attributes.Add(BreakLength, alignmentAttribute); }
/// <summary> /// Initializes a new instance of the NUCmerAttributes class. /// </summary> public NUCmerAttributes() { AlignmentInfo alignmentAttribute; alignmentAttribute = new AlignmentInfo( Properties.Resource.FIXED_SEPARATION_NAME, Properties.Resource.FIXED_SEPARATION_DESCRIPTION, true, ClusterBuilder.DefaultFixedSeparation.ToString(CultureInfo.InvariantCulture), AlignmentInfo.IntType, null); Attributes.Add(FixedSeparation, alignmentAttribute); alignmentAttribute = new AlignmentInfo( Properties.Resource.MAXIMUM_SEPARATION_NAME, Properties.Resource.MAXIMUM_SEPARATION_DESCRIPTION, true, ClusterBuilder.DefaultMaximumSeparation.ToString(CultureInfo.InvariantCulture), AlignmentInfo.IntType, null); Attributes.Add(MaximumSeparation, alignmentAttribute); alignmentAttribute = new AlignmentInfo( Properties.Resource.MINIMUM_SCORE_NAME, Properties.Resource.MINIMUM_SCORE_DESCRIPTION, true, ClusterBuilder.DefaultMinimumScore.ToString(CultureInfo.InvariantCulture), AlignmentInfo.IntType, null); Attributes.Add(MinimumScore, alignmentAttribute); alignmentAttribute = new AlignmentInfo( Properties.Resource.SEPARATION_FACTOR_NAME, Properties.Resource.SEPARATION_FACTOR_DESCRIPTION, true, ClusterBuilder.DefaultSeparationFactor.ToString(CultureInfo.InvariantCulture), AlignmentInfo.FloatType, null); Attributes.Add(SeparationFactor, alignmentAttribute); alignmentAttribute = new AlignmentInfo( Properties.Resource.BREAK_LENGTH_NAME, Properties.Resource.BREAK_LENGTH_DESCRIPTION, true, ModifiedSmithWaterman.DefaultBreakLength.ToString(CultureInfo.InvariantCulture), AlignmentInfo.IntType, null); Attributes.Add(BreakLength, alignmentAttribute); }
/// <summary> /// Initializes a new instance of the PairwiseAlignmentAttributes class. /// </summary> public PairwiseAlignmentAttributes() { attributes = new Dictionary <string, AlignmentInfo>(); StringListValidator similarityMatrixList = new StringListValidator( Properties.Resource.SimilarityMatrix_AutoDetectString, // Autodetect Properties.Resource.SimilarityMatrix_DiagonalSM, SM.StandardSimilarityMatrix.AmbiguousDna.ToString(), SM.StandardSimilarityMatrix.AmbiguousRna.ToString(), SM.StandardSimilarityMatrix.Blosum45.ToString(), SM.StandardSimilarityMatrix.Blosum50.ToString(), SM.StandardSimilarityMatrix.Blosum62.ToString(), SM.StandardSimilarityMatrix.Blosum80.ToString(), SM.StandardSimilarityMatrix.Blosum90.ToString(), SM.StandardSimilarityMatrix.DiagonalScoreMatrix.ToString(), SM.StandardSimilarityMatrix.Pam250.ToString(), SM.StandardSimilarityMatrix.Pam30.ToString(), SM.StandardSimilarityMatrix.Pam70.ToString()); AlignmentInfo alignmentAttribute = new AlignmentInfo( Properties.Resource.SIMILARITY_MATRIX_NAME, Properties.Resource.SIMILARITY_MATRIX_DESCRIPTION, true, Properties.Resource.SimilarityMatrix_AutoDetectString, AlignmentInfo.StringListType, similarityMatrixList); attributes.Add(SimilarityMatrix, alignmentAttribute); alignmentAttribute = new AlignmentInfo( Properties.Resource.GAP_COST_NAME, Properties.Resource.GAP_COST_DESCRIPTION, true, "-8", AlignmentInfo.IntType, null); attributes.Add(GapOpenCost, alignmentAttribute); alignmentAttribute = new AlignmentInfo( Properties.Resource.GAP_EXTENSION_COST_NAME, Properties.Resource.GAP_EXTENSION_COST_DESCRIPTION, true, "-8", AlignmentInfo.IntType, null); attributes.Add(GapExtensionCost, alignmentAttribute); }
/// <summary> /// Initializes a new instance of the PairwiseAlignmentAttributes class. /// </summary> public PairwiseAlignmentAttributes() { attributes = new Dictionary<string, AlignmentInfo>(); StringListValidator similarityMatrixList = new StringListValidator( Properties.Resource.SimilarityMatrix_DiagonalSM, SM.StandardSimilarityMatrix.AmbiguousDna.ToString(), SM.StandardSimilarityMatrix.AmbiguousRna.ToString(), SM.StandardSimilarityMatrix.Blosum45.ToString(), SM.StandardSimilarityMatrix.Blosum50.ToString(), SM.StandardSimilarityMatrix.Blosum62.ToString(), SM.StandardSimilarityMatrix.Blosum80.ToString(), SM.StandardSimilarityMatrix.Blosum90.ToString(), SM.StandardSimilarityMatrix.DiagonalScoreMatrix.ToString(), SM.StandardSimilarityMatrix.Pam250.ToString(), SM.StandardSimilarityMatrix.Pam30.ToString(), SM.StandardSimilarityMatrix.Pam70.ToString()); AlignmentInfo alignmentAttribute = new AlignmentInfo( Properties.Resource.SIMILARITY_MATRIX_NAME, Properties.Resource.SIMILARITY_MATRIX_DESCRIPTION, true, SM.StandardSimilarityMatrix.AmbiguousDna.ToString(), AlignmentInfo.StringListType, similarityMatrixList); attributes.Add(SimilarityMatrix, alignmentAttribute); alignmentAttribute = new AlignmentInfo( Properties.Resource.GAP_COST_NAME, Properties.Resource.GAP_COST_DESCRIPTION, true, "-10", AlignmentInfo.IntType, null); attributes.Add(GapOpenCost, alignmentAttribute); alignmentAttribute = new AlignmentInfo( Properties.Resource.GAP_EXTENSION_COST_NAME, Properties.Resource.GAP_EXTENSION_COST_DESCRIPTION, true, "-8", AlignmentInfo.IntType, null); attributes.Add(GapExtensionCost, alignmentAttribute); }
/// <summary> /// This method would create text field. /// </summary> /// <param name="alignmentAttribute">Alignment parameter</param> /// <param name="parentPanel">Stack panel, the field will be added to this stackpanel</param> /// <param name="tag">Tag of the control object</param> private void CreateTextField( AlignmentInfo alignmentAttribute, StackPanel parentPanel, string tag) { TextBlock block = new TextBlock { Margin = new Thickness(0, 10, 0, 0), TextWrapping = TextWrapping.Wrap, Text = alignmentAttribute.Name, Height = 20 }; TextBox box = new TextBox { HorizontalAlignment = HorizontalAlignment.Left, Margin = new Thickness(0, 0, 0, 0), TextWrapping = TextWrapping.Wrap, Text = alignmentAttribute.DefaultValue, Tag = tag, Width = 120, Height = 20, ToolTip = alignmentAttribute.Description }; parentPanel.Children.Add(block); parentPanel.Children.Add(box); }
/// <summary> /// This method would create combo field. /// </summary> /// <param name="alignmentAttribute">Alignment parameter</param> /// <param name="parentPanel">Stack panel, the field will be added to this stackpanel</param> /// <param name="tag">Tag of the control object</param> private void CreateComboField( AlignmentInfo alignmentAttribute, StackPanel parentPanel, string tag) { TextBlock block = new TextBlock { Margin = new Thickness(0, 10, 0, 0), TextWrapping = TextWrapping.Wrap, Text = alignmentAttribute.Name, Height = 20 }; ComboBox combo = new ComboBox { HorizontalAlignment = HorizontalAlignment.Left, IsSynchronizedWithCurrentItem = true, Margin = new Thickness(0, 0, 0, 0), Tag = tag, Width = 180, Height = 22, ToolTip = alignmentAttribute.Description }; StringListValidator validator = alignmentAttribute.Validator as StringListValidator; combo.ItemsSource = validator.ValidValues; combo.SelectedIndex = validator.ValidValues.ToList().IndexOf(alignmentAttribute.DefaultValue); if (alignmentAttribute.Name == "Similarity Matrix") { combo.SelectedIndex = validator.ValidValues.ToList().IndexOf(GetDefaultSM(this.sequenceAlphabet)); } parentPanel.Children.Add(block); parentPanel.Children.Add(combo); }
/// <summary> /// Initializes a new instance of the PairwiseAlignmentAttributes class. /// </summary> public PamsamAlignmentAttributes() { AlignmentInfo alignmentAttribute; attributes = new Dictionary<string, AlignmentInfo>(); alignmentAttribute = new AlignmentInfo( KmerLength, "Kmer Length", true, "3", AlignmentInfo.IntType, null); attributes.Add(KmerLength, alignmentAttribute); StringListValidator listValidator = new StringListValidator( Enum.GetNames(typeof(DistanceFunctionTypes)) ); alignmentAttribute = new AlignmentInfo( DistanceFunctionType, "Distance Function Type", true, DistanceFunctionTypes.EuclideanDistance.ToString(), AlignmentInfo.StringListType, listValidator); attributes.Add(DistanceFunctionType, alignmentAttribute); listValidator = new StringListValidator( Enum.GetNames(typeof(UpdateDistanceMethodsTypes)) ); alignmentAttribute = new AlignmentInfo( UpdateDistanceMethodsType, "Update Distance Methods Type", true, UpdateDistanceMethodsTypes.Average.ToString(), AlignmentInfo.StringListType, listValidator); attributes.Add(UpdateDistanceMethodsType, alignmentAttribute); listValidator = new StringListValidator( Enum.GetNames(typeof(ProfileAlignerNames)) ); alignmentAttribute = new AlignmentInfo( ProfileAlignerName, "Profile Aligner Name", true, ProfileAlignerNames.NeedlemanWunschProfileAligner.ToString(), AlignmentInfo.StringListType, listValidator); attributes.Add(ProfileAlignerName, alignmentAttribute); listValidator = new StringListValidator( Enum.GetNames(typeof(ProfileScoreFunctionNames)) ); alignmentAttribute = new AlignmentInfo( ProfileScoreFunctionName, "Profile Score Function Name", true, ProfileScoreFunctionNames.WeightedInnerProduct.ToString(), AlignmentInfo.StringListType, listValidator); attributes.Add(ProfileScoreFunctionName, alignmentAttribute); listValidator = new StringListValidator( SM.StandardSimilarityMatrix.AmbiguousDna.ToString(), SM.StandardSimilarityMatrix.AmbiguousRna.ToString(), SM.StandardSimilarityMatrix.Blosum45.ToString(), SM.StandardSimilarityMatrix.Blosum50.ToString(), SM.StandardSimilarityMatrix.Blosum62.ToString(), SM.StandardSimilarityMatrix.Blosum80.ToString(), SM.StandardSimilarityMatrix.Blosum90.ToString(), SM.StandardSimilarityMatrix.Pam250.ToString(), SM.StandardSimilarityMatrix.Pam30.ToString(), SM.StandardSimilarityMatrix.Pam70.ToString() ); alignmentAttribute = new AlignmentInfo( SimilarityMatrix, "Describes matrix that determines the score for any possible pair of symbols", true, SM.StandardSimilarityMatrix.AmbiguousDna.ToString(), AlignmentInfo.StringListType, listValidator); attributes.Add(SimilarityMatrix, alignmentAttribute); alignmentAttribute = new AlignmentInfo( GapOpenPenalty, "Gap Open Penalty", true, "-4", AlignmentInfo.IntType, null); attributes.Add(GapOpenPenalty, alignmentAttribute); alignmentAttribute = new AlignmentInfo( GapExtendPenalty, "Gap Extension Penalty", true, "-1", AlignmentInfo.IntType, null); attributes.Add(GapExtendPenalty, alignmentAttribute); alignmentAttribute = new AlignmentInfo( NumberOfPartitions, "Number Of Partitions", true, (Environment.ProcessorCount * 2).ToString(), AlignmentInfo.IntType, null); attributes.Add(NumberOfPartitions, alignmentAttribute); alignmentAttribute = new AlignmentInfo( DegreeOfParallelism, "Degree Of Parallelism", true, Environment.ProcessorCount.ToString(), AlignmentInfo.IntType, null); attributes.Add(DegreeOfParallelism, alignmentAttribute); }