Beispiel #1
0
        /// <summary>
        /// Assemble With Scaffolding.
        /// </summary>
        /// <param name="args">Arguments to Scaffolding.</param>
        private static void AssembleWithScaffolding(string[] args)
        {
            AssembleWithScaffoldArguments options = new AssembleWithScaffoldArguments();
            CommandLineArguments          parser  = new CommandLineArguments();

            // add assemble related parameters.
            AddAssembleParameters(parser);

            // Add scaffold parameters
            parser.Parameter(ArgumentType.Optional, "CloneLibraryName", ArgumentValueType.String, "n", "Clone Library Name");
            parser.Parameter(ArgumentType.Optional, "MeanLengthOfInsert", ArgumentValueType.Int, "m", "Mean Length of clone library.");
            parser.Parameter(ArgumentType.Optional, "StandardDeviationOfInsert", ArgumentValueType.Int, "s", "Standard Deviation of Clone Library.");
            parser.Parameter(ArgumentType.Optional, "Redundancy", ArgumentValueType.Int, "b", "Number of paired read required to connect two contigs.");
            parser.Parameter(ArgumentType.Optional, "Depth", ArgumentValueType.Int, "f", "Depth for graph traversal.");

            if (args.Length > 0)
            {
                try
                {
                    parser.Parse(args, options);
                }
                catch (ArgumentParserException ex)
                {
                    Output.WriteLine(OutputLevel.Error, ex.Message);
                    Output.WriteLine(OutputLevel.Required, Resources.AssembleWithScaffoldHelp);
                    Environment.Exit(-1);
                }

                if (options.Help)
                {
                    Output.WriteLine(OutputLevel.Required, Resources.AssembleWithScaffoldHelp);
                }
                else
                {
                    if (!options.ForceKmer)
                    {
                        ValidateKmerLength(options.KmerLength, options.AllowKmerLengthEstimation);
                    }
                    if (options.Verbose)
                    {
                        Output.TraceLevel = OutputLevel.Information | OutputLevel.Verbose;
                    }
                    else if (!options.Quiet)
                    {
                        Output.TraceLevel = OutputLevel.Information;
                    }
                    options.AssembleSequences();
                }
            }
            else
            {
                Output.WriteLine(OutputLevel.Required, Resources.AssembleWithScaffoldHelp);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Assemble With Scaffolding.
        /// </summary>
        /// <param name="args">Arguments to Scaffolding.</param>
        private static void AssembleWithScaffolding(string[] args)
        {
            AssembleWithScaffoldArguments options = new AssembleWithScaffoldArguments();
            CommandLineArguments          parser  = new CommandLineArguments();

            // add assemble related paraemeters.
            AddAssembleParameters(parser);

            // Add scaffold parameters
            parser.Parameter(ArgumentType.Optional, "CloneLibraryName", ArgumentValueType.String, "n", "Clone Library Name");
            parser.Parameter(ArgumentType.Optional, "MeanLengthOfInsert", ArgumentValueType.Int, "m", "Mean Length of clone library.");
            parser.Parameter(ArgumentType.Optional, "StandardDeviationOfInsert", ArgumentValueType.Int, "s", "Standard Deviation of Clone Library.");
            parser.Parameter(ArgumentType.Optional, "Redundancy", ArgumentValueType.Int, "b", "Number of paired read required to connect two contigs.");
            parser.Parameter(ArgumentType.Optional, "Depth", ArgumentValueType.Int, "f", "Depth for graph traversal.");

            if (args.Length > 0)
            {
                try
                {
                    parser.Parse(args, options);
                }
                catch (ArgumentParserException ex)
                {
                    DisplayErrorMessage(ex.Message);
                    DisplayErrorMessage(Resources.AssembleWithScaffoldHelp);
                    Environment.Exit(-1);
                }

                if (options.Help)
                {
                    DisplayErrorMessage(Resources.AssembleWithScaffoldHelp);
                }
                else
                {
                    options.AssembleSequences();
                }
            }
            else
            {
                DisplayErrorMessage(Resources.AssembleWithScaffoldHelp);
            }
        }
Beispiel #3
0
        /// <summary>
        /// Assemble With Scaffolding.
        /// </summary>
        /// <param name="args">Arguments to Scaffolding.</param>
        private static void AssembleWithScaffolding(string[] args)
        {
            AssembleWithScaffoldArguments options = new AssembleWithScaffoldArguments();

            if (args.Length > 0 && Parser.ParseArguments(args, options))
            {
                if (options.Help)
                {
                    DisplayErrorMessage(Resources.AssembleWithScaffoldHelp);
                }
                else
                {
                    options.AssembleSequences();
                }
            }
            else
            {
                DisplayErrorMessage(Resources.AssembleWithScaffoldHelp);
            }
        }
Beispiel #4
0
        /// <summary>
        /// Assemble With Scaffolding.
        /// </summary>
        /// <param name="args">Arguments to Scaffolding.</param>
        private static void AssembleWithScaffolding(string[] args)
        {
            AssembleWithScaffoldArguments options = new AssembleWithScaffoldArguments();
            CommandLineArguments parser = new CommandLineArguments();

            // add assemble related parameters.
            AddAssembleParameters(parser);
            
            // Add scaffold parameters
            parser.Parameter(ArgumentType.Optional, "CloneLibraryName", ArgumentValueType.String, "n", "Clone Library Name");
            parser.Parameter(ArgumentType.Optional, "MeanLengthOfInsert", ArgumentValueType.Int, "m", "Mean Length of clone library.");
            parser.Parameter(ArgumentType.Optional, "StandardDeviationOfInsert", ArgumentValueType.Int, "s", "Standard Deviation of Clone Library.");
            parser.Parameter(ArgumentType.Optional, "Redundancy", ArgumentValueType.Int, "b", "Number of paired read required to connect two contigs.");
            parser.Parameter(ArgumentType.Optional, "Depth", ArgumentValueType.Int, "f", "Depth for graph traversal.");

            if (args.Length > 0)
            {
                try
                {
                    parser.Parse(args, options);
                }
                catch (ArgumentParserException ex)
                {
                    Output.WriteLine(OutputLevel.Error, ex.Message);
                    Output.WriteLine(OutputLevel.Required, Resources.AssembleWithScaffoldHelp);
                    Environment.Exit(-1);
                }

                if (options.Help)
                {
                    Output.WriteLine(OutputLevel.Required, Resources.AssembleWithScaffoldHelp);
                }
                else
                {
                    if (!options.ForceKmer)
                        ValidateKmerLength(options.KmerLength, options.AllowKmerLengthEstimation);
                    if (options.Verbose)
                        Output.TraceLevel = OutputLevel.Information | OutputLevel.Verbose;
                    else if (!options.Quiet)
                        Output.TraceLevel = OutputLevel.Information;
                    options.AssembleSequences();
                }
            }
            else
            {
                Output.WriteLine(OutputLevel.Required, Resources.AssembleWithScaffoldHelp);
            }
        }