-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get wrong MassTraceDetection results #437
Comments
Here I post the link of mass data: |
Hi! Just to clarify, what is the exact output? Do you think you could reduce the example/code to the first part that fails? |
@xieyying I sent a request to access your example data yesterday, could you please accept that? I will take a look. |
The data can be directly downloaded without need to request. For this data, I try the following parameter in the step of mass_trace_detection. |
@xieyying Which of these files did you use in your example? |
trace_termination_criterion:
|
In your small example, the problem might be that there are not enough scans to the left of the apex. Please try to run the example on a larger area around that feature/trace. |
What happens if you keep "trace_termination_criterion" as "outlier" but reduce the number of outliers with "trace_termination_outliers" to zero? The algorithm is looking for peaks left and right which have outlier m/z values. As @jpfeuffer mentioned, the main intensity traces start at the very beginning of your peak map. No chance to find the default 5 outliers to the left. |
https://drive.google.com/drive/folders/1CZBRSU_hdhq7UHXdqJYQSrMUVcSfarGy?usp=drive_link |
Combination of "outlier" and "zero" still can not provide correct result. Only min_sample_rate as 0.01 was added can generate the expected result. |
The issue is your peak map contains only data related to that simulated metabolite, but no noise at all (not realistic). Once you add some noise left and right it will work as expected. |
@axelwalter Ok. But can't this be disabled somehow with the correct snr and intensity settings? |
Yes,I add some random noise and set a suitable noise threshold. The default values for the parameter of "trace_termination_outliers" worked well and I got my expected feature.
Yes, when I set higher "noise_threshold_int", the situation goes back and the expected can not be found. |
I was actually referring to the chrom_peak_snr setting. Noise_threshold_int is just a simple minimum intensity cutoff. There must be a way to find this trace without noise, otherwise I would consider it a bug @axelwalter |
So I generated my own test feature (Gaussian distribution) without noise and any peaks around it. Default settings work just fine. Not sure why that was not the case for @xieyying data. Perhaps because of the strong tailing. |
Hmm but the MassTraceDetection alone does not care about intensities other than for the weighted mz of the trace and the order in which it seeds. But glad that it works in general. |
Describe the problem you encountered
I simulated a LC-MS data from a compound and analyze it using pyopenms through Untargeted Metabolomics Pre-Processing pipline. But I can not get the expected mass traces even by exhaustive tuning the parameters. I also view our data using TOPPView. and the expected mass trace all can be found. I also check iod_df generated by MzMLFile().load() and I also can find our expected mass.
To Reproduce
Steps to reproduce the behavior:
What should be happening
I should find the expected mass trace at m/z 148.5713 (the most intense), 149.0726, 149.5749, and 150.0755. But now, I just can find mass traces at m/z 149.5741 and 150.0755 by MassTraceDetection().
Screenshots

System information:
conda list
.conda list
.Additional context
The .mzML and .py file is not supported to uploaded. and Here I just pasted our code:
class FeatureDetection:
"""
Extract features from mzML files using pyopenms
"""
def init(self, file):
self.file = file
self.exp = oms.MSExperiment()
self.mass_traces = []
self.mass_traces_deconvol = []
self.feature_map = oms.FeatureMap()
self.chrom_out = []
The text was updated successfully, but these errors were encountered: