PSI_Interface 2.8.2
dotnet add package PSI_Interface --version 2.8.2
NuGet\Install-Package PSI_Interface -Version 2.8.2
<PackageReference Include="PSI_Interface" Version="2.8.2" />
<PackageVersion Include="PSI_Interface" Version="2.8.2" />
<PackageReference Include="PSI_Interface" />
paket add PSI_Interface --version 2.8.2
#r "nuget: PSI_Interface, 2.8.2"
#:package PSI_Interface@2.8.2
#addin nuget:?package=PSI_Interface&version=2.8.2
#tool nuget:?package=PSI_Interface&version=2.8.2
PSI_Interface
Objects and interfaces to support reading and writing of PSI/HUPO standard formats.
Current Project Status:
mzIdentML can be read and written.
mzML can be read, writing is low priority and hasn't been implemented yet in a way that minimizes memory usage.
Downloads
Nuget
NuGet package PSI_Interface
Continuous Integration
General:
The readers support reading gzipped mzid and mzML files without needing to extract them
mzIdentML reading:
All of the identifications, with peptide and protein connections (easier to use when reading):
Use var results = PSI_Interface.IdentData.SimpleMZIdentMLReader.Read(filePath);
In full (all information)
Use PSI_Interface.IdentData.mzIdentML.MzIdentMlReaderWriter.Read(filePath)
For easier interaction with the data, use the following example line:
var identData = new PSI_Interface.IdentData.IdentDataObj(MzIdentMlReaderWriter.Read(filePath));
mzIdentML writing:
The hardest path: Populate PSI_Interface.IdentData.mzIdentML.MzIdentMLType
, and write with PSI_Interface.IdentData.mzIdentML.MzIdentMlReaderWriter.Write(mzIdentMLType, filePath)
A slightly easier path: Populate PSI_Interface.IdentData.IdentDataObj
, and write with PSI_Interface.IdentData.mzIdentML.MzIdentMlReaderWriter.Write(new MzIdentMLType(identDataObj), filePath)
Easiest path: Use PSI_Interface.IdentData.IdentDataCreator
, calling in relative order the following functions, and providing extra data as available/specified:
var creator = new PSI_Interface.IdentData.IdentDataCreator("id", "name");
var software = creator.AddAnalysisSoftware("Software_ID", "Software_Name", "Software_Version", CV.CVID.MS_Software_Name /*if available, or CV.CVID.CVID_Unknown*/, "Software_Name_for_param");
var settings = creator.AddAnalysisSettings(software, "Settings_ID", CV.CVID.MS_ms_ms_search);
var searchDb = creator.AddSearchDatabase("Database_name", "Number_of_entries_in_database", "Database_location", CV.CVID.CVID_Unknown /*or published database if in CV*/, CV.CVID.MS_FASTA_format /*or other database format*/);
settings.AdditionalSearchParams.Items.Add(new CVParamObj(CV.CVID.MS_parent_mass_type_mono /*or other CV term*/); // Add all that are search parameters
settings.AdditionalSearchParams.Items.Add(new UserParamObj("name_of_parameter", "value_of_parameter"); // Add all other search parameters
var mod = new SearchModificationObj(); // set FixedMod, MassDelta, Residues, and add CVParamObjs to CVParams
settings.ModificationParams.Add(mod); // Repeat with a new SearchModificationObj() for each modification in the search
settings.Enzymes.Enzymes.Add(new EnzymeObj() /* populate data */): // Repeat if there are multiple enzymes, exclude if there are none
settings.ParentTolerances.AddRange(new CVParamObj[]
{
new CVParamObj(CV.CVID.MS_search_tolerance_plus_value, "tolerance value") { UnitCvid = CV.CVID.UO_parts_per_million },
new CVParamObj(CV.CVID.MS_search_tolerance_minus_value, "tolerance value") { UnitCvid = CV.CVID.UO_parts_per_million },
});
settings.FragmentTolerances.AddRange(new CVParamObj[]
{
new CVParamObj(CV.CVID.MS_search_tolerance_plus_value, "tolerance value") { UnitCvid = CV.CVID.UO_parts_per_million },
new CVParamObj(CV.CVID.MS_search_tolerance_minus_value, "tolerance value") { UnitCvid = CV.CVID.UO_parts_per_million },
});
settings.Threshold.Items.Add(new CVParamObj(CV.CVID.MS_no_threshold)); // Or choose an appropriate CV term and value, if a threshold is used
var specData = creator.AddSpectraData("path_to_spectrum_file", "Name_of_dataset", CV.CVID.MS_Thermo_nativeID_format /*or other approriate format type */, CV.CVID.MS_Thermo_RAW_format /*Whatever format the file actually is*/);
foreach (var result in searchResults)
{
var creator.AddSpectrumIdentification(specData, "spectrum_native_id", "spectrum_elution_time", experimentalMz, charge);
// Add all of the necessary information to the identification
var pep = new PeptideObj(match.Sequence); /* add ModificationObj() to Modifications for each modification in the peptide
specIdent.Peptide = pep;
var dbSeq = new DbSequenceObj(searchDb, proteinLength, "proteinName", "proteinDescription");
var pepEv = new PeptideEvidenceObj(dbSeq, pep, peptide_start_location, peptide_end_location, "prefix_residue", "suffix_residue", false /* use 'true' if is a decoy hit */);
specIdent.AddPeptideEvidence(pepEv); // repeat with a new PeptideEvidenceObj() for every distinct peptide/protein/location match.
specIdent.CVParams.Add(new CVParamObj() { Cvid = CV.CVID.MS_chemical_compound_formula, Value = match.Composition, }); // Repeat with different CV term and value for each score item
}
// Tie all of the information together
var identData = creator.GetIdentData();
// Write out to file
MzIdentMlReaderWriter.Write(new MzIdentMLType(identData), outputFilePath);
mzML Reading:
Use PSI_Interface.MSData.SimpleMzMLReader
to read an mzML file.
Several runtime options exist:
- Using random access reading (i.e., allowing non-sequential reading of spectra; default false; setting to true on a gzipped file means it will be extracted to a temp directory for reading)
- Using reduced memory (i.e., not reading the entire file into memory; default true)
- Reading spectra without reading the binary data (i.e., all the metadata, but not peak m/zs or intensities)
- Reading spectra with reading the binary data (i.e., all the metadata, with peak m/zs and intensities)
Contacts
Written by Bryson Gibbons for the Department of Energy (PNNL, Richland, WA)
Copyright 2017, Battelle Memorial Institute. All Rights Reserved.
E-mail: proteomics@pnnl.gov
Website: https://github.com/PNNL-Comp-Mass-Spec/ or https://www.pnnl.gov/integrative-omics
License
The PSI Interface is licensed under the 2-Clause BSD License; you may not use this file except in compliance with the License. You may obtain a copy of the License at https://opensource.org/licenses/BSD-2-Clause
Copyright 2018 Battelle Memorial Institute
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 is compatible. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- No dependencies.
-
.NETFramework 4.7.2
- No dependencies.
-
.NETFramework 4.8
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on PSI_Interface:
Repository | Stars |
---|---|
CompOmics/ThermoRawFileParser
Thermo RAW file parser that runs on Linux/Mac and all other platforms that support Mono
|
Version | Downloads | Last Updated |
---|---|---|
2.8.2 | 151 | 6/19/2025 |
2.7.31 | 239 | 4/15/2025 |
2.7.30 | 218 | 4/15/2025 |
2.7.29 | 111 | 4/11/2025 |
2.7.27 | 172 | 4/9/2025 |
2.7.19 | 179 | 4/9/2025 |
2.7.9 | 311 | 2/11/2025 |
2.7.3 | 133 | 2/11/2025 |
2.7.2 | 132 | 2/11/2025 |
2.7.1 | 128 | 2/10/2025 |
2.6.18 | 121 | 2/10/2025 |
2.6.17 | 125 | 2/10/2025 |
2.6.4 | 360 | 3/13/2024 |
2.6.2 | 316 | 1/11/2024 |
2.6.1 | 221 | 1/11/2024 |
2.5.92 | 752 | 11/22/2022 |
2.5.71 | 878 | 4/22/2022 |
2.5.69 | 859 | 12/29/2021 |
2.5.67 | 650 | 12/27/2021 |
2.5.66 | 689 | 12/27/2021 |
2.5.36 | 668 | 12/23/2021 |
2.5.27 | 708 | 12/23/2021 |
2.5.2 | 699 | 12/10/2021 |
2.4.3 | 930 | 6/23/2021 |
2.4.2 | 859 | 4/3/2021 |
2.4.1 | 752 | 4/2/2021 |
2.4.0 | 762 | 4/2/2021 |
2.3.2 | 898 | 1/22/2021 |
2.3.1 | 924 | 6/26/2020 |
2.3.0 | 1,121 | 3/12/2020 |
2.2.1 | 2,738 | 6/7/2019 |
2.2.0 | 1,057 | 5/2/2019 |
2.1.0 | 1,050 | 4/30/2019 |
2.0.2 | 1,037 | 4/30/2019 |
2.0.1 | 1,019 | 4/30/2019 |
2.0.0 | 1,036 | 4/29/2019 |
1.3.31 | 1,048 | 4/15/2019 |
1.3.30 | 1,246 | 12/8/2018 |
1.3.29 | 1,168 | 12/7/2018 |
1.3.28 | 1,176 | 12/5/2018 |
1.3.27 | 1,164 | 12/4/2018 |
1.3.26 | 1,191 | 10/24/2018 |
1.3.25 | 1,213 | 10/17/2018 |
1.3.24 | 1,187 | 10/16/2018 |
1.3.23 | 1,237 | 10/15/2018 |
1.3.22 | 1,667 | 7/10/2018 |
1.3.21 | 1,709 | 4/17/2018 |
1.3.20 | 1,799 | 4/14/2018 |
1.3.19 | 1,821 | 4/13/2018 |
1.3.18 | 1,642 | 4/13/2018 |
1.3.17 | 1,641 | 4/12/2018 |
1.3.16 | 1,660 | 4/12/2018 |
1.3.15 | 1,447 | 4/12/2018 |
1.3.14 | 1,664 | 4/11/2018 |
1.3.13 | 1,627 | 4/11/2018 |
1.3.12 | 1,640 | 4/9/2018 |
1.3.11 | 1,670 | 4/9/2018 |
1.3.10 | 1,644 | 4/5/2018 |
1.3.9 | 1,603 | 4/4/2018 |
1.3.8 | 1,648 | 3/27/2018 |
1.3.7 | 1,656 | 3/27/2018 |
1.3.6 | 1,673 | 2/6/2018 |
1.3.5 | 1,656 | 2/1/2018 |
1.3.3 | 1,690 | 1/31/2018 |
1.3.2 | 1,632 | 1/31/2018 |
1.3.1 | 1,509 | 10/4/2017 |
1.3.0 | 1,471 | 8/23/2017 |
1.2.0 | 1,750 | 7/1/2017 |