chhh / batmass

Mass spectrometry data visualization
https://batmass.org
Apache License 2.0
36 stars 8 forks source link

Display custom data on MS 2 level #16

Open nbisliuk opened 5 years ago

nbisliuk commented 5 years ago

Hi there!

In your tutorial on project site there is a way how to overlap custom data from .mzrt.csv file with 2D map from .mzML file. Rectangles appear on MS1 level and when you switch to MS2 level they disappear. Is there any possibility to display them on MS2 level as well?

With respect, Nikita

chhh commented 5 years ago

Sorry for delayed response. It's been quite a while since I made any updates, so i don't remember exactly. The most likely answer is 'no', as at the time this was written tracing peaks in MS2 wasn't very popular. However, again, most likely, there's just an if/else check somewhere there that prevents it from painting over MS2 scans. I feel like it shouldn't be terribly difficult to tweak.

What's your use case?

nbisliuk commented 5 years ago

Thanks for response,

As for my case, I'm trying to analyse results from peptide searching algorythm. As an output you have several candidate peak groups (combination of MS1 and MS2 peaks) with corresponding scores for each peptide. The peak group with highest score is more likely your peptide. The point is that sometimes algorythm makes a mistake and correct candidate peak group doesn't have the highest score. I made a .mzrt.csv file with mz and RT values for all detected peak groups for a specific peptide and just want to highlight them on 2D map (both on MS1 and MS2)

In case you're sure that it's not possible, okay, not a big deal.

chhh commented 5 years ago

I see 2 ways: 1) Annotate features with MS level in mzrt.csv, then filter out features with non-matching ms level during plotting. 2) Remove the checks for plotting mzrt features, just try plotting them over whatever view is displayed. In that case it's up to you to make sure that the right data is displayed over the right view, but much more flexible.