public async Task <IActionResult> analyseDiamond([FromBody] ModifierInputObject input) { RScriptRunner.saveFiles(input.expressionMatrixContent, input.probeMapContent); string result = RScriptRunner.RunFromCmd("runModifieR.R", input); return(Ok("ResultFrom R-script: " + result)); }
private static void GeneratePlotByRunningRScript(string currentPath, string rScriptExecutablePath, string rScriptCodePath) { Console.WriteLine("Generating plot images by running R script..."); var result = RScriptRunner.RunFromCmd( rScriptCodePath, rScriptExecutablePath, "" ); }
public async Task <IActionResult> comboResults([FromBody] ModifierInputObject input) { try { string result = await RScriptRunner.RunFromCmd(config.Value, "runModifieR.R", input, "combo", input.id); return(Ok("got results")); } catch (Exception e) { logger.LogError("Error in R-script" + e.Message, e); return(StatusCode(500, e.Message)); } }
public void RunFromCmdTest() { //C:\Users\C51188\Documents\Projects\OpenDotaInterface\DotaMatchAnalyzer\Script.R string result = ""; //string scriptpath = Environment.CurrentDirectory; //C:\Users\MrMackey\source\repos\OpenDotaInterface\OpenDotaInterfaceTests\bin\Debug //scriptpath.Replace(@"OpenDotaInterfaceTests\bin\Debug", @"DotaMatchAnalyzer\Script.R"); string scriptpath = @"C:\Users\MrMackey\source\repos\OpenDotaInterface\DotaMatchAnalyzer\Script.R"; string renginepath = Environment.GetEnvironmentVariable("R_HOME", EnvironmentVariableTarget.User) + "\\bin\\rscript.exe"; result = RScriptRunner.RunFromCmd(scriptpath, renginepath, ""); Assert.IsFalse(result.Equals("")); Console.WriteLine(result); }
private async Task <IActionResult> runAnalysis(ModifierInputObject input, String algorithm) { try { logger.LogInformation("Recieved request to " + algorithm); string result = await RScriptRunner.RunFromCmd(config.Value, "runModifieR.R", input, algorithm, input.id); logger.LogInformation("Got Result: " + result); await mailService.sendEmail(config.Value, input.email, input.id, algorithm); return(Ok("An email containing your results has been sent!")); } catch (Exception e) { logger.LogError("Error in R-script" + e.Message, e); return(StatusCode(500, e.Message)); } }