Skip to content

Version 1.5.0 #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
46 changes: 46 additions & 0 deletions .github/workflows/buildandtest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: buildtest

on:
push:
paths:
- '**.cs'
- '.github/workflows/*.yml'
pull_request:
paths:
- '**.cs'
- '.github/workflows/*.yml'

jobs:
buildandtest:

runs-on: 'ubuntu-latest'

steps:
- uses: actions/checkout@v4
with:
path: 'main'

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Get Thermo packages
uses: actions/checkout@v4
with:
repository: 'thermofisherlsms/RawFileReader'
path: 'ThermoPKG'
token: ${{ secrets.GITHUB_TOKEN }}
sparse-checkout: 'Libs/NetCore/Net8/*.nupkg'
sparse-checkout-cone-mode: 'false'

- name: Add Thermo packages as NuGet source
run: |
dotnet nuget add source -n ThermoPKG `pwd`/ThermoPKG/Libs/NetCore/Net8

- name: Build and test
run: |
cd main
dotnet build .
dotnet test .

93 changes: 93 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: publish

on:
release:
types: 'published'

jobs:
publish:

runs-on: 'ubuntu-latest'

steps:
- uses: actions/checkout@v4
with:
path: 'main'

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Get Thermo packages
uses: actions/checkout@v4
with:
repository: 'thermofisherlsms/RawFileReader'
path: 'ThermoPKG'
token: ${{ secrets.GITHUB_TOKEN }}
sparse-checkout: 'Libs/NetCore/Net8/*.nupkg'
sparse-checkout-cone-mode: 'false'

- name: Add Thermo packages as NuGet source
run: |
dotnet nuget add source -n ThermoPKG `pwd`/ThermoPKG/Libs/NetCore/Net8

- name: Publish all
run: |
dotnet publish --configuration Release --runtime linux-x64 main/ThermoRawFileParser.csproj --sc -o publish/linux-x64
dotnet publish --configuration Release --runtime win-x64 main/ThermoRawFileParser.csproj --sc -o publish/win-x64
dotnet publish --configuration Release --runtime osx-x64 main/ThermoRawFileParser.csproj --sc -o publish/osx-x64
dotnet publish --configuration Release --framework net8.0 main/ThermoRawFileParser.csproj -o publish/net8

- name: Zipping Linux standalone
uses: vimtor/[email protected]
with:
files: publish/linux-x64
dest: ThermoRawFileParser-${{ github.ref_name }}-linux.zip

- name: Upload Linux to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ThermoRawFileParser-${{ github.ref_name }}-linux.zip
tag: ${{ github.ref }}

- name: Zipping OSX standalone
uses: vimtor/[email protected]
with:
files: publish/osx-x64
dest: ThermoRawFileParser-${{ github.ref_name }}-osx.zip

- name: Upload OSX to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ThermoRawFileParser-${{ github.ref_name }}-osx.zip
tag: ${{ github.ref }}

- name: Zipping Windows standalone
uses: vimtor/[email protected]
with:
files: publish/win-x64
dest: ThermoRawFileParser-${{ github.ref_name }}-win.zip

- name: Upload Windows to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ThermoRawFileParser-${{ github.ref_name }}-win.zip
tag: ${{ github.ref }}

- name: Zipping framework-based
uses: vimtor/[email protected]
with:
files: publish/net8
dest: ThermoRawFileParser-${{ github.ref_name }}-net8.zip

- name: Upload framework-based to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ThermoRawFileParser-${{ github.ref_name }}-net8.zip
tag: ${{ github.ref }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ obj/
.vs/
*.csproj.user
.vscode/
Properties/
4 changes: 0 additions & 4 deletions .travis.yml

This file was deleted.

Binary file removed .vs/ThermoRawFileParser/v15/.suo
Binary file not shown.
67 changes: 29 additions & 38 deletions App.config
Original file line number Diff line number Diff line change
@@ -1,44 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>

<configSections>
<section name="log4net" type="System.Configuration.IgnoreSectionHandler" />
</configSections>

<log4net>
<root>
<level value="INFO" />
<appender-ref ref="console" />
<!-- <appender-ref ref="file" /> -->
</root>
<appender name="console" type="log4net.Appender.ConsoleAppender">
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date{yyyy-MM-dd HH:mm:ss} %level %message%newline" />
</layout>
</appender>
<!--<appender name="file" type="log4net.Appender.RollingFileAppender">
<file value="ThermoRawFileParser.log" />
<appendToFile value="true" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="5" />
<maximumFileSize value="10MB" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date{yyyy-MM-dd HH:mm:ss} [%thread] %message%newline" />
</layout>
</appender>-->
</log4net>

<runtime>
<loadFromRemoteSources enabled="true" />
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="OpenMcdf" publicKeyToken="fdbb1629d7c00800" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.1.9" newVersion="2.2.1.9" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="ThermoFisher.CommonCore.Data" publicKeyToken="1aef06afb5abd953" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.88" newVersion="5.0.0.88" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.FileSystem.AccessControl" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="OpenMcdf.Extensions" publicKeyToken="fdbb1629d7c00800" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.3.0.0" newVersion="2.3.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Security.Principal.Windows" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Security.AccessControl" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
33 changes: 21 additions & 12 deletions MainClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
using System.Text.RegularExpressions;
using System.Data;

[assembly: log4net.Config.XmlConfigurator()]

namespace ThermoRawFileParser
{
public static class MainClass
{
private static readonly ILog Log =
LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

public const string Version = "1.4.5";
public static string Version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
public static void Main(string[] args)
{
// Set Invariant culture as default for all further processing
Expand Down Expand Up @@ -125,7 +127,7 @@ private static void XicParametersParsing(string[] args)

if (parameters.help)
{
ShowHelp("usage is:", null,
ShowHelp("usage is:", new OptionException(),
optionSet);
return;
}
Expand Down Expand Up @@ -253,12 +255,12 @@ private static void XicParametersParsing(string[] args)
{
if (parameters.help)
{
ShowHelp("usage is:", null,
ShowHelp("usage is:", new OptionException(),
optionSet);
}
else
{
ShowHelp("Error - usage is:", null,
ShowHelp("Error - usage is:", new OptionException(),
optionSet);
}
}
Expand Down Expand Up @@ -374,7 +376,7 @@ private static void SpectrumQueryParametersParsing(string[] args)

if (parameters.help)
{
ShowHelp("usage is:", null,
ShowHelp("usage is:", new OptionException(),
optionSet);
return;
}
Expand Down Expand Up @@ -416,12 +418,12 @@ private static void SpectrumQueryParametersParsing(string[] args)
{
if (parameters.help)
{
ShowHelp("usage is:", null,
ShowHelp("usage is:", new OptionException(),
optionSet);
}
else
{
ShowHelp("Error - usage is:", null,
ShowHelp("Error - usage is:", new OptionException(),
optionSet);
}
}
Expand Down Expand Up @@ -497,7 +499,7 @@ private static void RegularParametersParsing(string[] args)
h => help = h != null
},
{
"version", "Prints out the version of the executable.",
"v|version", "Prints out the version of the executable.",
v => version = v != null
},
{
Expand Down Expand Up @@ -583,6 +585,10 @@ private static void RegularParametersParsing(string[] args)
"N|noiseData", "Include noise data in mzML output",
v => parseInput.NoiseData = v != null
},
{
"C|chargeData", "Include instrument detected charge states in mzML output (only for high resolution centroided data)",
v => parseInput.ChargeData = v != null
},
{
"w|warningsAreErrors", "Return non-zero exit code for warnings; default only for errors",
v => parseInput.Vigilant = v != null
Expand Down Expand Up @@ -623,7 +629,7 @@ private static void RegularParametersParsing(string[] args)
{
var helpMessage =
$"Usage is {Assembly.GetExecutingAssembly().GetName().Name}.exe [subcommand] [options]\noptional subcommands are xic|query (use [subcommand] -h for more info]):";
ShowHelp(helpMessage, null, optionSet);
ShowHelp(helpMessage, new OptionException(), optionSet);
return;
}

Expand Down Expand Up @@ -766,6 +772,9 @@ private static void RegularParametersParsing(string[] args)
if (parseInput.OutputFormat == OutputFormat.IndexMzML) parseInput.OutputFormat = OutputFormat.MzML;
}

// Switch off gzip compression for Parquet
if (parseInput.OutputFormat == OutputFormat.Parquet) parseInput.Gzip = false;

parseInput.MaxLevel = parseInput.MsLevel.Max();

if (parseInput.S3Url != null && parseInput.S3AccessKeyId != null &&
Expand All @@ -788,12 +797,12 @@ private static void RegularParametersParsing(string[] args)
{
if (help)
{
ShowHelp("usage is:", null,
ShowHelp("usage is:", new OptionException(),
optionSet);
}
else
{
ShowHelp("Error - usage is:", null,
ShowHelp("Error - usage is:", new OptionException(),
optionSet);
}
}
Expand Down
3 changes: 3 additions & 0 deletions ParseInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ public int Warnings

public bool NoiseData { get; set; }

public bool ChargeData { get; set; }

public bool StdOut { get; set; }

public bool Vigilant { get; set; }
Expand Down Expand Up @@ -135,6 +137,7 @@ public ParseInput()
MgfPrecursor = false;
StdOut = false;
NoiseData = false;
ChargeData = false;
Vigilant = false;
_errors = 0;
_warnings = 0;
Expand Down
Loading
Loading