gtluu / timsconvert

https://gtluu.github.io/timsconvert/
Apache License 2.0
28 stars 16 forks source link

MS2 data are unlinked from MS1 in TIMS Tof #41

Closed eeko-kon closed 1 year ago

eeko-kon commented 1 year ago
nextflow run timsconvert/nextflow.nf --lcms_backend "tdf2mzml" --input *.d/
nextflow run timsconvert/nextflow.nf  --input *.d

With both scripts the conversion unfortunately 1) Doesn't conserve the IM dimension 2) Somehow removes links between MS2 data and the precursor ion (I think this is a general problem with TIMS-tof to mzML instead of mzXML, right?)

gtluu commented 1 year ago

Hi, currently, the tdf2mzml backend doesn't conserve the IM dimension as you observed, so you can use the timsconvert backend like you did in your second command. In the nextflow script, exclusion of the IM dimension in MS1 data is done by default due to the file size. However, you should be able to use the following command to include it: nextflow run timsconvert/nextflow.nf --input *.d --exclude_mobility False

Regarding your second question, I believe the MS2 precursor ion data should be linked to the MS1 scans using the spectrumRef attribute within the precursor element (see below).

<spectrum index="755" defaultArrayLength="4900" id="scan=756">
    <cvParam cvRef="PSI-MS" accession="MS:1000579" name="MS1 spectrum" value=""/>
    ...
</spectrum>

<spectrum index="756" defaultArrayLength="19" id="scan=757">
    <cvParam cvRef="PSI-MS" accession="MS:1000580" name="MSn spectrum" value=""/>
    ...
    <precursorList count="1">
        <precursor spectrumRef="scan=756">
            ...
        </precursor>
    </precursorList>
    ...
</spectrum>

However, I will look into it further. It could also be that certain programs may or may not use this attribute to link MS1 scans to MS2 precursors, so that can be further explored.

eeko-kon commented 1 year ago

Thank you so much for the response. That's good to hear. I will investigate further and let you know when I find time :)

gtluu commented 1 year ago

Sounds great. I am going to close this issue for now, however, feel free to contact me if you have any new information.