PSI_Interface 2.6.4

dotnet add package PSI_Interface --version 2.6.4
NuGet\Install-Package PSI_Interface -Version 2.6.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PSI_Interface" Version="2.6.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PSI_Interface --version 2.6.4
#r "nuget: PSI_Interface, 2.6.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install PSI_Interface as a Cake Addin
#addin nuget:?package=PSI_Interface&version=2.6.4

// Install PSI_Interface as a Cake Tool
#tool nuget:?package=PSI_Interface&version=2.6.4

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

Build status

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 Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  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 is compatible.  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. 
.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 was computed.  net48 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6.2

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • net6.0

    • No dependencies.
  • net7.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.6.4 107 3/13/2024
2.6.2 214 1/11/2024
2.6.1 146 1/11/2024
2.5.92 667 11/22/2022
2.5.71 761 4/22/2022
2.5.69 748 12/29/2021
2.5.67 556 12/27/2021
2.5.66 591 12/27/2021
2.5.36 584 12/23/2021
2.5.27 610 12/23/2021
2.5.2 607 12/10/2021
2.4.3 825 6/23/2021
2.4.2 756 4/3/2021
2.4.1 646 4/2/2021
2.4.0 665 4/2/2021
2.3.2 750 1/22/2021
2.3.1 821 6/26/2020
2.3.0 1,004 3/12/2020
2.2.1 2,621 6/7/2019
2.2.0 940 5/2/2019
2.1.0 922 4/30/2019
2.0.2 917 4/30/2019
2.0.1 906 4/30/2019
2.0.0 916 4/29/2019
1.3.31 925 4/15/2019
1.3.30 1,131 12/8/2018
1.3.29 1,039 12/7/2018
1.3.28 1,047 12/5/2018
1.3.27 1,034 12/4/2018
1.3.26 1,061 10/24/2018
1.3.25 1,074 10/17/2018
1.3.24 1,057 10/16/2018
1.3.23 1,082 10/15/2018
1.3.22 1,353 7/10/2018
1.3.21 1,383 4/17/2018
1.3.20 1,461 4/14/2018
1.3.19 1,489 4/13/2018
1.3.18 1,303 4/13/2018
1.3.17 1,309 4/12/2018
1.3.16 1,326 4/12/2018
1.3.15 1,222 4/12/2018
1.3.14 1,337 4/11/2018
1.3.13 1,291 4/11/2018
1.3.12 1,310 4/9/2018
1.3.11 1,337 4/9/2018
1.3.10 1,329 4/5/2018
1.3.9 1,272 4/4/2018
1.3.8 1,317 3/27/2018
1.3.7 1,314 3/27/2018
1.3.6 1,337 2/6/2018
1.3.5 1,317 2/1/2018
1.3.3 1,361 1/31/2018
1.3.2 1,303 1/31/2018
1.3.1 1,273 10/4/2017
1.3.0 1,240 8/23/2017
1.2.0 1,401 7/1/2017