Giter Site home page Giter Site logo

Comments (11)

alchemistmatt avatar alchemistmatt commented on August 30, 2024

For reference, the enum values for ActivationType in ThermoFisher.CommonCore.Data.FilterEnums are:

0: CollisionInducedDissociation
1: MultiPhotonDissociation
2: ElectronCaptureDissociation
3: PQD
4: ElectronTransferDissociation
5: HigherEnergyCollisionalDissociation (hcd)
6: Any
7: SAactivation
8: ProtonTransferReaction
9: NegativeElectronTransferDissociation
10: NegativeProtonTransferReaction
11: UltraVioletPhotoDissociation

This enum is returned by the call to GetActivation as demonstrated by this code snippet

var scanFilter = mXRawFile.GetFilterForScanNumber(scan);
var reactions = scanFilter.MassCount;

var index = reactions - 1;
if (index > 0 && scanFilter.GetIsMultipleActivation(index))
{
    // The last activation is part of a ETciD/EThcD pair
    index--;
}

var activationTypeCode = scanFilter.GetActivation(index);

This snippet is from
https://github.com/PNNL-Comp-Mass-Spec/Thermo-Raw-File-Reader/blob/ThermoNuGetDLL/XRawFileIO.cs#L1130

from pwiz.

chambm avatar chambm commented on August 30, 2024

Thanks for the report. I can definitely see your #2 happening because it happened with a few of the other enums when I started trying to cast directly (with MSFR all those are parsed from strings). It slipped by because apparently none of the pwiz or Skyline tests use HCD! Maybe I can figure out a way to adapt the ScanFilterTest tests to also test RawFileReader.

I cannot reproduce your #1. Can you provide a test file?

from pwiz.

FarmGeek4Life avatar FarmGeek4Life commented on August 30, 2024

You may be able to create a scan filter from a string with RawFileReader.
I think ThermoFisher.CommonCore.RawFileReader.FilterParserFactory.CreateFilterParser().GetFilterFromString(string) would do it.

from pwiz.

FarmGeek4Life avatar FarmGeek4Life commented on August 30, 2024

I also noticed that the "GetAverageMassList" method is now commented out, I'm assuming because it isn't used, but earlier this week I figured out how to get similar results from RawFileReader. I say "similar" because the method in MSFileReader is susceptible to the improper centroiding of FTMS data that would also occur with "GetMassList"

from pwiz.

FarmGeek4Life avatar FarmGeek4Life commented on August 30, 2024

Also, we just ran a test with a Lumos file with EThcD spectra; it crashed. The main error was "precursor count does not match ms level[SpectrumWorkerThreads::work] error in thread". I'm assuming that, if the creating a IScanFilter object using the GetFilterFromString works, this error will probably be fixed in the process of getting the ScanFilterTests to all pass.

from pwiz.

FarmGeek4Life avatar FarmGeek4Life commented on August 30, 2024

Also, if you call IScanFilter.ToString(), you get the scan filter string you would expect to see from MSFileReader.

from pwiz.

alchemistmatt avatar alchemistmatt commented on August 30, 2024

For issue 1 (MS1 data with precursor info), it appears to happen with any MS1 file from our Q-Exactive HF instrument with scan filter FTMS + p NSI Full ms.
I'll e-mail Matt Chambers a link to our FTP site with a test .raw file (I presume 400 MB is too big to attach to an issue). For reference, this is the example erroneous output:

<spectrum index="68" id="controllerType=0 controllerNumber=1 scan=69" defaultArrayLength="3681">
  <cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value=""/>
  <cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="1"/>

  <precursorList count="1">
    <precursor>
      <isolationWindow>
        <cvParam cvRef="MS" accession="MS:1000827" name="isolation window target m/z" value="0.0" unitCvRef="MS" unitAccession="MS:1000040" unitName="m/z"/>
      </isolationWindow>
      <selectedIonList count="1">
        <selectedIon>
          <cvParam cvRef="MS" accession="MS:1000744" name="selected ion m/z" value="0.0" unitCvRef="MS" unitAccession="MS:1000040" unitName="m/z"/>
        </selectedIon>
      </selectedIonList>
      <activation>
        <cvParam cvRef="MS" accession="MS:1000133" name="collision-induced dissociation" value=""/>
        <cvParam cvRef="MS" accession="MS:1000045" name="collision energy" value="0.0" unitCvRef="UO" unitAccession="UO:0000266" unitName="electronvolt"/>
      </activation>
    </precursor>
  </precursorList>

from pwiz.

chambm avatar chambm commented on August 30, 2024

Seems like a bug in RawFileReader. I'll report it to Jim.
image

from pwiz.

chambm avatar chambm commented on August 30, 2024

That was a pretty severe bug. No idea how widespread that was. Fixed in #194

from pwiz.

chambm avatar chambm commented on August 30, 2024

The activation type issue should be fixed in #204.

from pwiz.

chambm avatar chambm commented on August 30, 2024

(if someone finds other RFR issues it can be reopened)

from pwiz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.