private IFileLocation GetRuntimeExecutable()
        {
#if DotNetCore
            return(new FileLocation(_executableProcessor.GetEnvironmentExecutablePath("dotnet")));
#else
            return(new FileLocation(_executableProcessor.GetMonoPath()));
#endif
        }
Exemple #2
0
        private IFileLocation GetRuntimeExecutable()
        {
#if DotNetCore
            return(new FileLocation(_executableProcessor.GetEnvironmentExecutablePath("dotnet")));
#else
            var mono = CrossPlatform.IsThisLinux() ? _executableProcessor.GetMonoPath() : null;
            return(new FileLocation(mono));
#endif
        }
Exemple #3
0
        public int Launch()
        {
            CommonOptions      commonOptions = _modeRunner.CommonOptions;
            IDirectoryLocation outFolder     = commonOptions.OutputDirectory;
            var log   = outFolder.GetFileLocation("CanvasLog.txt");
            var error = outFolder.GetFileLocation("CanvasError.txt");
            IsasConfiguration  config     = IsasConfiguration.GetConfiguration();
            IDirectoryLocation genomeRoot = commonOptions.WholeGenomeFasta?.Parent?.Parent?.Parent?.Parent?.Parent;
            int returnValue = 0;

            IsasFrameworkFactory.RunWithIsasFramework(outFolder, log, error, commonOptions.StartCheckpoint, commonOptions.StopCheckpoint, 0,
                                                      config.MaximumMemoryGB, config.MaximumHoursPerProcess, false, genomeRoot,
                                                      frameworkServices =>
            {
                var logger = frameworkServices.Logger;
                try
                {
                    var executableProcessor = new ExecutableProcessor(new NullSampleSettings(), logger);
#if DotNetCore
                    var runtimeExecutable = new FileLocation(executableProcessor.GetEnvironmentExecutablePath("dotnet"));
#else
                    var runtimeExecutable = CrossPlatform.IsThisLinux() ? new FileLocation(executableProcessor.GetMonoPath()) : null;
#endif
                    frameworkServices.Logger.Info($"Running Canvas {_mode} {_version}");
                    logger.Info($"Command-line arguments: {string.Join(" ", _args)}");
                    _modeRunner.Run(logger, frameworkServices.Checkpointer, frameworkServices.WorkManager, runtimeExecutable);
                    returnValue = 0;
                }
                catch (Exception e)
                {
                    logger.Error($"Canvas workflow error: {e}");
                    returnValue = -1;
                }
            });
            return(returnValue);
        }