示例#1
0
        /// <summary>
        /// Parse command line arguments for Length anomaly regions command
        /// </summary>
        /// <param name="args">Array of command line arguments.</param>
        private static void LengthAnomalyOption(string[] args)
        {
            LengthAnomaly options = new LengthAnomaly();

            if (args.Length > 2)
            {
                if (options.Usage)
                {
                    DisplayErrorMessage(Resources.LengthAnomalyHelp);
                }
                else
                {
                    options.LengthAnamoly(args[0],
                                          float.Parse(args[1]), float.Parse(args[2]));
                }
            }
            else
            {
                DisplayErrorMessage(Resources.LengthAnomalyHelp);
            }
        }
示例#2
0
        /// <summary>
        /// Parse command line arguments for Length anomaly regions command
        /// </summary>
        /// <param name="args">Array of command line arguments.</param>
        private static void LengthAnomalyOption(string[] args)
        {
            LengthAnomaly options = new LengthAnomaly();

            if (args.Length > 2)
            {
                CommandLineArguments parser = new CommandLineArguments();

                // Add the parameters
                parser.Parameter(ArgumentType.Optional, "SAMInput", ArgumentValueType.Bool, "S", "Input is SAM format");
                parser.Parameter(ArgumentType.Optional, "Help", ArgumentValueType.Bool, "", "");

                try
                {
                    parser.Parse(args, options);
                }
                catch (ArgumentParserException ex)
                {
                    DisplayErrorMessage(ex.Message);
                    DisplayErrorMessage(Resources.LengthAnomalyHelp);
                    Environment.Exit(-1);
                }

                if (options.Help)
                {
                    DisplayErrorMessage(Resources.LengthAnomalyHelp);
                }
                else
                {
                    options.LengthAnamoly(args[0],
                                          float.Parse(args[1]), float.Parse(args[2]));
                }
            }
            else
            {
                DisplayErrorMessage(Resources.LengthAnomalyHelp);
            }
        }
示例#3
0
文件: Program.cs 项目: cpatmoore/bio
        /// <summary>
        /// Parse command line arguments for Length anomaly regions command
        /// </summary>
        /// <param name="args">Array of command line arguments.</param>
        private static void LengthAnomalyOption(string[] args)
        {
            LengthAnomaly options = new LengthAnomaly();

            if (args.Length > 2)
            {
                CommandLineArguments parser = new CommandLineArguments();

                // Add the parameters
                parser.Parameter(ArgumentType.Optional, "SAMInput", ArgumentValueType.Bool, "S", "Input is SAM format");
                parser.Parameter(ArgumentType.Optional, "Help", ArgumentValueType.Bool, "", "");

                try
                {
                    parser.Parse(args, options);
                }
                catch (ArgumentParserException ex)
                {
                    DisplayErrorMessage(ex.Message);
                    DisplayErrorMessage(Resources.LengthAnomalyHelp);
                    Environment.Exit(-1);
                }

                if (options.Help)
                {
                    DisplayErrorMessage(Resources.LengthAnomalyHelp);
                }
                else
                {
                    options.LengthAnamoly(args[0],
                       float.Parse(args[1]), float.Parse(args[2]));
                }
            }
            else
            {
                DisplayErrorMessage(Resources.LengthAnomalyHelp);
            }
        }