Exemple #1
0
        private void ExecuteParsingTest(string arguments, bool shouldPass, Action <ApplicationOptions> assertions = null)
        {
            var options = ApplicationOptions.ParseCommandLine(arguments.Split(' '));

            if (shouldPass)
            {
                if (assertions != null)
                {
                    assertions(options);
                }
            }
            else
            {
                Assert.Null(options);
            }
        }
Exemple #2
0
        public void PrintAndSaveApplicationLegacyOptions()
        {
            ApplicationOptions.PrintUsageInfo();
            var bamFolder = UnitTestPaths.TestDataDirectory;
            var applicationOptionsFile = Path.Combine(UnitTestPaths.TestDataDirectory, "SomaticVariantCallerOptions.used.xml");

            if (File.Exists(applicationOptionsFile))
            {
                File.Delete(applicationOptionsFile);
            }
            var commandLine1 = string.Format("-minvq 40 -minbq 40 -BAMFolder {0} -t 1000 -g {1} -vqfilter 40", bamFolder, _existingGenome);
            var options1     = ApplicationOptions.ParseCommandLine(commandLine1.Split(' '));

            options1.Save(applicationOptionsFile);
            Assert.True(File.Exists(applicationOptionsFile));
        }
Exemple #3
0
        public void PrintAndSaveApplicationOptions()
        {
            ApplicationOptions.PrintUsageInfo();
            var bamFolder = UnitTestPaths.TestDataDirectory;
            var applicationOptionsFile = Path.Combine(UnitTestPaths.TestDataDirectory, "SomaticVariantCallerOptions.used.xml");

            if (File.Exists(applicationOptionsFile))
            {
                File.Delete(applicationOptionsFile);
            }
            var commandLine1 = string.Format("-MinVariantQScore 40 -MinBaseCallQuality 40 -BAMFolder {0} -MaxNumThreads 1000 -GenomePaths {1} -VariantQualityFilter 40", bamFolder, _existingGenome);
            var options1     = ApplicationOptions.ParseCommandLine(commandLine1.Split(' '));

            options1.Save(applicationOptionsFile);
            Assert.True(File.Exists(applicationOptionsFile));
        }
Exemple #4
0
        public void MaxNumberThreads()
        {
            string bamFolder    = UnitTestPaths.TestDataDirectory;
            var    commandLine1 = string.Format("-minvq 40 -minbq 40 -BAMFolder {0} -t 1000 -g {1} -vqfilter 40", bamFolder, _existingGenome);
            var    options1     = ApplicationOptions.ParseCommandLine(commandLine1.Split(' '));

            Assert.Equal(Environment.ProcessorCount, options1.MaxNumThreads);

            var commandLine2 = string.Format("-minvq 40 -minbq 40 -BAMFolder {0} -g {1} -vqfilter 40", bamFolder, _existingGenome);
            var options2     = ApplicationOptions.ParseCommandLine(commandLine2.Split(' '));

            Assert.Equal(Environment.ProcessorCount, options2.MaxNumThreads);

            var commandLine3 = string.Format("-minvq 40 -minbq 40 -BAMFolder {0} -g {1} -vqfilter 40 -t 1", bamFolder, _existingGenome);
            var options3     = ApplicationOptions.ParseCommandLine(commandLine3.Split(' '));

            Assert.Equal(1, options3.MaxNumThreads);
        }