Skip to content

Commit

Permalink
Add ValidationScript to the solution.
Browse files Browse the repository at this point in the history
  • Loading branch information
VJalili committed Sep 29, 2022
1 parent 77597ba commit 0809a20
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 74 deletions.
8 changes: 7 additions & 1 deletion MSPC.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core.Tests", "Core.Tests\Co
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CLI.Tests", "CLI.Tests\CLI.Tests.csproj", "{42617C98-C3DE-4970-8825-0F8E472CDB1E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Benchmark", "Benchmark\Benchmark.csproj", "{FF70E98A-8E4E-4EC1-AB39-078A5BE5E34F}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Benchmark", "Benchmark\Benchmark.csproj", "{FF70E98A-8E4E-4EC1-AB39-078A5BE5E34F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ValidationScripts", "ValidationScripts\ValidationScripts.csproj", "{1F5DD09E-65BA-4A4D-A8D8-4C088DEC0563}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -44,6 +46,10 @@ Global
{FF70E98A-8E4E-4EC1-AB39-078A5BE5E34F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF70E98A-8E4E-4EC1-AB39-078A5BE5E34F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FF70E98A-8E4E-4EC1-AB39-078A5BE5E34F}.Release|Any CPU.Build.0 = Release|Any CPU
{1F5DD09E-65BA-4A4D-A8D8-4C088DEC0563}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1F5DD09E-65BA-4A4D-A8D8-4C088DEC0563}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1F5DD09E-65BA-4A4D-A8D8-4C088DEC0563}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1F5DD09E-65BA-4A4D-A8D8-4C088DEC0563}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
44 changes: 44 additions & 0 deletions ValidationScripts/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
string searchPath = @"C:\";
List<double[]> thresholds = new()
{
new double[] { 1E-04, 1E-05, 1E-05 },
new double[] { 1E-04, 1E-06, 1E-05 },
new double[] { 1E-04, 1E-06, 1E-06 },
new double[] { 1E-04, 1E-07, 1E-07 },
new double[] { 1E-04, 1E-08, 1E-06 },
new double[] { 1E-04, 1E-08, 1E-08 },
new double[] { 1E-05, 1E-06, 1E-06 },
new double[] { 1E-05, 1E-07, 1E-07 },
new double[] { 1E-05, 1E-08, 1E-06 },
new double[] { 1E-05, 1E-08, 1E-08 }
};

foreach (var dir in Directory.GetDirectories(searchPath))
{
var input = new List<string>();
foreach (var file in Directory.GetFiles(dir))
if (file.Contains("rep1.bed") || file.Contains("rep2.bed"))
input.Add(file);
else if (file.Contains(".DS_Store"))
File.Delete(file);

int maxParallelInstancesCount = 5;
int p = maxParallelInstancesCount;
foreach (var threshold in thresholds)
{
string command = @"/C mspc.exe -p config.json";
foreach (var file in input)
command += " -i " + file;

command += " -r bio -c 1";
command += string.Format(" -w {0} -s {1} -g {2}", threshold[0], threshold[1], threshold[2]);
command += string.Format(" -o {0}\\w{1}_s{2}_g{3}", dir, threshold[0], threshold[1], threshold[2]);
var process = System.Diagnostics.Process.Start("CMD.exe", command);
p--;
if (p <= 0)
{
process.WaitForExit();
p = maxParallelInstancesCount;
}
}
}
73 changes: 0 additions & 73 deletions ValidationScripts/RunMSPC.cs

This file was deleted.

10 changes: 10 additions & 0 deletions ValidationScripts/ValidationScripts.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>

0 comments on commit 0809a20

Please sign in to comment.