Skip to content

Commit

Permalink
update mzLib, other small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rmillikin committed Oct 2, 2020
1 parent 41b502f commit e4dbb10
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CMD/CMD.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.7.82" />
<PackageReference Include="MathNet.Numerics" Version="4.9.0" />
<PackageReference Include="mzLib" Version="1.0.472" />
<PackageReference Include="mzLib" Version="1.0.476" />
<PackageReference Include="NetSerializer" Version="4.1.1" />
<PackageReference Include="Nett" Version="0.15.0" />
<PackageReference Include="SharpLearning.Common.Interfaces" Version="0.28.0" />
Expand Down
5 changes: 3 additions & 2 deletions CMD/FlashLFQExecutable.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using CommandLine;
using CommandLine.Text;
using FlashLFQ;
using IO.ThermoRawFileReader;
using System;
using System.Collections.Generic;
using System.Diagnostics;
Expand Down Expand Up @@ -85,7 +86,7 @@ private static void Run(FlashLfqSettings settings)

if (settings.PrintThermoLicenceViaCommandLine)
{
Console.WriteLine(ThermoRawFileReader.ThermoRawFileReaderLicence.ThermoLicenceText);
Console.WriteLine(ThermoRawFileReaderLicence.ThermoLicenceText);
return;
}

Expand All @@ -106,7 +107,7 @@ private static void Run(FlashLfqSettings settings)
else
{
// decided to write this even if it's on silent mode...
Console.WriteLine(ThermoRawFileReader.ThermoRawFileReaderLicence.ThermoLicenceText);
Console.WriteLine(ThermoRawFileReaderLicence.ThermoLicenceText);
Console.WriteLine("\nIn order to search Thermo .raw files, you must agree to the above terms. Do you agree to the above terms? y/n\n");

string res = Console.ReadLine();
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Base image is the Alpine Linux distro with .NET Core runtime
FROM mcr.microsoft.com/dotnet/core/runtime:3.1-alpine AS build

## Copies FlashLFQ_CommandLine.zip from the current directory into the Docker image
## Copies contents of the "publish" folder into the Docker image
ADD CMD/bin/Release/netcoreapp3.1/publish/ /flashlfq/

## Set the entrypoint of the Docker image to CMD.dll
Expand Down
2 changes: 1 addition & 1 deletion GUI/GUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<ItemGroup>
<PackageReference Include="MathNet.Numerics" Version="4.9.0" />
<PackageReference Include="mzLib" Version="1.0.472" />
<PackageReference Include="mzLib" Version="1.0.476" />
<PackageReference Include="NetSerializer" Version="4.1.1" />
<PackageReference Include="Nett" Version="0.15.0" />
<PackageReference Include="SharpLearning.Common.Interfaces" Version="0.28.0" />
Expand Down
28 changes: 17 additions & 11 deletions GUI/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using FlashLFQ;
using GUI.DataGridObjects;
using IO.ThermoRawFileReader;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
Expand Down Expand Up @@ -57,7 +58,6 @@ public MainWindow()
idFiles = new ObservableCollection<IdentificationFileForDataGrid>();
worker = new BackgroundWorker();
worker.DoWork += new DoWorkEventHandler(RunProgram);
worker.RunWorkerCompleted += Worker_RunWorkerCompleted;

flashLfqEngine = new FlashLfqEngine(new List<Identification>());

Expand All @@ -71,14 +71,6 @@ public MainWindow()
Console.SetOut(_writer);
}

private void Worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
if (e.Error == null)
{
MessageBox.Show("Run complete");
}
}

private void PopulateSettings()
{
settings = new FlashLfqSettings();
Expand Down Expand Up @@ -122,7 +114,7 @@ private void ParseSettings()
}

settings.ProteinQuantFoldChangeCutoff = double.Parse(FoldChangeCutoffManualTextBox.Text, CultureInfo.InvariantCulture);

// ppm tolerance
if (double.TryParse(ppmToleranceTextBox.Text, NumberStyles.Number, CultureInfo.InvariantCulture, out double ppmTolerance))
{
Expand Down Expand Up @@ -304,7 +296,7 @@ private void AddAFile(string filePath)
if (!licenceAgreement.HasAcceptedThermoLicence)
{
var thermoLicenceWindow = new ThermoLicenceAgreementWindow();
thermoLicenceWindow.LicenceText.AppendText(ThermoRawFileReader.ThermoRawFileReaderLicence.ThermoLicenceText);
thermoLicenceWindow.LicenceText.AppendText(ThermoRawFileReaderLicence.ThermoLicenceText);
var dialogResult = thermoLicenceWindow.ShowDialog();

if (dialogResult.HasValue && dialogResult.Value == true)
Expand Down Expand Up @@ -550,6 +542,18 @@ private void RunFlashLfq()
return;
}

if (ids.Any(p => p.Ms2RetentionTimeInMinutes > 500))
{
var res = MessageBox.Show("It seems that some of the retention times in the PSM file(s) are in seconds and not minutes; FlashLFQ requires the RT to be in minutes. " +
"Continue with the FlashLFQ run? (only click yes if the RTs are actually in minutes)",
"Error", MessageBoxButton.YesNo, MessageBoxImage.Hand);

if (res == MessageBoxResult.No)
{
return;
}
}

// run FlashLFQ engine
try
{
Expand Down Expand Up @@ -592,6 +596,8 @@ private void RunFlashLfq()
{
OutputWriter.WriteOutput(Directory.GetParent(spectraFiles.First().FilePath).FullName, results, flashLfqEngine.Silent,
outputFolderPath);

MessageBox.Show("Run complete");
}
catch (Exception ex)
{
Expand Down
2 changes: 1 addition & 1 deletion Test/Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<ItemGroup>
<PackageReference Include="MathNet.Numerics" Version="4.9.0" />
<PackageReference Include="mzLib" Version="1.0.472" />
<PackageReference Include="mzLib" Version="1.0.476" />
<PackageReference Include="NetSerializer" Version="4.1.1" />
<PackageReference Include="nunit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
Expand Down
2 changes: 1 addition & 1 deletion Util/Util.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.7.82" />
<PackageReference Include="MathNet.Numerics" Version="4.9.0" />
<PackageReference Include="mzLib" Version="1.0.472" />
<PackageReference Include="mzLib" Version="1.0.476" />
<PackageReference Include="NetSerializer" Version="4.1.1" />
<PackageReference Include="Nett" Version="0.15.0" />
</ItemGroup>
Expand Down

0 comments on commit e4dbb10

Please sign in to comment.