public bool Process(string[] args)
    {
      CuffdiffSignificantFileMergerOptions options;
      bool result = true;
      try
      {
        options = CommandLine.Parser.Default.ParseArguments<CuffdiffSignificantFileMergerOptions>(args,
          () =>
          {
            result = false;
          }
        );

        if (result)
        {
          if (!options.PrepareOptions())
          {
            Console.Out.WriteLine(options.GetUsage());
            result = false;
          }
          else
          {
            var files = new CuffdiffSignificantFileMerger(options.AffyAnnotationFile, options.InputFiles).Process(options.OutputFile);
            Console.WriteLine("File saved to :\n" + files.Merge("\n"));
          }
        }
      }
      catch (Exception ex)
      {
        Console.Error.WriteLine(ex.Message);
        result = false;
      }

      return result;
    }
Esempio n. 2
0
        public bool Process(string[] args)
        {
            var options = new CuffdiffSignificantFileMergerOptions();
            var result  = Parser.Default.ParseArguments(args, options);

            if (result)
            {
                if (!options.PrepareOptions())
                {
                    Console.Out.WriteLine(options.GetUsage());
                    result = false;
                }
                else
                {
                    var files = new CuffdiffSignificantFileMerger(options.AffyAnnotationFile, options.InputFiles).Process(options.OutputFile);
                    Console.WriteLine("File saved to :\n" + files.Merge("\n"));
                }
            }

            return(result);
        }