Skip to content
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

Tims tof reader #800

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
d5cb13f
Started frameProxy class
Alexander-Sol Nov 18, 2023
d001aca
Added conversion functions
Alexander-Sol Nov 20, 2023
ef23825
Added useful functions to FrameProxy
Alexander-Sol Nov 21, 2023
93d47c6
Started methods for scan building, added new MsDataScan class
Alexander-Sol Nov 22, 2023
5675c5c
Minor
Alexander-Sol Nov 22, 2023
a574388
TimsTof reader is working!!!
Alexander-Sol Nov 29, 2023
57a061f
minor
Alexander-Sol Nov 30, 2023
b59ee70
Fixed merge conflicts
Alexander-Sol Nov 30, 2023
b8fe87c
Fixed merge booboo
Alexander-Sol Nov 30, 2023
6dd39d1
TimsDataScan is missing
Alexander-Sol Dec 7, 2023
a9df28f
started spectra addition stuff
Alexander-Sol Dec 8, 2023
1ae9727
Finished spectraMerger class
Alexander-Sol Dec 9, 2023
5632fa0
Reader reads in + merges all spectra/scans
Alexander-Sol Jan 12, 2024
91096ee
Parallelized, but made it worse
Alexander-Sol Jan 13, 2024
23e0a8c
Changed MS2 merger to keep list nodes
Alexander-Sol Jan 16, 2024
7e2177e
reverted MS2 merger changes
Alexander-Sol Jan 16, 2024
be4ca1b
unsure
Alexander-Sol Jan 30, 2024
b038767
Merge branch 'master' into timsTOFReader
Alexander-Sol Apr 17, 2024
cad6bae
Merge branch 'timsTOFReader' of https://github.com/Alexander-Sol/mzLi…
Alexander-Sol Jun 19, 2024
e766260
Working but slowly
Alexander-Sol Jun 19, 2024
0236386
idk
Alexander-Sol Jun 19, 2024
4ca6874
Added support for missing Pasef scans, missing precursors
Alexander-Sol Jun 20, 2024
94beb90
Making progress
Alexander-Sol Jul 8, 2024
952f021
Seems to be working
Alexander-Sol Jul 9, 2024
1d47d49
Removed empty scans
Alexander-Sol Jul 10, 2024
a9fb8b3
fixed merge conflicts
Alexander-Sol Sep 15, 2024
26285c5
Finished timsTof reader, added tests
Alexander-Sol Sep 15, 2024
d6b9e75
Updated timsdata.dll path in DllImport call
Alexander-Sol Sep 15, 2024
f6c740a
Fixed broken tests
Alexander-Sol Sep 16, 2024
21aefc9
changed bruker dll location in directory
Alexander-Sol Sep 16, 2024
6417ef4
updated references
Alexander-Sol Sep 16, 2024
26d2058
updated github actions
Alexander-Sol Sep 16, 2024
fa6be72
added depndencies
Alexander-Sol Sep 16, 2024
b1a36f3
edited workflow
Alexander-Sol Sep 16, 2024
aeae7c1
workflow
Alexander-Sol Sep 16, 2024
8c9ae65
mzLookup table
Alexander-Sol Sep 18, 2024
da39272
memoization of mz values, commented out, local tests
Alexander-Sol Sep 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
dotnet-version: 8.0.x
- name: Restore dependencies
run: cd mzLib && dotnet restore
- name: Install Visual c++ build tools
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install visualcpp-build-tools
- name: Build
run: cd mzLib && dotnet build --no-restore
- name: Build (Test)
Expand Down
32 changes: 26 additions & 6 deletions mzLib/MassSpectrometry/MsDataScan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,29 @@ namespace MassSpectrometry
{
public class MsDataScan
{
public MsDataScan(MzSpectrum massSpectrum, int oneBasedScanNumber, int msnOrder, bool isCentroid, Polarity polarity, double retentionTime, MzRange scanWindowRange, string scanFilter, MZAnalyzerType mzAnalyzer,
double totalIonCurrent, double? injectionTime, double[,] noiseData, string nativeId, double? selectedIonMz = null, int? selectedIonChargeStateGuess = null, double? selectedIonIntensity = null, double? isolationMZ = null,
double? isolationWidth = null, DissociationType? dissociationType = null, int? oneBasedPrecursorScanNumber = null, double? selectedIonMonoisotopicGuessMz = null, string hcdEnergy = null, string scanDescription = null)
public MsDataScan(MzSpectrum massSpectrum,
int oneBasedScanNumber,
int msnOrder,
bool isCentroid,
Polarity polarity,
double retentionTime,
MzRange scanWindowRange,
string scanFilter,
MZAnalyzerType mzAnalyzer,
double totalIonCurrent,
double? injectionTime,
double[,] noiseData,
string nativeId,
double? selectedIonMz = null,
int? selectedIonChargeStateGuess = null,
double? selectedIonIntensity = null,
double? isolationMZ = null,
double? isolationWidth = null,
DissociationType? dissociationType = null,
int? oneBasedPrecursorScanNumber = null,
double? selectedIonMonoisotopicGuessMz = null,
string hcdEnergy = null,
string scanDescription = null)
{
OneBasedScanNumber = oneBasedScanNumber;
MsnOrder = msnOrder;
Expand Down Expand Up @@ -61,7 +81,7 @@ public MsDataScan(MzSpectrum massSpectrum, int oneBasedScanNumber, int msnOrder,
/// </summary>
public MzSpectrum MassSpectrum { get; protected set; }

public int OneBasedScanNumber { get; private set; }
public int OneBasedScanNumber { get; protected set; }
public int MsnOrder { get; }
public double RetentionTime { get; }
public Polarity Polarity { get; }
Expand All @@ -70,7 +90,7 @@ public MsDataScan(MzSpectrum massSpectrum, int oneBasedScanNumber, int msnOrder,
public string ScanFilter { get; }
public string NativeId { get; private set; }
public bool IsCentroid { get; }
public double TotalIonCurrent { get; }
public double TotalIonCurrent { get; protected set; }
public double? InjectionTime { get; }
public double[,] NoiseData { get; }

Expand All @@ -82,7 +102,7 @@ public MsDataScan(MzSpectrum massSpectrum, int oneBasedScanNumber, int msnOrder,
public double? SelectedIonMZ { get; private set; } // May be adjusted by calibration
public DissociationType? DissociationType { get; }
public double? IsolationWidth { get; }
public int? OneBasedPrecursorScanNumber { get; private set; }
public int? OneBasedPrecursorScanNumber { get; protected set; }
public double? SelectedIonMonoisotopicGuessIntensity { get; private set; } // May be refined
public double? SelectedIonMonoisotopicGuessMz { get; private set; } // May be refined
public string HcdEnergy { get; private set; }
Expand Down
4 changes: 3 additions & 1 deletion mzLib/MassSpectrometry/MzSpectra/MzPeak.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace MassSpectrometry
using System;

namespace MassSpectrometry
{
public class MzPeak
{
Expand Down
12 changes: 12 additions & 0 deletions mzLib/MzLibUtil/ClassExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ public static T[] SubArray<T>(this T[] data, int index, int length)
return result;
}

public static bool ToEnum<T>(this int modeInt, out T result) where T : Enum
{
Type enumType = typeof(T);
if (!Enum.IsDefined(enumType, modeInt))
{
result = default(T);
return false;
}
result = (T)Enum.ToObject(enumType, modeInt);
return true;
}

/// <summary>
/// Checks if two collections are equivalent, regardless of the order of their contents
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions mzLib/Readers/Bruker/BrukerFileReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ private List<StepsRow> GetFullStepsTable()
/// <param name="reader">SQLiteReader object, initialized after the execution of a command.</param>
/// <returns>Return null exception if there is an error in the data format of the baf file.</returns>
/// <exception cref="ArgumentNullException"></exception>
private T SqlColumnReader<T>(SQLiteDataReader reader) where T: new()
public static T SqlColumnReader<T>(SQLiteDataReader reader) where T: new()
{
// get all the property names, then iterate over that.
// The objects should be exact 1:1 column corresponding so as
Expand Down Expand Up @@ -516,7 +516,7 @@ private static void ThrowLastBaf2SqlError()
}

/* ----------------------------------------------------------------------------------------------- */
private static byte[] ConvertStringToUTF8ByteArray(String input)
public static byte[] ConvertStringToUTF8ByteArray(String input)
{
byte[] utf8 = Encoding.UTF8.GetBytes(input);
var result = new byte[utf8.Length + 1];
Expand Down
Loading
Loading