Skip to content
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

Fixed various minor peak filter related issues #1923

Merged
merged 6 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020, 2023 Lablicate GmbH.
* Copyright (c) 2020, 2024 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -35,6 +35,12 @@ public String getName() {
return "High Pass Ions";
}

@Override
public String getDescription() {

return "Remove all but n-highest ions by abundance.";
}

@Override
public Class<HighPassFilterSettings> getConfigClass() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020, 2023 Lablicate GmbH.
* Copyright (c) 2020, 2024 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -35,6 +35,12 @@ public String getName() {
return "Low Pass Ions";
}

@Override
public String getDescription() {

return "Remove all but n-lowest ions by abundance.";
}

@Override
public Class<LowPassFilterSettings> getConfigClass() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private static void filter(IScanMSD massSpectrum, SortOrder sortOrder, int numbe

List<IIon> ions = new ArrayList<>(massSpectrum.getIons());
Collections.sort(ions, new IonAbundanceComparator(sortOrder));
List<IIon> ionsToRemove = new ArrayList<IIon>();
List<IIon> ionsToRemove = new ArrayList<>();
int counter = 0;
for(IIon ion : ions) {
if(counter >= number) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2014, 2018 Lablicate GmbH.
* Copyright (c) 2014, 2024 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand All @@ -21,7 +21,7 @@

public class MassSpectrumFilterSettings extends AbstractMassSpectrumFilterSettings {

@JsonProperty(value = "Iterations", defaultValue = "1")
@JsonProperty(value = "Iterations", defaultValue = "100")
@JsonPropertyDescription(value = "The number of iterations to run the filter.")
@IntSettingsProperty(minValue = PreferenceSupplier.MIN_ITERATIONS, maxValue = PreferenceSupplier.MAX_ITERATIONS)
private int iterations = 100;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2014, 2018 Lablicate GmbH.
* Copyright (c) 2014, 2024 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand All @@ -21,7 +21,7 @@

public class PeakFilterSettings extends AbstractPeakFilterSettings {

@JsonProperty(value = "Iterations", defaultValue = "1")
@JsonProperty(value = "Iterations", defaultValue = "100")
@JsonPropertyDescription(value = "The number of iterations to run the filter.")
@IntSettingsProperty(minValue = PreferenceSupplier.MIN_ITERATIONS, maxValue = PreferenceSupplier.MAX_ITERATIONS)
private int iterations = 100;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020, 2022 Lablicate GmbH.
* Copyright (c) 2020, 2024 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -35,7 +35,7 @@ public String getName() {
@Override
public String getDescription() {

return "Filter Peak Integrations";
return "Reset calculated area/height.";
}

@Override
Expand All @@ -51,7 +51,6 @@ public void filterPeaks(IChromatogramSelection<?, ?> chromatogramSelection, Dele
if(configuration == null) {
configuration = createConfiguration(peaks);
}
//
if(configuration.isDeleteIntegrations()) {
SubMonitor subMonitor = SubMonitor.convert(context.getProgressMonitor(), peaks.size());
for(IPeak peak : peaks) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ public String getName() {
return "Delete Peaks by Model";
}

@Override
public String getDescription() {

return "Filter by internal peak model.";
}

@Override
public Class<DeletePeaksByModelFilterSettings> getConfigClass() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2019, 2022 Lablicate GmbH.
* Copyright (c) 2019, 2024 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -36,6 +36,12 @@ public String getName() {
return "Delete Peaks by Quantitation";
}

@Override
public String getDescription() {

return "Filter by name or concentration.";
}

@Override
public Class<DeletePeaksByQuantitationFilterSettings> getConfigClass() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2019, 2022 Lablicate GmbH.
* Copyright (c) 2019, 2024 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -37,6 +37,12 @@ public String getName() {
return "Delete Peaks by Target";
}

@Override
public String getDescription() {

return "Filter by identification results.";
}

@Override
public Class<DeletePeaksByTargetFilterSettings> getConfigClass() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2023 Lablicate GmbH.
* Copyright (c) 2023, 2024 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -39,6 +39,12 @@ public String getName() {
return "Delete Peaks by Trace";
}

@Override
public String getDescription() {

return "Filter by mass traces.";
}

@Override
public Class<DeletePeaksByTraceFilterSettings> getConfigClass() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2022 Lablicate GmbH.
* Copyright (c) 2022, 2024 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -32,12 +32,6 @@ public String getName() {
return "Delete Quantitation References";
}

@Override
public String getDescription() {

return "Delete the peak quantitation references.";
}

@Override
public Class<DeleteQuantitationReferencesFilterSettings> getConfigClass() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020, 2022 Lablicate GmbH.
* Copyright (c) 2020, 2024 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -32,12 +32,6 @@ public String getName() {
return "Delete Quantitations";
}

@Override
public String getDescription() {

return "Filter Peak Quantitations";
}

@Override
public Class<DeleteQuantitationsFilterSettings> getConfigClass() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020, 2022 Lablicate GmbH.
* Copyright (c) 2020, 2024 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -35,7 +35,7 @@ public String getName() {
@Override
public String getDescription() {

return "Filter Peak Standards";
return "Remove internal standard information.";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020, 2022 Lablicate GmbH.
* Copyright (c) 2020, 2024 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -36,7 +36,7 @@ public String getName() {
@Override
public String getDescription() {

return "Filter Peak Targets";
return "Remove all identification results.";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2022 Lablicate GmbH.
* Copyright (c) 2022, 2024 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -32,6 +32,12 @@ public String getName() {
return "Activate/Deactivate for Analysis";
}

@Override
public String getDescription() {

return "Sets the active for analysis status for all peaks.";
}

@Override
public Class<PeakActiveForAnalysisSettings> getConfigClass() {

Expand All @@ -45,7 +51,6 @@ public void filterPeaks(IChromatogramSelection<?, ?> chromatogramSelection, Peak
if(configuration == null) {
configuration = createConfiguration(peaks);
}
//
SubMonitor subMonitor = SubMonitor.convert(context.getProgressMonitor(), peaks.size());
boolean activeForAnalysis = configuration.isActiveForAnalysis();
for(IPeak peak : peaks) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020, 2023 Lablicate GmbH.
* Copyright (c) 2020, 2024 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -36,6 +36,12 @@ public String getName() {
return "Signal to Noise";
}

@Override
public String getDescription() {

return "Filter by s/n ratio.";
}

@Override
public Class<SignalToNoisePeakFilterSettings> getConfigClass() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2022 Lablicate GmbH.
* Copyright (c) 2022, 2024 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand All @@ -17,7 +17,7 @@
public class DeleteQuantitationReferencesFilterSettings {

@JsonProperty(value = "Delete Quantitation References", defaultValue = "")
@JsonPropertyDescription(value = "If empty, all references are deleted. Otherwise the speficied reference if available.")
@JsonPropertyDescription(value = "If empty, all references are deleted. Otherwise the specified reference if available.")
private String quantitationReference = "";

public String getQuantitationReference() {
Expand Down